All pastes #717373 Raw Edit

Miscellany

public text v1 · immutable
#717373 ·published 2007-09-27 16:15 UTC
rendered paste body
"Test:3: error: can't find a register in class CREG while reloading asm"

void test()
{
    ins32(...)
}

inline void ins32(uint16 port, void* addr, uint32 count)
{
    __asm__ __volatile__ ("cld;rep;insl" : : 
                          "d" (port),"D" (addr),"c" (count) : 
                          "edi", "ecx", "memory");
}