Macros for symbols used in both ASM and C
-The macros take care of prepending the leading underscore when necessary.
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
.text
|
||||
#include <machine/asm.h>
|
||||
|
||||
#define LD_ST_REG(reg) ;\
|
||||
.globl _ld_##reg ;\
|
||||
.globl _st_##reg ;\
|
||||
;\
|
||||
_ld_##reg: ;\
|
||||
ENTRY(ld_##reg) ;\
|
||||
mov 4(%esp), %eax ;\
|
||||
mov %eax, %reg ;\
|
||||
ret ;\
|
||||
;\
|
||||
_st_##reg: ;\
|
||||
ENTRY(st_##reg) ;\
|
||||
mov %reg, %eax ;\
|
||||
ret
|
||||
|
||||
|
||||
Reference in New Issue
Block a user