2 dnl Copyright 2007, 2011, 2012, 2014 Free Software Foundation, Inc.
4 dnl This file is part of the GNU MP Library.
6 dnl The GNU MP Library is free software; you can redistribute it and/or modify
7 dnl it under the terms of either:
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.
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
19 dnl or both in parallel, as here.
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
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/.
33 dnl Usage LEA(symbol,reg)
34 dnl Usage LEAL(symbol_local_to_file,reg)
36 dnl We maintain lists of stuff to append in load_eip and darwin_bd. The
37 dnl `index' stuff is needed to suppress repeated definitions. To avoid
38 dnl getting fooled by "var" and "var1", we add 'bol ' (the end of
39 dnl 'indirect_symbol') at the beginning and and a newline at the end. This
40 dnl might be a bit fragile.
45 ifelse(index(defn(`load_eip'), `$2'),-1,
49 L(movl_eip_`'substr($2,1)):
53 ifelse(index(defn(`darwin_bd'), `bol $1
55 `m4append(`darwin_bd',
56 ` .section __IMPORT,__pointers,non_lazy_symbol_pointers
61 call L(movl_eip_`'substr($2,1))
62 movl L($1`'$non_lazy_ptr)-.($2), $2
70 ifelse(index(defn(`load_eip'), `$2'),-1,
74 L(movl_eip_`'substr($2,1)):
78 call L(movl_eip_`'substr($2,1))
87 define(`ASM_END',`load_eip`'darwin_bd')
89 define(`load_eip', `') dnl updated in LEA
90 define(`darwin_bd', `') dnl updated in LEA
93 dnl Usage: CALL(funcname)
98 `call GSYM_PREFIX`'$1')
100 undefine(`PIC_WITH_EBX')