3 dnl m4 macros for alpha assembler on 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 Note that none of the standard GMP_ASM_ autoconf tests are done for
36 dnl unicos, so none of the config.m4 results can be used here.
38 dnl No underscores on unicos
55 dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo[,gp|noalign])
56 dnl EPILOGUE_cpu(GSYM_PREFIX`'foo)
58 define(`PROLOGUE_cpu',
59 m4_assert_numargs_range(1,2)
61 `ifelse(`$2',noalign,,
62 `ifelse(`$2',,,`m4_error(`Unrecognised PROLOGUE parameter
64 .stack 192 ; What does this mean? Only Cray knows.
65 .psect $1@code,code,cache
68 define(`EPILOGUE_cpu',
73 dnl Usage: LDGP(dst,src)
75 dnl Emit an "ldgp dst,src", but only on systems using a GOT (which unicos
83 dnl Usage: EXTERN(variable_name)
89 m4_assert_numargs_range(1,2)
91 ALIGN(ifelse($#,1,2,$2))
103 m4_assert_numargs(-1)
106 dnl Load a symbolic address into a register
115 dnl Usage: ALIGN(bytes)
117 dnl Unicos assembler .align emits zeros, even in code segments, so disable
120 dnl GCC uses a macro emiting nops until the desired alignment is reached
121 dnl (see unicosmk_file_start in alpha.c). Could do something like that if
122 dnl we cared. The maximum desired alignment must be established at the
123 dnl start of the section though, since of course emitting nops only
124 dnl advances relative to the section beginning.