Tizen 2.1 base
[external/gmp.git] / mpn / x86 / darwin.m4
1 divert(-1)
2 dnl  Copyright 2007 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
7 dnl  modify it under the terms of the GNU Lesser General Public License as
8 dnl  published by the Free Software Foundation; either version 3 of the
9 dnl  License, or (at your option) any later version.
10 dnl
11 dnl  The GNU MP Library is distributed in the hope that it will be useful,
12 dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 dnl  Lesser General Public License for more details.
15 dnl
16 dnl  You should have received a copy of the GNU Lesser General Public License
17 dnl  along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.
18
19 define(`DARWIN')
20
21 dnl  Usage LEA(symbol,reg)
22 dnl
23 dnl  FIXME: Only handles one symbol per assembly file because of the
24 dnl  way EPILOGUE_cpu is handled.
25
26 define(`LEA',`
27 define(`EPILOGUE_cpu',
28 `       L(movl_eip_`'substr($2,1)):
29         movl    (%esp), $2
30         ret_internal
31         .section __IMPORT,__pointers,non_lazy_symbol_pointers
32 L($1`'$non_lazy_ptr):
33         .indirect_symbol $1
34         .long    0
35 ')
36         call    L(movl_eip_`'substr($2,1))
37         movl    L($1`'$non_lazy_ptr)-.($2), $2
38 ')
39
40 divert`'dnl