unicos.m4 revision 1.1.1.1
1divert(-1) 2 3dnl m4 macros for alpha assembler on unicos. 4 5 6dnl Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc. 7dnl 8dnl This file is part of the GNU MP Library. 9dnl 10dnl The GNU MP Library is free software; you can redistribute it and/or 11dnl modify it under the terms of the GNU Lesser General Public License as 12dnl published by the Free Software Foundation; either version 3 of the 13dnl License, or (at your option) any later version. 14dnl 15dnl The GNU MP Library is distributed in the hope that it will be useful, 16dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 17dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18dnl Lesser General Public License for more details. 19dnl 20dnl You should have received a copy of the GNU Lesser General Public License 21dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. 22 23 24dnl Note that none of the standard GMP_ASM_ autoconf tests are done for 25dnl unicos, so none of the config.m4 results can be used here. 26 27dnl No underscores on unicos 28define(`GSYM_PREFIX') 29 30define(`ASM_START', 31m4_assert_numargs(0) 32` .ident dummy') 33 34define(`X', 35m4_assert_numargs(1) 36`^X$1') 37 38define(`FLOAT64', 39m4_assert_numargs(2) 40` .psect $1@crud,data 41$1: .t_floating $2 42 .endp') 43 44dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo[,gp|noalign]) 45dnl EPILOGUE_cpu(GSYM_PREFIX`'foo) 46 47define(`PROLOGUE_cpu', 48m4_assert_numargs_range(1,2) 49`ifelse(`$2',gp,, 50`ifelse(`$2',noalign,, 51`ifelse(`$2',,,`m4_error(`Unrecognised PROLOGUE parameter 52')')')')dnl 53 .stack 192 ; What does this mean? Only Cray knows. 54 .psect $1@code,code,cache 55$1::') 56 57define(`EPILOGUE_cpu', 58m4_assert_numargs(1) 59` .endp') 60 61 62dnl Usage: LDGP(dst,src) 63dnl 64dnl Emit an "ldgp dst,src", but only on systems using a GOT (which unicos 65dnl doesn't). 66 67define(LDGP, 68m4_assert_numargs(2) 69) 70 71 72dnl Usage: EXTERN(variable_name) 73define(`EXTERN', 74m4_assert_numargs(1) 75` .extern $1') 76 77define(`DATASTART', 78m4_assert_numargs(1) 79` .psect $1@crud,data 80$1:') 81 82define(`DATAEND', 83m4_assert_numargs(0) 84` .endp') 85 86define(`ASM_END', 87m4_assert_numargs(0) 88` .end') 89 90define(`cvttqc', 91m4_assert_numargs(-1) 92`cvttq/c') 93 94dnl Load a symbolic address into a register 95define(`LEA', 96m4_assert_numargs(2) 97 `laum $1, $2(r31) 98 sll $1, 32, $1 99 lalm $1, $2($1) 100 lal $1, $2($1)') 101 102 103dnl Usage: ALIGN(bytes) 104dnl 105dnl Unicos assembler .align emits zeros, even in code segments, so disable 106dnl aligning. 107dnl 108dnl GCC uses a macro emiting nops until the desired alignment is reached 109dnl (see unicosmk_file_start in alpha.c). Could do something like that if 110dnl we cared. The maximum desired alignment must be established at the 111dnl start of the section though, since of course emitting nops only 112dnl advances relative to the section beginning. 113 114define(`ALIGN', 115m4_assert_numargs(1) 116) 117 118 119divert 120