1divert(-1) 2dnl Copyright 2008, 2011, 2012 Free Software Foundation, Inc. 3dnl 4dnl This file is part of the GNU MP Library. 5dnl 6dnl The GNU MP Library is free software; you can redistribute it and/or modify 7dnl it under the terms of either: 8dnl 9dnl * the GNU Lesser General Public License as published by the Free 10dnl Software Foundation; either version 3 of the License, or (at your 11dnl option) any later version. 12dnl 13dnl or 14dnl 15dnl * the GNU General Public License as published by the Free Software 16dnl Foundation; either version 2 of the License, or (at your option) any 17dnl later version. 18dnl 19dnl or both in parallel, as here. 20dnl 21dnl The GNU MP Library is distributed in the hope that it will be useful, but 22dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 23dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 24dnl for more details. 25dnl 26dnl You should have received copies of the GNU General Public License and the 27dnl GNU Lesser General Public License along with the GNU MP Library. If not, 28dnl see https://www.gnu.org/licenses/. 29 30define(`DARWIN') 31 32define(`LEA',`dnl 33ifdef(`PIC', 34 `lea $1(%rip), $2' 35, 36 `movabs `$'$1, $2') 37') 38 39dnl Usage: CALL(funcname) 40dnl 41dnl Simply override the definition in x86_64-defs.m4. 42 43define(`CALL',`call GSYM_PREFIX`'$1') 44define(`TCALL',`jmp GSYM_PREFIX`'$1') 45 46 47dnl Usage: JUMPTABSECT 48dnl 49dnl CAUTION: Do not put anything sensible here, like RODATA. That works with 50dnl some Darwin tool chains, but silently breaks with other. (Note that 51dnl putting jump tables in the text segment is a really poor idea for many PC 52dnl processors, since they cannot cache the same thing in both L1D and L2I.) 53 54define(`JUMPTABSECT', `.text') 55 56 57dnl Usage: JMPENT(targlabel,tablabel) 58 59define(`JMPENT',`dnl 60ifdef(`PIC', 61 `.set $1_tmp, $1-$2 62 .long $1_tmp' 63, 64 `.quad $1' 65)') 66 67dnl Target ABI macros. For Darwin we override IFELF (and leave default for 68dnl IFDOS and IFSTD). 69 70define(`IFELF', `') 71 72 73dnl Usage: PROTECT(symbol) 74dnl 75dnl Used for private GMP symbols that should never be overridden by users. 76dnl This can save reloc entries and improve shlib sharing as well as 77dnl application startup times 78 79define(`PROTECT', `.private_extern $1') 80 81 82divert`'dnl 83