Skip to content

Commit 5f4979e

Browse files
committed
work around msvc bug where .model must be on its own line or it forgets about it
1 parent 995c70e commit 5f4979e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

amd64/bsd_asm.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@
6060
#define CNAME(csym) csym
6161
#define HIDENAME(asmsym) .asmsym
6262

63-
#define _START_ENTRY .text; .p2align 4,0x90
63+
#define _START_ENTRY .p2align 4,0x90
6464

6565
#if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__)
66-
#define _ENTRY(x) _START_ENTRY; \
66+
#define _ENTRY(x) .text; _START_ENTRY; \
6767
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
6868
#define END(x) .size x, . - x
6969

@@ -73,7 +73,7 @@
7373
#define _START_ENTRY_WIN .text; _START_ENTRY
7474
#else
7575
#define END(x) end
76-
#define _START_ENTRY_WIN .model small; .code; _START_ENTRY
76+
#define _START_ENTRY_WIN .code; _START_ENTRY
7777
#endif
7878
#define _ENTRY(x) _START_ENTRY_WIN; \
7979
.globl CNAME(x); .section .drectve; .ascii " -export:" #x; \

i387/bsd_asm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
#define _START_ENTRY_WIN .text; _START_ENTRY
8585
#else
8686
#define END(x) end
87-
#define _START_ENTRY_WIN .model small; .code; _START_ENTRY
87+
#define _START_ENTRY_WIN .code; _START_ENTRY
8888
#endif
8989
#define CNAME(csym) _##csym
9090
#define HIDENAME(asmsym) .asmsym

0 commit comments

Comments
 (0)