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