📄 pa.h
字号:
/* Definitions of target machine for GNU compiler, for the HP Spectrum. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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 GCC.GCC 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 2, or (at your option)any later version.GCC 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 GCC; see the file COPYING. If not, write tothe Free Software Foundation, 51 Franklin Street, Fifth Floor,Boston, MA 02110-1301, 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 long total_code_bytes;/* Which processor to schedule for. */enum processor_type{ PROCESSOR_700, PROCESSOR_7100, PROCESSOR_7100LC, PROCESSOR_7200, PROCESSOR_7300, PROCESSOR_8000};/* For -mschedule= option. */extern enum processor_type pa_cpu;/* For -munix= option. */extern int flag_pa_unix;#define pa_cpu_attr ((enum attr_cpu)pa_cpu)/* Print subsidiary information on the compiler version in use. */#define TARGET_VERSION fputs (" (hppa)", stderr);#define TARGET_PA_10 (!TARGET_PA_11 && !TARGET_PA_20)/* Generate code for the HPPA 2.0 architecture in 64bit mode. */#ifndef TARGET_64BIT#define TARGET_64BIT 0#endif/* Generate code for ELF32 ABI. */#ifndef TARGET_ELF32#define TARGET_ELF32 0#endif/* Generate code for SOM 32bit ABI. */#ifndef TARGET_SOM#define TARGET_SOM 0#endif/* HP-UX UNIX features. */#ifndef TARGET_HPUX#define TARGET_HPUX 0#endif/* HP-UX 10.10 UNIX 95 features. */#ifndef TARGET_HPUX_10_10#define TARGET_HPUX_10_10 0#endif/* HP-UX 11i multibyte and UNIX 98 extensions. */#ifndef TARGET_HPUX_11_11#define TARGET_HPUX_11_11 0#endif/* The following three defines are potential target switches. The current defines are optimal given the current capabilities of GAS and GNU ld. *//* Define to a C expression evaluating to true to use long absolute calls. Currently, only the HP assembler and SOM linker support long absolute calls. They are used only in non-pic code. */#define TARGET_LONG_ABS_CALL (TARGET_SOM && !TARGET_GAS)/* Define to a C expression evaluating to true to use long pic symbol difference calls. This is a call variant similar to the long pic pc-relative call. Long pic symbol difference calls are only used with the HP SOM linker. Currently, only the HP assembler supports these calls. GAS doesn't allow an arbitrary difference of two symbols. */#define TARGET_LONG_PIC_SDIFF_CALL (!TARGET_GAS)/* Define to a C expression evaluating to true to use long pic pc-relative calls. Long pic pc-relative calls are only used with GAS. Currently, they are usable for calls within a module but not for external calls. */#define TARGET_LONG_PIC_PCREL_CALL 0/* Define to a C expression evaluating to true to use SOM secondary definition symbols for weak support. Linker support for secondary definition symbols is buggy prior to HP-UX 11.X. */#define TARGET_SOM_SDEF 0/* Define to a C expression evaluating to true to save the entry value of SP in the current frame marker. This is normally unnecessary. However, the HP-UX unwind library looks at the SAVE_SP callinfo flag. HP compilers don't use this flag but it is supported by the assembler. We set this flag to indicate that register %r3 has been saved at the start of the frame. Thus, when the HP unwind library is used, we need to generate additional code to save SP into the frame marker. */#define TARGET_HPUX_UNWIND_LIBRARY 0#ifndef TARGET_DEFAULT#define TARGET_DEFAULT (MASK_GAS | MASK_JUMP_IN_DELAY | MASK_BIG_SWITCH)#endif#ifndef TARGET_CPU_DEFAULT#define TARGET_CPU_DEFAULT 0#endif#ifndef TARGET_SCHED_DEFAULT#define TARGET_SCHED_DEFAULT PROCESSOR_8000#endif/* Support for a compile-time default CPU, et cetera. The rules are: --with-schedule is ignored if -mschedule is specified. --with-arch is ignored if -march is specified. */#define OPTION_DEFAULT_SPECS \ {"arch", "%{!march=*:-march=%(VALUE)}" }, \ {"schedule", "%{!mschedule=*:-mschedule=%(VALUE)}" }/* Specify the dialect of assembler to use. New mnemonics is dialect one and the old mnemonics are dialect zero. */#define ASSEMBLER_DIALECT (TARGET_PA_20 ? 1 : 0)#define OVERRIDE_OPTIONS override_options ()/* Override some settings from dbxelf.h. *//* We do not have to be compatible with dbx, so we enable gdb extensions by default. */#define DEFAULT_GDB_EXTENSIONS 1/* This used to be zero (no max length), but big enums and such can cause huge strings which killed gas. We also have to avoid lossage in dbxout.c -- it does not compute the string size accurately, so we are real conservative here. */#undef DBX_CONTIN_LENGTH#define DBX_CONTIN_LENGTH 3000/* 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)))#define TARGET_CPU_CPP_BUILTINS() \do { \ builtin_assert("cpu=hppa"); \ builtin_assert("machine=hppa"); \ builtin_define("__hppa"); \ builtin_define("__hppa__"); \ if (TARGET_PA_20) \ builtin_define("_PA_RISC2_0"); \ else if (TARGET_PA_11) \ builtin_define("_PA_RISC1_1"); \ else \ builtin_define("_PA_RISC1_0"); \} while (0)/* An old set of OS defines for various BSD-like systems. */#define TARGET_OS_CPP_BUILTINS() \ do \ { \ builtin_define_std ("REVARGV"); \ builtin_define_std ("hp800"); \ builtin_define_std ("hp9000"); \ builtin_define_std ("hp9k8"); \ if (!c_dialect_cxx () && !flag_iso) \ builtin_define ("hppa"); \ builtin_define_std ("spectrum"); \ builtin_define_std ("unix"); \ builtin_assert ("system=bsd"); \ builtin_assert ("system=unix"); \ } \ while (0)#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/* This macro defines command-line switches that modify the default target name. The definition is be an initializer for an array of structures. Each array element has have three elements: the switch name, one of the enumeration codes ADD or DELETE to indicate whether the string should be inserted or deleted, and the string to be inserted or deleted. */#define MODIFY_TARGET_NAME {{"-32", DELETE, "64"}, {"-64", ADD, "64"}}/* 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/* target machine storage layout */typedef struct machine_function GTY(()){ /* Flag indicating that a .NSUBSPA directive has been output for this function. */ int in_nsubspa;} machine_function;/* 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) < UNITS_PER_WORD) \ (MODE) = word_mode;/* 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#define MAX_BITS_PER_WORD 64/* Width of a word, in units (bytes). */#define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)/* Minimum number of units in a word. If this is undefined, the default is UNITS_PER_WORD. Otherwise, it is the constant value that is the smallest value that UNITS_PER_WORD can have at run-time. FIXME: This needs to be 4 when TARGET_64BIT is true to suppress the building of various TImode routines in libgcc. The HP runtime specification doesn't provide the alignment requirements and calling conventions for TImode variables. */#define MIN_UNITS_PER_WORD 4/* The widest floating point format supported by the hardware. Note that setting this influences some Ada floating point type sizes, currently required for GNAT to operate properly. */#define WIDEST_HARDWARE_FP_SIZE 64/* Allocation boundary (in *bits*) for storing arguments in argument list. */#define PARM_BOUNDARY BITS_PER_WORD/* Largest alignment required for any stack parameter, in bits. Don't define this if it is equal to PARM_BOUNDARY */#define MAX_PARM_BOUNDARY BIGGEST_ALIGNMENT/* Boundary (in *bits*) on which stack pointer is always aligned; certain optimizations in combine depend on this. The HP-UX runtime documents mandate 64-byte and 16-byte alignment for the stack on the 32 and 64-bit ports, respectively. However, we are only guaranteed that the stack is aligned to BIGGEST_ALIGNMENT in main. Thus, we treat the former as the preferred alignment. */#define STACK_BOUNDARY BIGGEST_ALIGNMENT#define PREFERRED_STACK_BOUNDARY (TARGET_64BIT ? 128 : 512)/* Allocation boundary (in *bits*) for the code of a function. */#define FUNCTION_BOUNDARY BITS_PER_WORD/* 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 bit-field 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 (2 * BITS_PER_WORD)/* Get around hp-ux assembler bug, and make strcpy of constants fast. */#define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \ ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -