pa.h
来自「GCC编译器源代码」· C头文件 代码 · 共 1,751 行 · 第 1/5 页
H
1,751 行
/* Definitions of target machine for GNU compiler, for the HP Spectrum. Copyright (C) 1992, 93, 94, 95, 96, 1997 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 fputs (" (hppa)", stderr);/* 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! This is also used to trigger aggressive unscaled index addressing. */#define TARGET_NO_SPACE_REGS (target_flags & 4)/* Allow unconditional jumps in the delay slots of call instructions. */#define TARGET_JUMP_IN_DELAY (target_flags & 8)/* Optimize for space. Currently this only turns on out of line prologues and epilogues. */#define TARGET_SPACE (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)/* Use 3-insn load/store sequences for access to large data segments in shared libraries on hpux10. */#define TARGET_LONG_LOAD_STORE (target_flags & 512)/* Use a faster sequence for indirect calls. */#define TARGET_FAST_INDIRECT_CALLS (target_flags & 1024)/* Generate code with big switch statements to avoid out of range branches occurring within the switch table. */#define TARGET_BIG_SWITCH (target_flags & 2048)/* 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}, \ {"no-space-regs", 4}, \ {"space-regs", -4}, \ {"jump-in-delay", 8}, \ {"no-jump-in-delay", -8}, \ {"space", 16}, \ {"no-space", -16}, \ {"disable-indexing", 32}, \ {"no-disable-indexing", -32},\ {"portable-runtime", 64}, \ {"no-portable-runtime", -64},\ {"gas", 128}, \ {"no-gas", -128}, \ {"soft-float", 256}, \ {"no-soft-float", -256}, \ {"long-load-store", 512}, \ {"no-long-load-store", -512},\ {"fast-indirect-calls", 1024},\ {"no-fast-indirect-calls", -1024},\ {"big-switch", 2048}, \ {"no-big-switch", -2048}, \ {"linker-opt", 0}, \ { "", TARGET_DEFAULT | TARGET_CPU_DEFAULT}}#ifndef TARGET_DEFAULT#define TARGET_DEFAULT 0x88 /* TARGET_GAS + TARGET_JUMP_IN_DELAY */#endif#ifndef TARGET_CPU_DEFAULT#define TARGET_CPU_DEFAULT 0#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) \ text_section (); \ if (!TARGET_PORTABLE_RUNTIME) \ fputs ("\t.SPACE $TEXT$\n\t.NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY\n", FILE); \ else \ fprintf (FILE, "%s\n", TEXT_SECTION_ASM_OP); \ fprintf (FILE, \ "\t.stabs \"\",%d,0,0,L$text_end0000\nL$text_end0000:\n", N_SO)#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1) == 0#define CPP_SPEC "%{msnake:-D__hp9000s700 -D_PA_RISC1_1}\ %{mpa-risc-1-1:-D__hp9000s700 -D_PA_RISC1_1}\ %{!ansi: -D_HPUX_SOURCE -D_HIUX_SOURCE}"#else#define CPP_SPEC "%{!mpa-risc-1-0:%{!mnosnake:%{!msoft-float:-D__hp9000s700 -D_PA_RISC1_1}}} %{!ansi: -D_HPUX_SOURCE -D_HIUX_SOURCE}"#endif/* Defines for a K&R CC */#define CC1_SPEC "%{pg:} %{p:}"#define LINK_SPEC "%{mlinker-opt:-O} %{!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/* 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 -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" or "static /usr/lib/X11R5/libX11.sl". HPUX 10.20 also has lines like "static branch prediction ..." so we filter that out explicitly. We also try to bound our search for libraries with marker lines. What a pain. */#define PARSE_LDD_OUTPUT(PTR) \do { \ static int in_shlib_list = 0; \ while (*PTR == ' ') PTR++; \ if (strncmp (PTR, "shared library list:", \ sizeof ("shared library list:") - 1) == 0) \ { \ PTR = 0; \ in_shlib_list = 1; \ } \ else if (strncmp (PTR, "shared library binding:", \ sizeof ("shared library binding:") - 1) == 0)\ { \ PTR = 0; \ in_shlib_list = 0; \ } \ else if (strncmp (PTR, "static branch prediction disabled", \ sizeof ("static branch prediction disabled") - 1) == 0)\ { \ PTR = 0; \ in_shlib_list = 0; \ } \ else if (in_shlib_list \ && strncmp (PTR, "dynamic", sizeof ("dynamic") - 1) == 0) \ { \ PTR += sizeof ("dynamic") - 1; \ while (*p == ' ') PTR++; \ } \ else if (in_shlib_list \ && strncmp (PTR, "static", sizeof ("static") - 1) == 0) \ { \ PTR += sizeof ("static") - 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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?