2 dnl m4 macros for Mac OS 32-bit assembly.
4 dnl Copyright 2005, 2006 Free Software Foundation, Inc.
6 dnl This file is part of the GNU MP Library.
8 dnl The GNU MP Library is free software; you can redistribute it and/or
9 dnl modify it under the terms of the GNU Lesser General Public License as
10 dnl published by the Free Software Foundation; either version 3 of the
11 dnl License, or (at your option) any later version.
13 dnl The GNU MP Library is distributed in the hope that it will be useful,
14 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
15 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 dnl Lesser General Public License for more details.
18 dnl You should have received a copy of the GNU Lesser General Public License
19 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
21 define(`ASM_START',`')
23 dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo)
24 dnl EPILOGUE_cpu(GSYM_PREFIX`'foo)
27 define(`PROLOGUE_cpu',
34 define(`EPILOGUE_cpu',
38 dnl LEA -- Load Effective Address.
43 ` mflr r0 C save return address
46 addis $1, $1, ha16($2-1b)
47 la $1, lo16($2-1b)($1)
48 mtlr r0 C restore return address
64 m4_assert_numargs_range(1,2)
66 ALIGN(ifelse($#,1,2,$2))
73 define(`ASM_END', `dnl')