4 dnl Copyright 2000, 2002, 2003 Free Software Foundation, Inc.
6 dnl This file is part of the GNU MP Library.
8 dnl The GNU MP Library is free software; you can redistribute it and/or
9 dnl modify it under the terms of the GNU Lesser General Public License as
10 dnl published by the Free Software Foundation; either version 3 of the
11 dnl License, or (at your option) any later version.
13 dnl The GNU MP Library is distributed in the hope that it will be useful,
14 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
15 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 dnl Lesser General Public License for more details.
18 dnl You should have received a copy of the GNU Lesser General Public License
19 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
22 dnl ia64 assembler comments are C++ style "//" to the end of line. gas
23 dnl also accepts "#" as a comment, if it's the first non-blank on a line.
25 dnl BSD m4 can't handle a multi-character comment like "//" (see notes in
26 dnl mpn/asm-defs.m4). For now the default "#" is left, but with care taken
27 dnl not to put any macros after "foo#" (since of course they won't expand).
35 dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo)
36 dnl EPILOGUE_cpu(GSYM_PREFIX`'foo)
38 dnl 32-byte alignment is used for the benefit of itanium-2, where the code
39 dnl fetcher will only take 2 bundles from a 32-byte aligned target. At
40 dnl 16mod32 it only reads 1 in the first cycle. This might not make any
41 dnl difference if the rotate buffers are full or there's other work holding
42 dnl up execution, but we use 32-bytes to give the best chance of peak
45 dnl We can use .align here despite the gas bug noted in mpn/ia64/README,
46 dnl since we're not expecting to execute across a PROLOGUE(), at least not
49 define(`PROLOGUE_cpu',
58 define(`EPILOGUE_cpu',
68 define(`DATAEND',`dnl')
70 define(`ASM_END',`dnl')
73 dnl Usage: ALIGN(bytes)
75 dnl Emit a ".align" directive. "bytes" is eval()ed, so can be an
78 dnl This version overrides the definition in mpn/asm-defs.m4. We suppress
79 dnl any .align if the gas byte-swapped-nops bug was detected by configure
80 dnl GMP_ASM_IA64_ALIGN_OK.
84 m4_assert_defined(`IA64_ALIGN_OK')
85 `ifelse(IA64_ALIGN_OK,no,,
89 dnl Usage: ASSERT([pr] [,code])
91 dnl Require that the given predictate register is true after executing the
92 dnl test code. For example,
95 dnl ` cmp.eq p6,p0 = r3, r4')
97 dnl If the predicate register argument is empty then nothing is tested, the
98 dnl code is just executed. This can be used for setups required by later
99 dnl ASSERTs. The code argument can be omitted to just test a predicate
100 dnl with no special setup code.
102 dnl For convenience, stops are inserted before and after the code emitted.
105 m4_assert_numargs_range(1,2)
106 m4_assert_defined(`WANT_ASSERT')
107 `ifelse(WANT_ASSERT,1,
114 `($1) br .LASSERTok`'ASSERT_label_counter ;;
115 cmp.ne p6,p6 = r0, r0 C illegal instruction
117 .LASSERTok`'ASSERT_label_counter:
118 define(`ASSERT_label_counter',eval(ASSERT_label_counter+1))
121 define(`ASSERT_label_counter',1)