minix/kernel/arch/i386/debugreg.S
Arun Thomas 9a21d1a2fd Macros for symbols used in both ASM and C
-The macros take care of prepending the leading underscore when
 necessary.
2010-08-17 16:44:07 +00:00

27 lines
447 B
ArmAsm

#include <machine/asm.h>
#define LD_ST_REG(reg) ;\
ENTRY(ld_##reg) ;\
mov 4(%esp), %eax ;\
mov %eax, %reg ;\
ret ;\
;\
ENTRY(st_##reg) ;\
mov %reg, %eax ;\
ret
/*
* void ld_dr0(phys_bytes value)
* phys_bytes st_dr0(void)
*/
LD_ST_REG(dr0)
LD_ST_REG(dr1)
LD_ST_REG(dr2)
LD_ST_REG(dr3)
/*
* void ld_dr0(unsigned long value)
* unsigned long st_dr0(void)
*/
LD_ST_REG(dr6)
LD_ST_REG(dr7)