📄 pa.h
字号:
/* Definitions of target machine for GNU compiler, for the HP Spectrum. Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) of Cygnus Support and Tim Moore (moore@defmacro.cs.utah.edu) of the Center for Software Science at the University of Utah.This file is part of GNU CC.GNU CC is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 1, or (at your option)any later version.GNU CC is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU CC; see the file COPYING. If not, write tothe Free Software Foundation, 59 Temple Place - Suite 330,Boston, MA 02111-1307, USA. */enum cmp_type /* comparison type */{ CMP_SI, /* compare integers */ CMP_SF, /* compare single precision floats */ CMP_DF, /* compare double precision floats */ CMP_MAX /* max comparison type */};/* For long call handling. */extern unsigned int total_code_bytes;/* Which processor to schedule for. */enum processor_type{ PROCESSOR_700, PROCESSOR_7100, PROCESSOR_7100LC,};#define pa_cpu_attr ((enum attr_cpu)pa_cpu)/* For -mschedule= option. */extern char *pa_cpu_string;extern enum processor_type pa_cpu;/* Print subsidiary information on the compiler version in use. */#define TARGET_VERSION fprintf (stderr, " (hppa)");/* Run-time compilation parameters selecting different hardware subsets. */extern int target_flags;/* compile code for HP-PA 1.1 ("Snake") */#define TARGET_SNAKE (target_flags & 1)/* Disable all FP registers (they all become fixed). This may be necessary for compiling kernels which perform lazy context switching of FP regs. Note if you use this option and try to perform floating point operations the compiler will abort! */#define TARGET_DISABLE_FPREGS (target_flags & 2)/* Generate code which assumes that calls through function pointers will never cross a space boundary. Such assumptions are generally safe for building kernels and statically linked executables. Code compiled with this option will fail miserably if the executable is dynamically linked or uses nested functions! */#define TARGET_FAST_INDIRECT_CALLS (target_flags & 4)/* Allow unconditional jumps in the delay slots of call instructions. */#define TARGET_JUMP_IN_DELAY (target_flags & 8)/* In rare cases, a millicode call via "bl" can not be turned into a millicode call using "ble" (when SHLIB_INFO subspace is very large). This option forces just millicode calls to use inline long-calls This is far more efficient than the old long-call option which forced every function to be called indirectly (as is still the case for TARGET_PORTABLE_RUNTIME). ??? What about simple jumps, they can suffer from the same problem. Would require significant surgery in pa.md. */#define TARGET_MILLICODE_LONG_CALLS (target_flags & 16)/* Disable indexed addressing modes. */#define TARGET_DISABLE_INDEXING (target_flags & 32)/* Emit code which follows the new portable runtime calling conventions HP wants everyone to use for ELF objects. If at all possible you want to avoid this since it's a performance loss for non-prototyped code. Note TARGET_PORTABLE_RUNTIME also forces all calls to use inline long-call stubs which is quite expensive. */#define TARGET_PORTABLE_RUNTIME (target_flags & 64)/* Emit directives only understood by GAS. This allows parameter relocations to work for static functions. There is no way to make them work the HP assembler at this time. */#define TARGET_GAS (target_flags & 128)/* Emit code for processors which do not have an FPU. */#define TARGET_SOFT_FLOAT (target_flags & 256)/* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, each pair being { "NAME", VALUE } where VALUE is the bits to set or minus the bits to clear. An empty string NAME is used to identify the default VALUE. */#define TARGET_SWITCHES \ {{"snake", 1}, \ {"nosnake", -1}, \ {"pa-risc-1-0", -1}, \ {"pa-risc-1-1", 1}, \ {"disable-fpregs", 2}, \ {"no-disable-fpregs", -2}, \ {"fast-indirect-calls", 4}, \ {"no-fast-indirect-calls", -4},\ {"jump-in-delay", 8}, \ {"no-jump-in-delay", -8}, \ {"millicode-long-calls", 16},\ {"no-millicode-long-calls", -16},\ {"disable-indexing", 32}, \ {"no-disable-indexing", -32},\ {"portable-runtime", 64+16},\ {"no-portable-runtime", -(64+16)},\ {"gas", 128}, \ {"no-gas", -128}, \ {"soft-float", 256}, \ {"no-soft-float", -256}, \ { "", TARGET_DEFAULT}}#ifndef TARGET_DEFAULT#define TARGET_DEFAULT 0x88 /* TARGET_GAS + TARGET_JUMP_IN_DELAY */#endif#define TARGET_OPTIONS \{ \ { "schedule=", &pa_cpu_string }\}#define OVERRIDE_OPTIONS override_options ()#define DBX_DEBUGGING_INFO#define DEFAULT_GDB_EXTENSIONS 1/* This is the way other stabs-in-XXX tools do things. We will be compatible. */#define DBX_BLOCKS_FUNCTION_RELATIVE 1/* Likewise for linenos. We make the first line stab special to avoid adding several gross hacks to GAS. */#undef ASM_OUTPUT_SOURCE_LINE#define ASM_OUTPUT_SOURCE_LINE(file, line) \ { static int sym_lineno = 1; \ static tree last_function_decl = NULL; \ if (current_function_decl == last_function_decl) \ fprintf (file, "\t.stabn 68,0,%d,L$M%d-%s\nL$M%d:\n", \ line, sym_lineno, \ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0) + 1, \ sym_lineno); \ else \ fprintf (file, "\t.stabn 68,0,%d,0\n", line); \ last_function_decl = current_function_decl; \ sym_lineno += 1; }/* But, to make this work, we have to output the stabs for the function name *first*... */#define DBX_FUNCTION_FIRST/* Only labels should ever begin in column zero. */#define ASM_STABS_OP "\t.stabs"#define ASM_STABN_OP "\t.stabn"/* GDB always assumes the current function's frame begins at the value of the stack pointer upon entry to the current function. Accessing local variables and parameters passed on the stack is done using the base of the frame + an offset provided by GCC. For functions which have frame pointers this method works fine; the (frame pointer) == (stack pointer at function entry) and GCC provides an offset relative to the frame pointer. This loses for functions without a frame pointer; GCC provides an offset which is relative to the stack pointer after adjusting for the function's frame size. GDB would prefer the offset to be relative to the value of the stack pointer at the function's entry. Yuk! */#define DEBUGGER_AUTO_OFFSET(X) \ ((GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0) \ + (frame_pointer_needed ? 0 : compute_frame_size (get_frame_size (), 0)))#define DEBUGGER_ARG_OFFSET(OFFSET, X) \ ((GET_CODE (X) == PLUS ? OFFSET : 0) \ + (frame_pointer_needed ? 0 : compute_frame_size (get_frame_size (), 0)))/* gdb needs a null N_SO at the end of each file for scattered loading. */#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ fprintf (FILE, \ "%s\n\t.stabs \"%s\",%d,0,0,L$text_end\nL$text_end:\n",\ TEXT_SECTION_ASM_OP, "" , N_SO)#if (TARGET_DEFAULT & 1) == 0#define CPP_SPEC "%{msnake:-D__hp9000s700 -D_PA_RISC1_1}\ %{mpa-risc-1-1:-D__hp9000s700 -D_PA_RISC1_1}"#else#define CPP_SPEC "%{!mpa-risc-1-0:%{!mnosnake:%{!msoft-float:-D__hp9000s700 -D_PA_RISC1_1}}}"#endif/* Defines for a K&R CC */#define CC1_SPEC "%{pg:} %{p:}"#define LINK_SPEC "%{!shared:-u main} %{shared:-b}"/* We don't want -lg. */#ifndef LIB_SPEC#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"#endif/* Allow $ in identifiers. */#define DOLLARS_IN_IDENTIFIERS 2/* Make gcc agree with <machine/ansi.h> */#define SIZE_TYPE "unsigned int"#define PTRDIFF_TYPE "int"#define WCHAR_TYPE "unsigned int"#define WCHAR_TYPE_SIZE 32/* Show we can debug even without a frame pointer. */#define CAN_DEBUG_WITHOUT_FP/* Machine dependent reorg pass. */#define MACHINE_DEPENDENT_REORG(X) pa_reorg(X)/* Names to predefine in the preprocessor for this target machine. */#define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -Dunix -D_HPUX_SOURCE -Dhp9000 -Dhp800 -Dspectrum -DREVARGV -Asystem(unix) -Asystem(bsd) -Acpu(hppa) -Amachine(hppa)"/* HPUX has a program 'chatr' to list the dependencies of dynamically linked executables and shared libraries. */#define LDD_SUFFIX "chatr"/* look for lines like "dynamic /usr/lib/X11R5/libX11.sl". */#define PARSE_LDD_OUTPUT(PTR) \do { \ while (*PTR == ' ') PTR++; \ if (strncmp (PTR, "dynamic", sizeof ("dynamic") - 1) == 0) \ { \ PTR += sizeof ("dynamic") - 1; \ while (*p == ' ') PTR++; \ } \ else \ PTR = 0; \} while (0)/* target machine storage layout *//* Define for cross-compilation from a host with a different float format or endianness (e.g. VAX, x86). */#define REAL_ARITHMETIC/* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, the value is constrained to be within the bounds of the declared type, but kept valid in the wider mode. The signedness of the extension may differ from that of the type. */#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ if (GET_MODE_CLASS (MODE) == MODE_INT \ && GET_MODE_SIZE (MODE) < 4) \ (MODE) = SImode;/* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */#define BITS_BIG_ENDIAN 1/* Define this if most significant byte of a word is the lowest numbered. *//* That is true on the HP-PA. */#define BYTES_BIG_ENDIAN 1/* Define this if most significant word of a multiword number is lowest numbered. */#define WORDS_BIG_ENDIAN 1/* number of bits in an addressable storage unit */#define BITS_PER_UNIT 8/* Width in bits of a "word", which is the contents of a machine register. Note that this is not necessarily the width of data type `int'; if using 16-bit ints on a 68000, this would still be 32. But on a machine with 16-bit registers, this would be 16. */#define BITS_PER_WORD 32/* Width of a word, in units (bytes). */#define UNITS_PER_WORD 4/* Width in bits of a pointer. See also the macro `Pmode' defined below. */#define POINTER_SIZE 32/* Allocation boundary (in *bits*) for storing arguments in argument list. */#define PARM_BOUNDARY 32/* Largest alignment required for any stack parameter, in bits. Don't define this if it is equal to PARM_BOUNDARY */#define MAX_PARM_BOUNDARY 64/* Boundary (in *bits*) on which stack pointer should be aligned. */#define STACK_BOUNDARY 512/* Allocation boundary (in *bits*) for the code of a function. */#define FUNCTION_BOUNDARY 32/* Alignment of field after `int : 0' in a structure. */#define EMPTY_FIELD_BOUNDARY 32/* Every structure's size must be a multiple of this. */#define STRUCTURE_SIZE_BOUNDARY 8/* A bitfield declared as `int' forces `int' alignment for the struct. */#define PCC_BITFIELD_TYPE_MATTERS 1/* No data type wants to be aligned rounder than this. */#define BIGGEST_ALIGNMENT 64/* The .align directive in the HP assembler allows up to a 32 alignment. */#define MAX_OFILE_ALIGNMENT 32768/* Get around hp-ux assembler bug, and make strcpy of constants fast. */#define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \ ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN))/* Make arrays of chars word-aligned for the same reasons. */#define DATA_ALIGNMENT(TYPE, ALIGN) \ (TREE_CODE (TYPE) == ARRAY_TYPE \ && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -