diff options
author | Valery Ushakov <uwe@stderr.spb.ru> | 2017-01-13 20:44:57 +0300 |
---|---|---|
committer | Valery Ushakov <uwe@stderr.spb.ru> | 2017-01-13 20:44:57 +0300 |
commit | e1ab54d599d4497ed2c91871b913073e694fbbf5 (patch) | |
tree | c061556b1e9ad0e3bd48b99d55b4b4b90a77ae73 | |
parent | fe3d3b1497fa06dc9b7d04f1e81dbf99aca80db3 (diff) |
Use <machine/asm.h> macros.
-rw-r--r-- | lib9/getcallerpc-NetBSD-386.S | 7 | ||||
-rw-r--r-- | lib9/setfcr-NetBSD-386.S | 15 |
2 files changed, 12 insertions, 10 deletions
diff --git a/lib9/getcallerpc-NetBSD-386.S b/lib9/getcallerpc-NetBSD-386.S index 09148627..08ea057e 100644 --- a/lib9/getcallerpc-NetBSD-386.S +++ b/lib9/getcallerpc-NetBSD-386.S @@ -1,8 +1,7 @@ - .file "getcallerpc-NetBSD-386.S" +#include <machine/asm.h> - .type getcallerpc,@function - .global getcallerpc -getcallerpc: +NENTRY(getcallerpc) movl 4(%esp), %eax movl -4(%eax), %eax ret + END(getcallerpc) diff --git a/lib9/setfcr-NetBSD-386.S b/lib9/setfcr-NetBSD-386.S index d981f36a..06a6b78d 100644 --- a/lib9/setfcr-NetBSD-386.S +++ b/lib9/setfcr-NetBSD-386.S @@ -1,18 +1,18 @@ +#include <machine/asm.h> -#define FN(x) .type x,@function; .global x; x #define ENT subl $16, %esp #define RET addl $16, %esp; ret - .file "setfcr-Linux-386.S" -FN(setfcr): +NENTRY(setfcr) ENT xorb $0x3f, %al movl %eax, (%esp) fwait fldcw (%esp) RET + END(setfcr) -FN(getfcr): +NENTRY(getfcr) ENT fwait fstcw (%esp) @@ -20,15 +20,18 @@ FN(getfcr): andl $0xffff, %eax xorb $0x3f, %al RET + END(getfcr) -FN(getfsr): +NENTRY(getfsr) ENT fwait fstsw (%esp) movw (%esp), %ax andl $0xffff, %eax RET + END(getfsr) -FN(setfsr): +NENTRY(setfsr) fclex ret + END(setfsr) |