📄 frv.h
字号:
in the definitions of the other macros in the `MACHINE.h' file. */#define MASK_GPR_32 0x00000001 /* Limit gprs to 32 registers */#define MASK_FPR_32 0x00000002 /* Limit fprs to 32 registers */#define MASK_SOFT_FLOAT 0x00000004 /* Use software floating point */#define MASK_ALLOC_CC 0x00000008 /* Dynamically allocate icc/fcc's */#define MASK_DWORD 0x00000010 /* Change ABi to allow dbl word insns*/#define MASK_DOUBLE 0x00000020 /* Use double precision instructions */#define MASK_MEDIA 0x00000040 /* Use media instructions */#define MASK_MULADD 0x00000080 /* Use multiply add/subtract insns */#define MASK_LIBPIC 0x00000100 /* -fpic that can be linked w/o pic */#define MASK_ACC_4 0x00000200 /* Only use four media accumulators */#define MASK_PACK 0x00000400 /* Set to enable packed output */#define MASK_LONG_CALLS 0x00000800 /* Use indirect calls */#define MASK_ALIGN_LABELS 0x00001000 /* Optimize label alignments */#define MASK_LINKED_FP 0x00002000 /* Follow ABI linkage requirements. */#define MASK_BIG_TLS 0x00008000 /* Assume a big TLS segment */ /* put debug masks up high */#define MASK_DEBUG_ARG 0x40000000 /* debug argument handling */#define MASK_DEBUG_ADDR 0x20000000 /* debug go_if_legitimate_address */#define MASK_DEBUG_STACK 0x10000000 /* debug stack frame */#define MASK_DEBUG 0x08000000 /* general debugging switch */#define MASK_DEBUG_LOC 0x04000000 /* optimize line # table */#define MASK_DEBUG_COND_EXEC 0x02000000 /* debug cond exec code */#define MASK_NO_COND_MOVE 0x01000000 /* disable conditional moves */#define MASK_NO_SCC 0x00800000 /* disable set conditional codes */#define MASK_NO_COND_EXEC 0x00400000 /* disable conditional execution */#define MASK_NO_VLIW_BRANCH 0x00200000 /* disable repacking branches */#define MASK_NO_MULTI_CE 0x00100000 /* disable multi-level cond exec */#define MASK_NO_NESTED_CE 0x00080000 /* disable nested cond exec */#define MASK_FDPIC 0x00040000 /* Follow the new uClinux ABI. */#define MASK_INLINE_PLT 0x00020000 /* Inline FDPIC PLTs. */#define MASK_GPREL_RO 0x00010000 /* Use GPREL for read-only data. */#define MASK_DEFAULT MASK_DEFAULT_ALLOC_CC#define TARGET_GPR_32 ((target_flags & MASK_GPR_32) != 0)#define TARGET_FPR_32 ((target_flags & MASK_FPR_32) != 0)#define TARGET_SOFT_FLOAT ((target_flags & MASK_SOFT_FLOAT) != 0)#define TARGET_ALLOC_CC ((target_flags & MASK_ALLOC_CC) != 0)#define TARGET_DWORD ((target_flags & MASK_DWORD) != 0)#define TARGET_DOUBLE ((target_flags & MASK_DOUBLE) != 0)#define TARGET_MEDIA ((target_flags & MASK_MEDIA) != 0)#define TARGET_MULADD ((target_flags & MASK_MULADD) != 0)#define TARGET_LIBPIC ((target_flags & MASK_LIBPIC) != 0)#define TARGET_ACC_4 ((target_flags & MASK_ACC_4) != 0)#define TARGET_DEBUG_ARG ((target_flags & MASK_DEBUG_ARG) != 0)#define TARGET_DEBUG_ADDR ((target_flags & MASK_DEBUG_ADDR) != 0)#define TARGET_DEBUG_STACK ((target_flags & MASK_DEBUG_STACK) != 0)#define TARGET_DEBUG ((target_flags & MASK_DEBUG) != 0)#define TARGET_DEBUG_LOC ((target_flags & MASK_DEBUG_LOC) != 0)#define TARGET_DEBUG_COND_EXEC ((target_flags & MASK_DEBUG_COND_EXEC) != 0)#define TARGET_NO_COND_MOVE ((target_flags & MASK_NO_COND_MOVE) != 0)#define TARGET_NO_SCC ((target_flags & MASK_NO_SCC) != 0)#define TARGET_NO_COND_EXEC ((target_flags & MASK_NO_COND_EXEC) != 0)#define TARGET_NO_VLIW_BRANCH ((target_flags & MASK_NO_VLIW_BRANCH) != 0)#define TARGET_NO_MULTI_CE ((target_flags & MASK_NO_MULTI_CE) != 0)#define TARGET_NO_NESTED_CE ((target_flags & MASK_NO_NESTED_CE) != 0)#define TARGET_FDPIC ((target_flags & MASK_FDPIC) != 0)#define TARGET_INLINE_PLT ((target_flags & MASK_INLINE_PLT) != 0)#define TARGET_BIG_TLS ((target_flags & MASK_BIG_TLS) != 0)#define TARGET_GPREL_RO ((target_flags & MASK_GPREL_RO) != 0)#define TARGET_PACK ((target_flags & MASK_PACK) != 0)#define TARGET_LONG_CALLS ((target_flags & MASK_LONG_CALLS) != 0)#define TARGET_ALIGN_LABELS ((target_flags & MASK_ALIGN_LABELS) != 0)#define TARGET_LINKED_FP ((target_flags & MASK_LINKED_FP) != 0)#define TARGET_GPR_64 (! TARGET_GPR_32)#define TARGET_FPR_64 (! TARGET_FPR_32)#define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT)#define TARGET_FIXED_CC (! TARGET_ALLOC_CC)#define TARGET_COND_MOVE (! TARGET_NO_COND_MOVE)#define TARGET_SCC (! TARGET_NO_SCC)#define TARGET_COND_EXEC (! TARGET_NO_COND_EXEC)#define TARGET_VLIW_BRANCH (! TARGET_NO_VLIW_BRANCH)#define TARGET_MULTI_CE (! TARGET_NO_MULTI_CE)#define TARGET_NESTED_CE (! TARGET_NO_NESTED_CE)#define TARGET_ACC_8 (! TARGET_ACC_4)#define TARGET_HAS_FPRS (TARGET_HARD_FLOAT || TARGET_MEDIA)#define NUM_GPRS (TARGET_GPR_32? 32 : 64)#define NUM_FPRS (!TARGET_HAS_FPRS? 0 : TARGET_FPR_32? 32 : 64)#define NUM_ACCS (!TARGET_MEDIA? 0 : TARGET_ACC_4? 4 : 8)/* X is a valid accumulator number if (X & ACC_MASK) == X. */#define ACC_MASK \ (!TARGET_MEDIA ? 0 \ : TARGET_ACC_4 ? 3 \ : frv_cpu_type == FRV_CPU_FR450 ? 11 \ : 7)/* Macros to identify the blend of media instructions available. Revision 1 is the one found on the FR500. Revision 2 includes the changes made for the FR400. Treat the generic processor as a revision 1 machine for now, for compatibility with earlier releases. */#define TARGET_MEDIA_REV1 \ (TARGET_MEDIA \ && (frv_cpu_type == FRV_CPU_GENERIC \ || frv_cpu_type == FRV_CPU_FR500))#define TARGET_MEDIA_REV2 \ (TARGET_MEDIA \ && (frv_cpu_type == FRV_CPU_FR400 \ || frv_cpu_type == FRV_CPU_FR405 \ || frv_cpu_type == FRV_CPU_FR450 \ || frv_cpu_type == FRV_CPU_FR550))#define TARGET_MEDIA_FR450 \ (frv_cpu_type == FRV_CPU_FR450)#define TARGET_FR500_FR550_BUILTINS \ (frv_cpu_type == FRV_CPU_FR500 \ || frv_cpu_type == FRV_CPU_FR550)#define TARGET_FR405_BUILTINS \ (frv_cpu_type == FRV_CPU_FR405 \ || frv_cpu_type == FRV_CPU_FR450)#ifndef HAVE_AS_TLS#define HAVE_AS_TLS 0#endif/* This macro defines names of command options to set and clear bits in `target_flags'. Its definition is an initializer with a subgrouping for each command option. Each subgrouping contains a string constant, that defines the option name, a number, which contains the bits to set in `target_flags', and an optional second string which is the textual description that will be displayed when the user passes --help on the command line. If the number entry is negative then the specified bits will be cleared instead of being set. If the second string entry is present but empty, then no help information will be displayed for that option, but it will not count as an undocumented option. The actual option name, asseen on the command line is made by appending `-m' to the specified name. One of the subgroupings should have a null string. The number in this grouping is the default value for `target_flags'. Any target options act starting with that value. Here is an example which defines `-m68000' and `-m68020' with opposite meanings, and picks the latter as the default: #define TARGET_SWITCHES \ { { "68020", 1, ""}, \ { "68000", -1, "Compile for the m68000"}, \ { "", 1, }} This declaration must be present. */#define TARGET_SWITCHES \{{ "gpr-32", MASK_GPR_32, "Only use 32 gprs"}, \ { "gpr-64", -MASK_GPR_32, "Use 64 gprs"}, \ { "fpr-32", MASK_FPR_32, "Only use 32 fprs"}, \ { "fpr-64", -MASK_FPR_32, "Use 64 fprs"}, \ { "hard-float", -MASK_SOFT_FLOAT, "Use hardware floating point" },\ { "soft-float", MASK_SOFT_FLOAT, "Use software floating point" },\ { "alloc-cc", MASK_ALLOC_CC, "Dynamically allocate cc's" }, \ { "fixed-cc", -MASK_ALLOC_CC, "Just use icc0/fcc0" }, \ { "dword", MASK_DWORD, "Change ABI to allow double word insns" }, \ { "no-dword", -MASK_DWORD, "Do not use double word insns" }, \ { "double", MASK_DOUBLE, "Use fp double instructions" }, \ { "no-double", -MASK_DOUBLE, "Do not use fp double insns" }, \ { "media", MASK_MEDIA, "Use media instructions" }, \ { "no-media", -MASK_MEDIA, "Do not use media insns" }, \ { "muladd", MASK_MULADD, "Use multiply add/subtract instructions" }, \ { "no-muladd", -MASK_MULADD, "Do not use multiply add/subtract insns" }, \ { "ultilib-library-pic", 0, "Link with the library-pic libraries" }, \ { "library-pic", MASK_LIBPIC, "PIC support for building libraries" }, \ { "acc-4", MASK_ACC_4, "Use 4 media accumulators" }, \ { "acc-8", -MASK_ACC_4, "Use 8 media accumulators" }, \ { "pack", MASK_PACK, "Pack VLIW instructions" }, \ { "no-pack", -MASK_PACK, "Do not pack VLIW instructions" }, \ { "no-eflags", 0, "Do not mark ABI switches in e_flags" }, \ { "debug-arg", MASK_DEBUG_ARG, "Internal debug switch" }, \ { "debug-addr", MASK_DEBUG_ADDR, "Internal debug switch" }, \ { "debug-stack", MASK_DEBUG_STACK, "Internal debug switch" }, \ { "debug", MASK_DEBUG, "Internal debug switch" }, \ { "debug-cond-exec", MASK_DEBUG_COND_EXEC, "Internal debug switch" }, \ { "debug-loc", MASK_DEBUG_LOC, "Internal debug switch" }, \ { "align-labels", MASK_ALIGN_LABELS, "Enable label alignment optimizations" }, \ { "no-align-labels", -MASK_ALIGN_LABELS, "Disable label alignment optimizations" }, \ { "cond-move", -MASK_NO_COND_MOVE, "Enable conditional moves" }, \ { "no-cond-move", MASK_NO_COND_MOVE, "Disable conditional moves" }, \ { "scc", -MASK_NO_SCC, "Enable setting gprs to the result of comparisons" }, \ { "no-scc", MASK_NO_SCC, "Disable setting gprs to the result of comparisons" }, \ { "cond-exec", -MASK_NO_COND_EXEC, "Enable conditional execution other than moves/scc" }, \ { "no-cond-exec", MASK_NO_COND_EXEC, "Disable conditional execution other than moves/scc" }, \ { "vliw-branch", -MASK_NO_VLIW_BRANCH, "Run pass to pack branches into VLIW insns" }, \ { "no-vliw-branch", MASK_NO_VLIW_BRANCH, "Do not run pass to pack branches into VLIW insns" }, \ { "multi-cond-exec", -MASK_NO_MULTI_CE, "Disable optimizing &&/|| in conditional execution" }, \ { "no-multi-cond-exec", MASK_NO_MULTI_CE, "Enable optimizing &&/|| in conditional execution" }, \ { "nested-cond-exec", -MASK_NO_NESTED_CE, "Enable nested conditional execution optimizations" }, \ { "no-nested-cond-exec" ,MASK_NO_NESTED_CE, "Disable nested conditional execution optimizations" }, \ { "long-calls", MASK_LONG_CALLS, "Disallow direct calls to global functions" }, \ { "no-long-calls", -MASK_LONG_CALLS, "Allow direct calls to global functions" }, \ { "linked-fp", MASK_LINKED_FP, "Follow the EABI linkage requirements" }, \ { "no-linked-fp", -MASK_LINKED_FP, "Don't follow the EABI linkage requirements" }, \ { "fdpic", MASK_FDPIC, "Enable file descriptor PIC mode" }, \ { "no-fdpic", -MASK_FDPIC, "Disable file descriptor PIC mode" }, \ { "inline-plt", MASK_INLINE_PLT, "Enable inlining of PLT in function calls" }, \ { "no-inline-plt", -MASK_INLINE_PLT, "Disable inlining of PLT in function calls" }, \ { "TLS", MASK_BIG_TLS, "Assume a large TLS segment" }, \ { "tls", -MASK_BIG_TLS, "Do not assume a large TLS segment" }, \ { "gprel-ro", MASK_GPREL_RO, "Enable use of GPREL for read-only data in FDPIC" }, \ { "no-gprel-ro", -MASK_GPREL_RO, "Disable use of GPREL for read-only data in FDPIC" }, \ { "tomcat-stats", 0, "Cause gas to print tomcat statistics" }, \ { "", MASK_DEFAULT, "" }} \/* This macro is similar to `TARGET_SWITCHES' but defines names of command options that have values. Its definition is an initializer with a subgrouping for each command option. Each subgrouping contains a string constant, that defines the fixed part of the option name, the address of a variable, and an optional description string. The variable, of type `char *', is set to the text following the fixed part of the option as it is specified on the command line. The actual option name is made by appending `-m' to the specified name. Here is an example which defines `-mshort-data-NUMBER'. If the given option is `-mshort-data-512', the variable `m88k_short_data' will be set to the string `"512"'. extern char *m88k_short_data; #define TARGET_OPTIONS \ { { "short-data-", & m88k_short_data, \ "Specify the size of the short data section" } } This declaration is optional. */#define TARGET_OPTIONS \{ \ { "cpu=", &frv_cpu_string, "Set cpu type", 0}, \ { "branch-cost=", &frv_branch_cost_string, "Internal debug switch", 0}, \ { "cond-exec-insns=", &frv_condexec_insns_str, "Internal debug switch", 0}, \ { "cond-exec-temps=", &frv_condexec_temps_str, "Internal debug switch", 0}, \ { "sched-lookahead=", &frv_sched_lookahead_str,"Internal debug switch", 0}, \}/* This macro is a C statement to print on `stderr' a string describing the particular machine description choice. Every machine description should define `TARGET_VERSION'. For example: #ifdef MOTOROLA #define TARGET_VERSION \ fprintf (stderr, " (68k, Motorola syntax)"); #else #define TARGET_VERSION \ fprintf (stderr, " (68k, MIT syntax)"); #endif */#define TARGET_VERSION fprintf (stderr, _(" (frv)"))/* Sometimes certain combinations of command options do not make sense on a particular target machine. You can define a macro `OVERRIDE_OPTIONS' to take account of this. This macro, if defined, is executed once just after all the command options have been parsed. Don't use this macro to turn on various extra optimizations for `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */#define OVERRIDE_OPTIONS frv_override_options ()/* Some machines may desire to change what optimizations are performed for various optimization levels. This macro, if defined, is executed once just after the optimization level is determined and before the remainder of the command options have been parsed. Values set in this macro are used as the default values for the other command line options. LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if `-O' is specified, and 0 if neither is specified. SIZE is nonzero if `-Os' is specified, 0 otherwise. You should not use this macro to change options that are not machine-specific. These should uniformly selected by the same optimization level on all supported machines. Use this macro to enable machbine-specific optimizations. *Do not examine `write_symbols' in this macro!* The debugging options are *not supposed to alter the generated code. */#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) frv_optimization_options (LEVEL, SIZE)/* Define this macro if debugging can be performed even without a frame pointer. If this macro is defined, GCC will turn on the `-fomit-frame-pointer' option whenever `-O' is specified. *//* Frv needs a specific frame layout that includes the frame pointer. */#define CAN_DEBUG_WITHOUT_FP#define LABEL_ALIGN_AFTER_BARRIER(LABEL) (TARGET_ALIGN_LABELS ? 3 : 0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -