3 dnl m4 macros for Alpha assembler.
5 dnl Copyright 2003, 2004 Free Software Foundation, Inc.
7 dnl This file is part of the GNU MP Library.
9 dnl The GNU MP Library is free software; you can redistribute it and/or modify
10 dnl it under the terms of either:
12 dnl * the GNU Lesser General Public License as published by the Free
13 dnl Software Foundation; either version 3 of the License, or (at your
14 dnl option) any later version.
18 dnl * the GNU General Public License as published by the Free Software
19 dnl Foundation; either version 2 of the License, or (at your option) any
22 dnl or both in parallel, as here.
24 dnl The GNU MP Library is distributed in the hope that it will be useful, but
25 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
26 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
29 dnl You should have received copies of the GNU General Public License and the
30 dnl GNU Lesser General Public License along with the GNU MP Library. If not,
31 dnl see https://www.gnu.org/licenses/.
34 dnl Usage: ASSERT([reg] [,code])
36 dnl Require that the given reg is non-zero after executing the test code.
40 dnl ` cmpult r16, r17, r8')
42 dnl If the register argument is empty then nothing is tested, the code is
43 dnl just executed. This can be used for setups required by later ASSERTs.
44 dnl If the code argument is omitted then the register is just tested, with
45 dnl no special setup code.
48 m4_assert_numargs_range(1,2)
49 m4_assert_defined(`WANT_ASSERT')
50 `ifelse(WANT_ASSERT,1,
53 ` bne $1, L(ASSERTok`'ASSERT_label_counter)
55 L(ASSERTok`'ASSERT_label_counter):
56 define(`ASSERT_label_counter',eval(ASSERT_label_counter+1))
59 define(`ASSERT_label_counter',1)
62 dnl Usage: bigend(`code')
64 dnl Emit the given code only for a big-endian system, like Unicos. This
65 dnl can be used for instance for extra stuff needed by extwl.
69 `ifdef(`HAVE_LIMB_BIG_ENDIAN',`$1',
70 `ifdef(`HAVE_LIMB_LITTLE_ENDIAN',`',
71 `m4_error(`Cannot assemble, unknown limb endianness')')')')
74 dnl Usage: bwx_available_p
76 dnl Evaluate to 1 if the BWX byte memory instructions are available, or to
79 dnl Listing the chips which do have BWX means anything we haven't looked at
80 dnl will use safe non-BWX code. The only targets without BWX currently are
81 dnl plain alpha (ie. ev4) and alphaev5.
83 define(bwx_available_p,
86 `HAVE_HOST_CPU_alphaev56',
87 `HAVE_HOST_CPU_alphapca56',
88 `HAVE_HOST_CPU_alphapca57',
89 `HAVE_HOST_CPU_alphaev6',
90 `HAVE_HOST_CPU_alphaev67',
91 `HAVE_HOST_CPU_alphaev68',
92 `HAVE_HOST_CPU_alphaev69',
93 `HAVE_HOST_CPU_alphaev7',
94 `HAVE_HOST_CPU_alphaev79')')
99 dnl The Cray Unicos assembler lacks unop, so give the equivalent ldq_u
103 m4_assert_numargs(-1)