Commit d15229b7 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Change some TARGET tests to HOST tests in the RTS

Which was being used seemed to be random
parent df1fecb9
......@@ -111,7 +111,7 @@ createAdjustor (int cconv,
arg_types[i] = char_to_ffi_type(typeString[i+1]);
}
switch (cconv) {
#ifdef mingw32_TARGET_OS
#ifdef mingw32_HOST_OS
case 0: /* stdcall */
abi = FFI_STDCALL;
break;
......
......@@ -457,7 +457,7 @@ typedef struct _RtsSymbolVal {
SymI_NeedsProto(closedir)
#endif
#if defined(darwin_TARGET_OS) && HAVE_PRINTF_LDBLSTUB
#if defined(darwin_HOST_OS) && HAVE_PRINTF_LDBLSTUB
#define RTS_DARWIN_ONLY_SYMBOLS \
SymI_NeedsProto(asprintf$LDBLStub) \
SymI_NeedsProto(err$LDBLStub) \
......@@ -1004,7 +1004,7 @@ typedef struct _RtsSymbolVal {
/* entirely bogus claims about types of these symbols */
#define SymI_NeedsProto(vvv) extern void vvv(void);
#if defined(__PIC__) && defined(mingw32_TARGET_OS)
#if defined(__PIC__) && defined(mingw32_HOST_OS)
#define SymE_HasProto(vvv) SymE_HasProto(vvv);
#define SymE_NeedsProto(vvv) extern void _imp__ ## vvv (void);
#else
......@@ -2017,7 +2017,7 @@ static SymbolExtra* makeSymbolExtra( ObjectCode* oc,
* PowerPC specifics (instruction cache flushing)
* ------------------------------------------------------------------------*/
#ifdef powerpc_TARGET_ARCH
#ifdef powerpc_HOST_ARCH
/*
ocFlushInstructionCache
......@@ -4021,7 +4021,7 @@ static int ocVerifyImage_MachO(ObjectCode* oc)
char *image = (char*) oc->image;
struct mach_header *header = (struct mach_header*) image;
#if x86_64_TARGET_ARCH || powerpc64_TARGET_ARCH
#if x86_64_HOST_ARCH || powerpc64_HOST_ARCH
if(header->magic != MH_MAGIC_64)
return 0;
#else
......@@ -4812,7 +4812,7 @@ static int machoGetMisalignment( FILE * f )
fread(&header, sizeof(header), 1, f);
rewind(f);
#if x86_64_TARGET_ARCH || powerpc64_TARGET_ARCH
#if x86_64_HOST_ARCH || powerpc64_HOST_ARCH
if(header.magic != MH_MAGIC_64)
return 0;
#else
......
......@@ -50,7 +50,7 @@ typedef struct {
long mtctr_r12;
long bctr;
} jumpIsland;
#elif x86_64_TARGET_ARCH
#elif x86_64_HOST_ARCH
uint64_t addr;
uint8_t jumpIsland[6];
#endif
......
......@@ -366,7 +366,7 @@ find_srt( stackPos *info )
bitmap = info->next.srt.srt_bitmap;
while (bitmap != 0) {
if ((bitmap & 1) != 0) {
#if defined(__PIC__) && defined(mingw32_TARGET_OS)
#if defined(__PIC__) && defined(mingw32_HOST_OS)
if ((unsigned long)(*(info->next.srt.srt)) & 0x1)
c = (* (StgClosure **)((unsigned long)*(info->next.srt.srt)) & ~0x1);
else
......@@ -1229,7 +1229,7 @@ retainSRT (StgClosure **srt, nat srt_bitmap, StgClosure *c, retainer c_child_r)
while (bitmap != 0) {
if ((bitmap & 1) != 0) {
#if defined(__PIC__) && defined(mingw32_TARGET_OS)
#if defined(__PIC__) && defined(mingw32_HOST_OS)
if ( (unsigned long)(*srt) & 0x1 ) {
retainClosure(* (StgClosure**) ((unsigned long) (*srt) & ~0x1),
c, c_child_r);
......
......@@ -16,7 +16,7 @@
#endif
/* I'd be mildly surprised if this wasn't defined, but still. */
#if defined(__PIC__) && defined(mingw32_TARGET_OS)
#if defined(__PIC__) && defined(mingw32_HOST_OS)
BOOL
WINAPI
DllMain ( HINSTANCE hInstance STG_UNUSED
......@@ -40,4 +40,4 @@ DllMain ( HINSTANCE hInstance STG_UNUSED
return TRUE;
}
#endif /* defined(__PIC__) && defined(mingw32_TARGET_OS) */
#endif /* defined(__PIC__) && defined(mingw32_HOST_OS) */
......@@ -6,7 +6,7 @@
#endif
/* I'd be mildly surprised if this wasn't defined, but still. */
#if defined(__PIC__) && defined(mingw32_TARGET_OS)
#if defined(__PIC__) && defined(mingw32_HOST_OS)
BOOL
WINAPI
DllMain ( HINSTANCE hInstance
......
......@@ -122,7 +122,7 @@ StgFunPtr StgReturn(void)
#ifdef i386_HOST_ARCH
#ifdef darwin_TARGET_OS
#ifdef darwin_HOST_OS
#define STG_GLOBAL ".globl "
#else
#define STG_GLOBAL ".global "
......
......@@ -546,7 +546,7 @@ INFO_TABLE_CONSTR(stg_MVAR_TSO_QUEUE,2,0,0,PRIM,"MVAR_TSO_QUEUE","MVAR_TSO_QUEUE
replace them with references to the static objects.
------------------------------------------------------------------------- */
#if defined(__PIC__) && defined(mingw32_TARGET_OS)
#if defined(__PIC__) && defined(mingw32_HOST_OS)
/*
* When sticking the RTS in a Windows DLL, we delay populating the
* Charlike and Intlike tables until load-time, which is only
......
......@@ -172,7 +172,7 @@ $$(rts_$1_LIB) : $$(rts_$1_OBJS) rts/libs.depend
"$$(RM)" $$(RM_OPTS) $$@
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
-no-auto-link-packages `cat rts/libs.depend` $$(rts_$1_OBJS) -o $$@
ifeq "$$(darwin_TARGET_OS)" "1"
ifeq "$$(darwin_HOST_OS)" "1"
# Ensure library's install name is correct before anyone links with it.
install_name_tool -id $(ghclibdir)/$$(rts_$1_LIB_NAME) $$@
endif
......
......@@ -26,7 +26,7 @@
// registers EAX, EDX, and ECX instead of on the stack. Functions that
// take a variable number of arguments will continue to be passed all of
// their arguments on the stack.
#if __GNUC__ >= 2 && (defined(x86_64_TARGET_ARCH) || defined(i386_TARGET_ARCH))
#if __GNUC__ >= 2 && (defined(x86_64_HOST_ARCH) || defined(i386_HOST_ARCH))
#define REGPARM1 __attribute__((regparm(1)))
#else
#define REGPARM1
......
......@@ -226,7 +226,7 @@ extern __thread gc_thread* gct;
#define DECLARE_GCT __thread gc_thread* gct;
#elif defined(sparc_TARGET_ARCH)
#elif defined(sparc_HOST_ARCH)
// On SPARC we can't pin gct to a register. Names like %l1 are just offsets
// into the register window, which change on each function call.
//
......
......@@ -329,7 +329,7 @@ scavenge_srt (StgClosure **srt, nat srt_bitmap)
while (bitmap != 0) {
if ((bitmap & 1) != 0) {
#if defined(__PIC__) && defined(mingw32_TARGET_OS)
#if defined(__PIC__) && defined(mingw32_HOST_OS)
// Special-case to handle references to closures hiding out in DLLs, since
// double indirections required to get at those. The code generator knows
// which is which when generating the SRT, so it stores the (indirect)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment