⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pa.h

📁 gcc3.2.1源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Definitions of target machine for GNU compiler, for the HP Spectrum.   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,   2001, 2002 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 2, 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,  PROCESSOR_7200,  PROCESSOR_8000};/* For -mschedule= option.  */extern const char *pa_cpu_string;extern enum processor_type pa_cpu;#define pa_cpu_attr ((enum attr_cpu)pa_cpu)/* Which architecture to generate code for.  */enum architecture_type{  ARCHITECTURE_10,  ARCHITECTURE_11,  ARCHITECTURE_20};struct rtx_def;/* For -march= option.  */extern const char *pa_arch_string;extern enum architecture_type pa_arch;/* 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 MASK_PA_11 1#ifndef TARGET_PA_11#define TARGET_PA_11 (target_flags & MASK_PA_11)#endif/* 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 MASK_DISABLE_FPREGS 2#define TARGET_DISABLE_FPREGS (target_flags & MASK_DISABLE_FPREGS)/* Generate code which assumes that all space register are equivalent.   Triggers aggressive unscaled index addressing and faster   builtin_return_address.  */#define MASK_NO_SPACE_REGS 4#define TARGET_NO_SPACE_REGS (target_flags & MASK_NO_SPACE_REGS)/* Allow unconditional jumps in the delay slots of call instructions.  */#define MASK_JUMP_IN_DELAY 8#define TARGET_JUMP_IN_DELAY (target_flags & MASK_JUMP_IN_DELAY)/* Disable indexed addressing modes.  */#define MASK_DISABLE_INDEXING 32#define TARGET_DISABLE_INDEXING (target_flags & MASK_DISABLE_INDEXING)/* 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 MASK_PORTABLE_RUNTIME 64#define TARGET_PORTABLE_RUNTIME (target_flags & MASK_PORTABLE_RUNTIME)/* 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 MASK_GAS 128#define TARGET_GAS (target_flags & MASK_GAS)/* Emit code for processors which do not have an FPU.  */#define MASK_SOFT_FLOAT 256#define TARGET_SOFT_FLOAT (target_flags & MASK_SOFT_FLOAT)/* Use 3-insn load/store sequences for access to large data segments   in shared libraries on hpux10.  */#define MASK_LONG_LOAD_STORE 512#define TARGET_LONG_LOAD_STORE (target_flags & MASK_LONG_LOAD_STORE)/* Use a faster sequence for indirect calls.  This assumes that calls   through function pointers will never cross a space boundary, and   that the executable is not dynamically linked.  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 MASK_FAST_INDIRECT_CALLS 1024#define TARGET_FAST_INDIRECT_CALLS (target_flags & MASK_FAST_INDIRECT_CALLS)/* Generate code with big switch statements to avoid out of range branches   occurring within the switch table.  */#define MASK_BIG_SWITCH 2048#define TARGET_BIG_SWITCH (target_flags & MASK_BIG_SWITCH)/* Generate code for the HPPA 2.0 architecture.  TARGET_PA_11 should also be   true when this is true.  */#define MASK_PA_20 4096#ifndef TARGET_PA_20#define TARGET_PA_20 (target_flags & MASK_PA_20)#endif/* 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/* 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", MASK_PA_11, "Generate PA1.1 code"},			\   {"nosnake", -(MASK_PA_11 | MASK_PA_20), "Generate PA1.0 code"},		\   {"pa-risc-1-0", -(MASK_PA_11 | MASK_PA_20), "Generate PA1.0 code"},		\   {"pa-risc-1-1", MASK_PA_11, "Generate PA1.1 code"},			\   {"pa-risc-2-0", MASK_PA_20, "Generate PA2.0 code.  This option requires binutils 2.10 or later"},			\   {"disable-fpregs", MASK_DISABLE_FPREGS, "Disable FP regs"},		\   {"no-disable-fpregs", -MASK_DISABLE_FPREGS, "Do not disable FP regs"},\   {"no-space-regs", MASK_NO_SPACE_REGS, "Disable space regs"},		\   {"space-regs", -MASK_NO_SPACE_REGS, "Do not disable space regs"},	\   {"jump-in-delay", MASK_JUMP_IN_DELAY, "Put jumps in call delay slots"},\   {"no-jump-in-delay", -MASK_JUMP_IN_DELAY, "Do not put jumps in call delay slots"},	\   {"disable-indexing", MASK_DISABLE_INDEXING, "Disable indexed addressing"},\   {"no-disable-indexing", -MASK_DISABLE_INDEXING, "Do not disable indexed addressing"},\   {"portable-runtime", MASK_PORTABLE_RUNTIME, "Use portable calling conventions"},	\   {"no-portable-runtime", -MASK_PORTABLE_RUNTIME, "Do not use portable calling conventions"},\   {"gas", MASK_GAS, "Assume code will be assembled by GAS"},		\   {"no-gas", -MASK_GAS, "Do not assume code will be assembled by GAS"},		\   {"soft-float", MASK_SOFT_FLOAT, "Use software floating point"},		\   {"no-soft-float", -MASK_SOFT_FLOAT, "Do not use software floating point"},	\   {"long-load-store", MASK_LONG_LOAD_STORE, "Emit long load/store sequences"},	\   {"no-long-load-store", -MASK_LONG_LOAD_STORE, "Do not emit long load/store sequences"},\   {"fast-indirect-calls", MASK_FAST_INDIRECT_CALLS, "Generate fast indirect calls"},\   {"no-fast-indirect-calls", -MASK_FAST_INDIRECT_CALLS, "Do not generate fast indirect calls"},\   {"big-switch", MASK_BIG_SWITCH, "Generate code for huge switch statements"},	\   {"no-big-switch", -MASK_BIG_SWITCH, "Do not generate code for huge switch statements"},	\   {"linker-opt", 0, "Enable linker optimizations"},		\   { "", TARGET_DEFAULT | TARGET_CPU_DEFAULT, NULL}}#ifndef TARGET_DEFAULT#define TARGET_DEFAULT (MASK_GAS | MASK_JUMP_IN_DELAY)#endif#ifndef TARGET_CPU_DEFAULT#define TARGET_CPU_DEFAULT 0#endif#define TARGET_OPTIONS			\{					\  { "schedule=",	&pa_cpu_string, "Specify CPU for scheduling purposes" },\  { "arch=",		&pa_arch_string, "Specify architecture for code generation.  Values are 1.0, 1.1, and 2.0.  2.0 requires gas snapshot 19990413 or later." }\}/* 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 ()/* stabs-in-som is nearly identical to stabs-in-elf.  To avoid useless   code duplication we simply include this file and override as needed.  */#include "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/* Only labels should ever begin in column zero.  */#define ASM_STABS_OP "\t.stabs\t"#define ASM_STABN_OP "\t.stabn\t"/* 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 CPP_PA10_SPEC ""#define CPP_PA11_SPEC "-D_PA_RISC1_1 -D__hp9000s700"#define CPP_PA20_SPEC "-D_PA_RISC2_0 -D__hp9000s800"#define CPP_64BIT_SPEC "-D__LP64__ -D__LONG_MAX__=9223372036854775807L"#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) == 0#define CPP_CPU_DEFAULT_SPEC "%(cpp_pa10)"#endif#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) != 0#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_20) != 0#define CPP_CPU_DEFAULT_SPEC "%(cpp_pa11) %(cpp_pa20)"#else#define CPP_CPU_DEFAULT_SPEC "%(cpp_pa11)"#endif#endif#if TARGET_64BIT#define CPP_64BIT_DEFAULT_SPEC "%(cpp_64bit)"#else#define CPP_64BIT_DEFAULT_SPEC ""#endif/* This macro defines names of additional specifications to put in the   specs that can be used in various specifications like CC1_SPEC.  Its   definition is an initializer with a subgrouping for each command option.   Each subgrouping contains a string constant, that defines the   specification name, and a string constant that used by the GNU CC driver   program.   Do not define this macro if it does not need to do anything.  */#ifndef SUBTARGET_EXTRA_SPECS#define SUBTARGET_EXTRA_SPECS#endif#define EXTRA_SPECS							\  { "cpp_pa10", CPP_PA10_SPEC},						\  { "cpp_pa11", CPP_PA11_SPEC},						\  { "cpp_pa20", CPP_PA20_SPEC},						\  { "cpp_64bit", CPP_64BIT_SPEC},					\  { "cpp_cpu_default",	CPP_CPU_DEFAULT_SPEC },				\  { "cpp_64bit_default", CPP_64BIT_DEFAULT_SPEC },			\  SUBTARGET_EXTRA_SPECS#define CPP_SPEC "\%{mpa-risc-1-0:%(cpp_pa10)} \%{mpa-risc-1-1:%(cpp_pa11)} \%{msnake:%(cpp_pa11)} \%{mpa-risc-2-0:%(cpp_pa20)} \%{!mpa-risc-1-0:%{!mpa-risc-1-1:%{!mpa-risc-2-0:%{!msnake:%(cpp_cpu_default)}}}} \%{m64bit:%(cpp_64bit)} \%{!m64bit:%(cpp_64bit_default)} \%{!ansi: -D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_EXT__ -D_INCLUDE_LONGLONG} \%{threads: -D_REENTRANT -D_DCE_THREADS}"#define CPLUSPLUS_CPP_SPEC "\-D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_EXT__ -D_INCLUDE_LONGLONG \%{mpa-risc-1-0:%(cpp_pa10)} \%{mpa-risc-1-1:%(cpp_pa11)} \%{msnake:%(cpp_pa11)} \%{mpa-risc-2-0:%(cpp_pa20)} \%{!mpa-risc-1-0:%{!mpa-risc-1-1:%{!mpa-risc-2-0:%{!msnake:%(cpp_cpu_default)}}}} \%{m64bit:%(cpp_64bit)} \%{!m64bit:%(cpp_64bit_default)} \%{threads: -D_REENTRANT -D_DCE_THREADS}"/* 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -