3 dnl m4 macros for alpha assembler (everywhere except unicos).
6 dnl Copyright 2000, 2002-2004, 2013 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 modify
11 dnl it under the terms of either:
13 dnl * the GNU Lesser General Public License as published by the Free
14 dnl Software Foundation; either version 3 of the License, or (at your
15 dnl option) any later version.
19 dnl * the GNU General Public License as published by the Free Software
20 dnl Foundation; either version 2 of the License, or (at your option) any
23 dnl or both in parallel, as here.
25 dnl The GNU MP Library is distributed in the hope that it will be useful, but
26 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
27 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
30 dnl You should have received copies of the GNU General Public License and the
31 dnl GNU Lesser General Public License along with the GNU MP Library. If not,
32 dnl see https://www.gnu.org/licenses/.
35 dnl Usage: ASM_START()
46 dnl Usage: FLOAT64(label,value)
53 dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo[,gp|noalign])
54 dnl EPILOGUE_cpu(GSYM_PREFIX`'foo)
56 define(`PROLOGUE_cpu',
57 m4_assert_numargs_range(1,2)
59 `ifelse(`$2',noalign,,
60 `ifelse(`$2',,,`m4_error(`Unrecognised PROLOGUE parameter
63 ifelse(`$2',noalign,,` ALIGN(16)')
68 ifelse(`$2',gp,` ldgp r29, 0(r27)
70 .prologue ifelse(`$2',gp,1,0)')
72 define(`EPILOGUE_cpu',
77 dnl Usage: LDGP(dst,src)
79 dnl Emit an "ldgp dst,src", but only if the system uses a GOT.
86 dnl Usage: EXTERN(variable_name)
94 dnl Map register names r0 to $0, and f0 to $f0, etc.
95 dnl This is needed on all systems but Unicos
97 dnl defreg() is used to protect the $ in $0 (otherwise it would represent a
98 dnl macro argument). Double quoting is used to protect the f0 in $f0
99 dnl (otherwise it would be an infinite recursion).
101 forloop(i,0,31,`defreg(`r'i,$i)')
102 forloop(i,0,31,`deflit(`f'i,``$f''i)')
105 dnl Usage: DATASTART(name,align) or DATASTART(name)
109 m4_assert_numargs_range(1,2)
111 ALIGN(ifelse($#,1,2,$2))
117 dnl Load a symbolic address into a register