diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-04-21 09:16:48 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-28 22:35:04 -0400 |
commit | 945c45ad50ed31e3acb96fdaafb21640c4669f12 (patch) | |
tree | ae2e59ba8d3a49bbd3c3dcece39d53aef691ed44 /rts/linker/SymbolExtras.c | |
parent | e5b3492f23c2296d0d8221e1787ee585331f726e (diff) | |
download | haskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz |
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'rts/linker/SymbolExtras.c')
-rw-r--r-- | rts/linker/SymbolExtras.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/linker/SymbolExtras.c b/rts/linker/SymbolExtras.c index 07000331ef..20591fe20c 100644 --- a/rts/linker/SymbolExtras.c +++ b/rts/linker/SymbolExtras.c @@ -102,7 +102,7 @@ int ocAllocateSymbolExtras( ObjectCode* oc, int count, int first ) } -#ifndef arm_HOST_ARCH +#if !defined(arm_HOST_ARCH) SymbolExtra* makeSymbolExtra( ObjectCode const* oc, unsigned long symbolNumber, unsigned long target ) @@ -114,7 +114,7 @@ SymbolExtra* makeSymbolExtra( ObjectCode const* oc, extra = &oc->symbol_extras[symbolNumber - oc->first_symbol_extra]; -#ifdef powerpc_HOST_ARCH +#if defined(powerpc_HOST_ARCH) // lis r12, hi16(target) extra->jumpIsland.lis_r12 = 0x3d80; extra->jumpIsland.hi_addr = target >> 16; @@ -129,7 +129,7 @@ SymbolExtra* makeSymbolExtra( ObjectCode const* oc, // bctr extra->jumpIsland.bctr = 0x4e800420; #endif /* powerpc_HOST_ARCH */ -#ifdef x86_64_HOST_ARCH +#if defined(x86_64_HOST_ARCH) // jmp *-14(%rip) static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; extra->addr = target; @@ -140,7 +140,7 @@ SymbolExtra* makeSymbolExtra( ObjectCode const* oc, } #endif -#ifdef arm_HOST_ARCH +#if defined(arm_HOST_ARCH) /* Note [The ARM/Thumb Story] ~~~~~~~~~~~~~~~~~~~~~~~~~~ |