All pastes #472422 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-05 15:49 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");
}