| 1 |
/* gmp2-2.0.2-ppc/mpn/powerpc-linux/syntax.h Tue Oct 6 19:27:01 1998 */ |
| 2 |
/* From glibc's sysdeps/unix/sysv/linux/powerpc/sysdep.h */ |
| 3 |
|
| 4 |
/* Copyright (C) 1992, 1997, 1998 Free Software Foundation, Inc. |
| 5 |
This file is part of the GNU C Library. |
| 6 |
|
| 7 |
The GNU C Library is free software; you can redistribute it and/or |
| 8 |
modify it under the terms of the GNU Library General Public License as |
| 9 |
published by the Free Software Foundation; either version 2 of the |
| 10 |
License, or (at your option) any later version. |
| 11 |
|
| 12 |
The GNU C Library is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 |
Library General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU Library General Public |
| 18 |
License along with the GNU C Library; see the file COPYING.LIB. If not, |
| 19 |
see <https://www.gnu.org/licenses/>. |
| 20 |
SPDX-License-Identifier: LGPL-2-or-later |
| 21 |
*/ |
| 22 |
|
| 23 |
|
| 24 |
#define USE_PPC_PATCHES 1 |
| 25 |
|
| 26 |
/* This seems to always be the case on PPC. */ |
| 27 |
#define ALIGNARG(log2) log2 |
| 28 |
/* For ELF we need the `.type' directive to make shared libs work right. */ |
| 29 |
#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg; |
| 30 |
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name |
| 31 |
#define ASM_GLOBAL_DIRECTIVE .globl |
| 32 |
|
| 33 |
#ifdef __STDC__ |
| 34 |
#define C_LABEL(name) C_SYMBOL_NAME(name)##: |
| 35 |
#else |
| 36 |
#define C_LABEL(name) C_SYMBOL_NAME(name)/**/: |
| 37 |
#endif |
| 38 |
|
| 39 |
#ifdef __STDC__ |
| 40 |
#define L(body) .L##body |
| 41 |
#else |
| 42 |
#define L(body) .L/**/body |
| 43 |
#endif |
| 44 |
|
| 45 |
/* No profiling of gmp's assembly for now... */ |
| 46 |
#define CALL_MCOUNT /* no profiling */ |
| 47 |
|
| 48 |
#define ENTRY(name) \ |
| 49 |
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ |
| 50 |
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ |
| 51 |
.align ALIGNARG(2); \ |
| 52 |
C_LABEL(name) \ |
| 53 |
CALL_MCOUNT |
| 54 |
|
| 55 |
#define EALIGN_W_0 /* No words to insert. */ |
| 56 |
#define EALIGN_W_1 nop |
| 57 |
#define EALIGN_W_2 nop;nop |
| 58 |
#define EALIGN_W_3 nop;nop;nop |
| 59 |
#define EALIGN_W_4 EALIGN_W_3;nop |
| 60 |
#define EALIGN_W_5 EALIGN_W_4;nop |
| 61 |
#define EALIGN_W_6 EALIGN_W_5;nop |
| 62 |
#define EALIGN_W_7 EALIGN_W_6;nop |
| 63 |
|
| 64 |
/* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes |
| 65 |
past a 2^align boundary. */ |
| 66 |
#define EALIGN(name, alignt, words) \ |
| 67 |
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ |
| 68 |
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ |
| 69 |
.align ALIGNARG(alignt); \ |
| 70 |
EALIGN_W_##words; \ |
| 71 |
C_LABEL(name) |
| 72 |
|
| 73 |
#undef END |
| 74 |
#define END(name) \ |
| 75 |
ASM_SIZE_DIRECTIVE(name) |
| 76 |
|