1divert(-1)
2dnl  m4 macros for AIX 32-bit assembly.
3
4dnl  Copyright 2000, 2001, 2002, 2005, 2006 Free Software Foundation, Inc.
5dnl
6dnl  This file is part of the GNU MP Library.
7dnl
8dnl  The GNU MP Library is free software; you can redistribute it and/or
9dnl  modify it under the terms of the GNU Lesser General Public License as
10dnl  published by the Free Software Foundation; either version 3 of the
11dnl  License, or (at your option) any later version.
12dnl
13dnl  The GNU MP Library is distributed in the hope that it will be useful,
14dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
15dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16dnl  Lesser General Public License for more details.
17dnl
18dnl  You should have received a copy of the GNU Lesser General Public License
19dnl  along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.
20
21define(`ASM_START',
22`	.toc')
23
24dnl  Called: PROLOGUE_cpu(GSYM_PREFIX`'foo)
25dnl          EPILOGUE_cpu(GSYM_PREFIX`'foo)
26dnl
27dnl  Don't want ELF style .size in the epilogue.
28
29define(`PROLOGUE_cpu',
30m4_assert_numargs(1)
31	`
32	.globl	$1
33	.globl	.$1
34	.csect	[DS], 2
35$1:
36	.long	.$1, TOC[tc0], 0
37	.csect	[PR]
38	.align	2
39.$1:')
40
41define(`EPILOGUE_cpu',
42m4_assert_numargs(1)
43`')
44
45define(`TOC_ENTRY', `')
46
47define(`LEA',
48m4_assert_numargs(2)
49`define(`TOC_ENTRY',
50`	.toc
51tc$2:
52	.tc	$2[TC], $2')'
53`	lwz	$1, tc$2(2)')
54
55define(`EXTERN',
56m4_assert_numargs(1)
57`	.globl	$1')
58
59define(`DEF_OBJECT',
60m4_assert_numargs_range(1,2)
61`	.csect	[RO], 3
62	ALIGN(ifelse($#,1,2,$2))
63$1:
64')
65
66define(`END_OBJECT',
67m4_assert_numargs(1))
68
69define(`ASM_END', `TOC_ENTRY')
70
71divert
72