1divert(-1) 2dnl m4 macros for Mac OS 32-bit assembly. 3 4dnl Copyright 2005, 2006 Free Software Foundation, Inc. 5dnl 6dnl This file is part of the GNU MP Library. 7dnl 8dnl The GNU MP Library is free software; you can redistribute it and/or 9dnl modify it under the terms of the GNU Lesser General Public License as 10dnl published by the Free Software Foundation; either version 3 of the 11dnl License, or (at your option) any later version. 12dnl 13dnl The GNU MP Library is distributed in the hope that it will be useful, 14dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 15dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16dnl Lesser General Public License for more details. 17dnl 18dnl You should have received a copy of the GNU Lesser General Public License 19dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. 20 21define(`ASM_START',`') 22 23dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo) 24dnl EPILOGUE_cpu(GSYM_PREFIX`'foo) 25dnl 26 27define(`PROLOGUE_cpu', 28m4_assert_numargs(1) 29` .text 30 .globl $1 31 .align 3 32$1:') 33 34define(`EPILOGUE_cpu', 35m4_assert_numargs(1)) 36 37 38dnl LEA -- Load Effective Address. 39 40define(`LEA', 41m4_assert_numargs(2) 42`ifdef(`PIC', 43` mflr r0 C save return address 44 bcl 20, 31, 1f 451: mflr $1 46 addis $1, $1, ha16($2-1b) 47 la $1, lo16($2-1b)($1) 48 mtlr r0 C restore return address 49',` 50 lis $1, ha16($2) 51 la $1, lo16($2)($1) 52')') 53 54define(`LEAL', 55m4_assert_numargs(2) 56`LEA($1,$2)') 57 58 59define(`EXTERN', 60m4_assert_numargs(1) 61`dnl') 62 63define(`DEF_OBJECT', 64m4_assert_numargs_range(1,2) 65` .const 66 ALIGN(ifelse($#,1,2,$2)) 67$1: 68') 69 70define(`END_OBJECT', 71m4_assert_numargs(1)) 72 73define(`ASM_END', `dnl') 74 75ifdef(`PIC',` 76define(`PIC_SLOW')') 77 78divert 79