| xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 1 | /* Assembler macros for HP/PA. | 
|  | 2 | Copyright (C) 1999-2016 Free Software Foundation, Inc. | 
|  | 3 | This file is part of the GNU C Library. | 
|  | 4 | Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999. | 
|  | 5 |  | 
|  | 6 | The GNU C Library is free software; you can redistribute it and/or | 
|  | 7 | modify it under the terms of the GNU Lesser General Public | 
|  | 8 | License as published by the Free Software Foundation; either | 
|  | 9 | version 2.1 of the License, or (at your option) any later version. | 
|  | 10 |  | 
|  | 11 | The GNU C Library is distributed in the hope that it will be useful, | 
|  | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
|  | 14 | Lesser General Public License for more details. | 
|  | 15 |  | 
|  | 16 | You should have received a copy of the GNU Lesser General Public | 
|  | 17 | License along with the GNU C Library.  If not, see | 
|  | 18 | <http://www.gnu.org/licenses/>.  */ | 
|  | 19 |  | 
|  | 20 | #include <sysdeps/generic/sysdep.h> | 
|  | 21 |  | 
|  | 22 | #undef ASM_LINE_SEP | 
|  | 23 | #define ASM_LINE_SEP ! | 
|  | 24 |  | 
|  | 25 | #ifdef	__ASSEMBLER__ | 
|  | 26 |  | 
|  | 27 | /* Syntactic details of assembler.  */ | 
|  | 28 |  | 
|  | 29 | #define ALIGNARG(log2) log2 | 
|  | 30 |  | 
|  | 31 |  | 
|  | 32 | /* Define an entry point visible from C. | 
|  | 33 |  | 
|  | 34 | There is currently a bug in gdb which prevents us from specifying | 
|  | 35 | incomplete stabs information.  Fake some entries here which specify | 
|  | 36 | the current source file.  */ | 
|  | 37 | #define	ENTRY(name)							      \ | 
|  | 38 | .SPACE $TEXT$							ASM_LINE_SEP  \ | 
|  | 39 | .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY		ASM_LINE_SEP  \ | 
|  | 40 | .align ALIGNARG(4)						ASM_LINE_SEP  \ | 
|  | 41 | .NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY		ASM_LINE_SEP  \ | 
|  | 42 | .EXPORT C_SYMBOL_NAME(name),ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR ASM_LINE_SEP\ | 
|  | 43 | C_LABEL(name)								      \ | 
|  | 44 | CALL_MCOUNT | 
|  | 45 |  | 
|  | 46 | #undef	END | 
|  | 47 | #define END(name)							      \ | 
|  | 48 | .PROCEND | 
|  | 49 |  | 
|  | 50 | /* GCC does everything for us. */ | 
|  | 51 | #ifdef	PROF | 
|  | 52 | #define CALL_MCOUNT | 
|  | 53 | #else | 
|  | 54 | #define CALL_MCOUNT		/* Do nothing.  */ | 
|  | 55 | #endif | 
|  | 56 |  | 
|  | 57 | #define	PSEUDO(name, syscall_name, args)				      \ | 
|  | 58 | ENTRY (name)								      \ | 
|  | 59 | DO_CALL (syscall_name, args) | 
|  | 60 |  | 
|  | 61 | #undef	PSEUDO_END | 
|  | 62 | #define	PSEUDO_END(name)						      \ | 
|  | 63 | END (name) | 
|  | 64 |  | 
|  | 65 | #undef JUMPTARGET | 
|  | 66 | #define JUMPTARGET(name)	name | 
|  | 67 | #define SYSCALL_PIC_SETUP	/* Nothing.  */ | 
|  | 68 |  | 
|  | 69 | /* Local label name for asm code. */ | 
|  | 70 | #ifndef L | 
|  | 71 | #define L(name)		name | 
|  | 72 | #endif | 
|  | 73 |  | 
|  | 74 | #endif	/* __ASSEMBLER__ */ |