summaryrefslogtreecommitdiff
path: root/mpn/x86/x86-defs.m4
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2010-11-29 21:59:04 +0100
committerTorbjorn Granlund <tege@gmplib.org>2010-11-29 21:59:04 +0100
commitc8c90b5cf110439cc974ba866c26786eb5a93102 (patch)
treee79f04ce145feae8a8bfbdd23bc79fb77fae4aaa /mpn/x86/x86-defs.m4
parent19028f635911416e76e0aac3a7bcfefedf6250f6 (diff)
downloadgmp-c8c90b5cf110439cc974ba866c26786eb5a93102.tar.gz
(LEA): Support non-PIC code.
Diffstat (limited to 'mpn/x86/x86-defs.m4')
-rw-r--r--mpn/x86/x86-defs.m415
1 files changed, 9 insertions, 6 deletions
diff --git a/mpn/x86/x86-defs.m4 b/mpn/x86/x86-defs.m4
index b1f36ddeb..ae7d3e652 100644
--- a/mpn/x86/x86-defs.m4
+++ b/mpn/x86/x86-defs.m4
@@ -928,7 +928,9 @@ m4_assert_numargs(1)
dnl Usage LEA(symbol,reg)
-define(`LEA',`
+define(`LEA',
+m4_assert_numargs(2)
+`ifdef(`PIC',`
define(`EPILOGUE_cpu',
`
L(movl_eip_`'substr($2,1)):
@@ -936,11 +938,12 @@ L(movl_eip_`'substr($2,1)):
ret_internal
SIZE($'`1, .-$'`1)')
- call L(movl_eip_`'substr($2,1))
- addl $_GLOBAL_OFFSET_TABLE_, $2
- movl $1@GOT($2), $2
-')
-
+ call L(movl_eip_`'substr($2,1))
+ addl $_GLOBAL_OFFSET_TABLE_, $2
+ movl $1@GOT($2), $2
+',`
+ movl `$'$1, $2
+')')
define(`DEF_OBJECT',
m4_assert_numargs_range(1,2)