aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfsound
diff options
context:
space:
mode:
authornotaz2017-05-03 02:52:15 +0300
committernotaz2017-05-03 02:52:15 +0300
commit0e4ad31902f206e2c6945632bb1f558eae941ff1 (patch)
tree81435eaaac3be5d685132259f79794fb556bd431 /plugins/dfsound
parent25e52b2c51afd3609aa2a0e218036d27520af510 (diff)
downloadpcsx_rearmed-0e4ad31902f206e2c6945632bb1f558eae941ff1.tar.gz
pcsx_rearmed-0e4ad31902f206e2c6945632bb1f558eae941ff1.tar.bz2
pcsx_rearmed-0e4ad31902f206e2c6945632bb1f558eae941ff1.zip
use pc-relative offsets for PIC too
Diffstat (limited to 'plugins/dfsound')
-rw-r--r--plugins/dfsound/arm_utils.S10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/dfsound/arm_utils.S b/plugins/dfsound/arm_utils.S
index eaeca51..8ac7c30 100644
--- a/plugins/dfsound/arm_utils.S
+++ b/plugins/dfsound/arm_utils.S
@@ -10,7 +10,7 @@
#include "arm_features.h"
-#ifdef __MACH__
+#ifdef TEXRELS_FORBIDDEN
.data
.align 2
ptr_ChanBuf: .word ESYM(ChanBuf)
@@ -20,14 +20,14 @@ ptr_ChanBuf: .word ESYM(ChanBuf)
.align 2
.macro load_varadr reg var
-#if defined(HAVE_ARMV7) && !defined(__PIC__)
- movw \reg, #:lower16:ESYM(\var)
- movt \reg, #:upper16:ESYM(\var)
-#elif defined(HAVE_ARMV7) && defined(__MACH__)
+#if defined(HAVE_ARMV7) && defined(TEXRELS_FORBIDDEN)
movw \reg, #:lower16:(ptr_\var-(1678f+8))
movt \reg, #:upper16:(ptr_\var-(1678f+8))
1678:
ldr \reg, [pc, \reg]
+#elif defined(HAVE_ARMV7) && !defined(__PIC__)
+ movw \reg, #:lower16:ESYM(\var)
+ movt \reg, #:upper16:ESYM(\var)
#else
ldr \reg, =ESYM(\var)
#endif