work around msvc bug where .model must be on its own line or it forgets about it

This commit is contained in:
Jameson Nash 2014-03-18 22:03:14 -04:00
parent 995c70eaf7
commit 5f4979e5d1
2 changed files with 4 additions and 4 deletions

View file

@ -60,10 +60,10 @@
#define CNAME(csym) csym #define CNAME(csym) csym
#define HIDENAME(asmsym) .asmsym #define HIDENAME(asmsym) .asmsym
#define _START_ENTRY .text; .p2align 4,0x90 #define _START_ENTRY .p2align 4,0x90
#if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__) #if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__)
#define _ENTRY(x) _START_ENTRY; \ #define _ENTRY(x) .text; _START_ENTRY; \
.globl CNAME(x); .type CNAME(x),@function; CNAME(x): .globl CNAME(x); .type CNAME(x),@function; CNAME(x):
#define END(x) .size x, . - x #define END(x) .size x, . - x
@ -73,7 +73,7 @@
#define _START_ENTRY_WIN .text; _START_ENTRY #define _START_ENTRY_WIN .text; _START_ENTRY
#else #else
#define END(x) end #define END(x) end
#define _START_ENTRY_WIN .model small; .code; _START_ENTRY #define _START_ENTRY_WIN .code; _START_ENTRY
#endif #endif
#define _ENTRY(x) _START_ENTRY_WIN; \ #define _ENTRY(x) _START_ENTRY_WIN; \
.globl CNAME(x); .section .drectve; .ascii " -export:" #x; \ .globl CNAME(x); .section .drectve; .ascii " -export:" #x; \

View file

@ -84,7 +84,7 @@
#define _START_ENTRY_WIN .text; _START_ENTRY #define _START_ENTRY_WIN .text; _START_ENTRY
#else #else
#define END(x) end #define END(x) end
#define _START_ENTRY_WIN .model small; .code; _START_ENTRY #define _START_ENTRY_WIN .code; _START_ENTRY
#endif #endif
#define CNAME(csym) _##csym #define CNAME(csym) _##csym
#define HIDENAME(asmsym) .asmsym #define HIDENAME(asmsym) .asmsym