beta-0.89.2
[luatex.git] / source / libs / gmp / gmp-src / mpn / mips32 / mips.m4
blob8b49e575e412b8c01469a8fc03eabcc600f9415a
1 divert(-1)
3 dnl  m4 macros for MIPS assembly code.
6 dnl  Copyright 2000-2002 Free Software Foundation, Inc.
7 dnl
8 dnl  This file is part of the GNU MP Library.
9 dnl
10 dnl  The GNU MP Library is free software; you can redistribute it and/or modify
11 dnl  it under the terms of either:
12 dnl
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.
16 dnl
17 dnl  or
18 dnl
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
21 dnl      later version.
22 dnl
23 dnl  or both in parallel, as here.
24 dnl
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
28 dnl  for more details.
29 dnl
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  Usage: ASM_START()
36 define(`ASM_START',
37 m4_assert_numargs(0)
38 `       .set noreorder
39         .set nomacro')
41 dnl  Usage: X(value)
42 define(`X',
43 m4_assert_numargs(1)
44 `0x$1')
46 dnl  Called: PROLOGUE_cpu(GSYM_PREFIX`'foo)
47 dnl          EPILOGUE_cpu(GSYM_PREFIX`'foo)
49 define(`PROLOGUE_cpu',
50 m4_assert_numargs(1)
51 `       .text
52         .align  4
53         .globl  $1
54         .ent    $1
55 $1:')
57 define(`EPILOGUE_cpu',
58 m4_assert_numargs(1)
59 `       .end    $1')
62 dnl  Usage: r0 ... r31
63 dnl         f0 ... f31
64 dnl
65 dnl  Map register names r0 to $0, and f0 to $f0, etc.
66 dnl
67 dnl  defreg() is used to protect the $ in $0 (otherwise it would represent a
68 dnl  macro argument).  Double quoting is used to protect the f0 in $f0
69 dnl  (otherwise it would be an infinite recursion).
71 forloop(i,0,31,`defreg(`r'i,$i)')
72 forloop(i,0,31,`deflit(`f'i,``$f''i)')
75 dnl  Usage: ASM_END()
76 define(`ASM_END',
77 m4_assert_numargs(0)
80 divert