From 928ed2280f77ae1d4c0d5bf88635cf38b29f27f2 Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Sun, 14 Nov 2021 12:22:50 +0100 Subject: Clean up Sparc 64-bit PIC while allowing old-style gdop-incapable environments. --- mpn/sparc32/sparc-defs.m4 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mpn') diff --git a/mpn/sparc32/sparc-defs.m4 b/mpn/sparc32/sparc-defs.m4 index 33a0c535b..fff0ff8c1 100644 --- a/mpn/sparc32/sparc-defs.m4 +++ b/mpn/sparc32/sparc-defs.m4 @@ -3,7 +3,7 @@ divert(-1) dnl m4 macros for SPARC assembler (32 and 64 bit). -dnl Copyright 2002, 2011, 2013, 2017 Free Software Foundation, Inc. +dnl Copyright 2002, 2011, 2013, 2017, 2021 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl @@ -74,16 +74,20 @@ dnl of one after the other. That might need one more scratch register. define(LEA64, m4_assert_numargs(3) -m4_assert_defined(`HAVE_GOTDATA') `ifdef(`PIC',` rd %pc, %`$2' sethi %hi(_GLOBAL_OFFSET_TABLE_+4), %`$3' add %`$3', %lo(_GLOBAL_OFFSET_TABLE_+8), %`$3' add %`$2', %`$3', %`$3' +ifelse(HAVE_GDOP,yes,` sethi %gdop_hix22(`$1'), %`$2' xor %`$2', %gdop_lox10(`$1'), %`$2' ldx [%`$3' + %`$2'], %`$2', %gdop(`$1') ',` + sethi %hi(`$1'), %`$2' + or %`$2', %lo(`$1'), %`$2' + ldx [%`$3' + %`$2'], %`$2' +')',` sethi %h44(`$1'), %`$2' or %`$2', %m44(`$1'), %`$2' sllx %`$2', 12, %`$2' -- cgit v1.2.1