3 dnl m4 macros for alpha assembler (everywhere except unicos).
6 dnl Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
8 dnl This file is part of the GNU MP Library.
10 dnl The GNU MP Library is free software; you can redistribute it and/or
11 dnl modify it under the terms of the GNU Lesser General Public License as
12 dnl published by the Free Software Foundation; either version 3 of the
13 dnl License, or (at your option) any later version.
15 dnl The GNU MP Library is distributed in the hope that it will be useful,
16 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
17 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 dnl Lesser General Public License for more details.
20 dnl You should have received a copy of the GNU Lesser General Public License
21 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
24 dnl Usage: ASM_START()
35 dnl Usage: FLOAT64(label,value)
42 dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo[,gp|noalign])
43 dnl EPILOGUE_cpu(GSYM_PREFIX`'foo)
45 define(`PROLOGUE_cpu',
46 m4_assert_numargs_range(1,2)
48 `ifelse(`$2',noalign,,
49 `ifelse(`$2',,,`m4_error(`Unrecognised PROLOGUE parameter
52 ifelse(`$2',noalign,,` ALIGN(16)')
56 ifelse(`$2',gp,` ldgp r29,0(r27)')
58 .prologue ifelse(`$2',gp,1,0)')
60 define(`EPILOGUE_cpu',
65 dnl Usage: LDGP(dst,src)
67 dnl Emit an "ldgp dst,src", but only if the system uses a GOT.
74 dnl Usage: EXTERN(variable_name)
82 dnl Map register names r0 to $0, and f0 to $f0, etc.
83 dnl This is needed on all systems but Unicos
85 dnl defreg() is used to protect the $ in $0 (otherwise it would represent a
86 dnl macro argument). Double quoting is used to protect the f0 in $f0
87 dnl (otherwise it would be an infinite recursion).
89 forloop(i,0,31,`defreg(`r'i,$i)')
90 forloop(i,0,31,`deflit(`f'i,``$f''i)')
93 dnl Usage: DATASTART(name)
104 dnl Load a symbolic address into a register