version 1.1.1.1, 2000/09/09 14:12:22 |
version 1.1.1.2, 2003/08/25 16:06:18 |
|
|
divert(-1) |
divert(-1) |
|
|
|
dnl m4 macros for alpha assembler on unicos. |
|
|
dnl Copyright (C) 2000 Free Software Foundation, Inc. |
|
dnl |
dnl Copyright 2000, 2002 Free Software Foundation, Inc. |
|
dnl |
dnl This file is part of the GNU MP Library. |
dnl This file is part of the GNU MP Library. |
dnl |
dnl |
dnl The GNU MP Library is free software; you can redistribute it and/or |
dnl The GNU MP Library is free software; you can redistribute it and/or |
Line 21 dnl not, write to the Free Software Foundation, Inc., |
|
Line 23 dnl not, write to the Free Software Foundation, Inc., |
|
dnl Suite 330, Boston, MA 02111-1307, USA. |
dnl Suite 330, Boston, MA 02111-1307, USA. |
|
|
|
|
|
dnl Note that none of the standard GMP_ASM_ autoconf tests are done for |
|
dnl unicos, so none of the config.m4 results can be used here. |
|
|
|
dnl No underscores on unicos |
|
define(`GSYM_PREFIX') |
|
|
define(`ASM_START', |
define(`ASM_START', |
`.ident dummy') |
m4_assert_numargs(0) |
|
` .ident dummy') |
|
|
define(`X',`^X$1') |
define(`X', |
|
m4_assert_numargs(1) |
|
`^X$1') |
|
|
define(`FLOAT64', |
define(`FLOAT64', |
`dnl |
m4_assert_numargs(2) |
.psect $1@crud,data |
` .psect $1@crud,data |
$1: .t_floating $2 |
$1: .t_floating $2 |
.endp') |
.endp') |
|
|
define(`PROLOGUE', |
dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo[,gp|noalign]) |
`dnl |
dnl EPILOGUE_cpu(GSYM_PREFIX`'foo) |
|
|
|
define(`PROLOGUE_cpu', |
|
m4_assert_numargs_range(1,2) |
|
`ifelse(`$2',gp,, |
|
`ifelse(`$2',noalign,, |
|
`ifelse(`$2',,,`m4_error(`Unrecognised PROLOGUE parameter |
|
')')')')dnl |
.stack 192 ; What does this mean? Only Cray knows. |
.stack 192 ; What does this mean? Only Cray knows. |
.psect $1@code,code,cache |
.psect $1@code,code,cache |
$1::') |
$1::') |
define(`PROLOGUE_GP', `PROLOGUE($1)') |
|
|
|
define(`EPILOGUE', |
define(`EPILOGUE_cpu', |
`dnl |
m4_assert_numargs(1) |
.endp') |
` .endp') |
|
|
|
dnl Usage: EXTERN(variable_name) |
|
define(`EXTERN', |
|
m4_assert_numargs(1) |
|
` .extern $1') |
|
|
define(`DATASTART', |
define(`DATASTART', |
`dnl |
m4_assert_numargs(1) |
.psect $1@crud,data |
` .psect $1@crud,data |
$1:') |
$1:') |
|
|
define(`DATAEND', |
define(`DATAEND', |
`dnl |
m4_assert_numargs(0) |
.endp') |
` .endp') |
|
|
define(`ASM_END', |
define(`ASM_END', |
`dnl |
m4_assert_numargs(0) |
.end') |
` .end') |
|
|
define(`unop',`bis r31,r31,r31') ; Unicos assembler lacks unop |
dnl Unicos assembler lacks unop |
define(`cvttqc',`cvttq/c') |
define(`unop', |
|
m4_assert_numargs(-1) |
|
`bis r31,r31,r31') |
|
|
define(`ALIGN',`') ; Unicos assembler seems to align using garbage |
define(`cvttqc', |
|
m4_assert_numargs(-1) |
|
`cvttq/c') |
|
|
divert |
dnl Load a symbolic address into a register |
|
define(`LEA', |
|
m4_assert_numargs(2) |
|
`laum $1, $2(r31) |
|
sll $1, 32, $1 |
|
lalm $1, $2($1) |
|
lal $1, $2($1)') |
|
|
|
dnl Need some stuff for extwl just for bigend systems, like Unicos. |
|
define(`bigend', |
|
m4_assert_numargs(1) |
|
`$1') |
|
|
|
dnl Unicos assembler seems to align using garbage, so disable aligning |
|
define(`ALIGN', |
|
m4_assert_numargs(1) |
|
) |
|
|
|
divert |