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

📄 pdp11.h

📁 linux下的gcc编译器
💻 H
📖 第 1 页 / 共 3 页
字号:
#define CASE_TAKES_INDEX_RAW/* Define as C expression which evaluates to nonzero if the tablejump   instruction expects the table to contain offsets from the address of the   table.   Do not define this if the table should contain absolute addresses. *//* #define CASE_VECTOR_PC_RELATIVE 1 *//* Define this as 1 if `char' should by default be signed; else as 0.  */#define DEFAULT_SIGNED_CHAR 1/* Max number of bytes we can move from memory to memory   in one reasonably fast instruction.  */#define MOVE_MAX 2/* Nonzero if access to memory by byte is slow and undesirable. -*/#define SLOW_BYTE_ACCESS 0/* Do not break .stabs pseudos into continuations.  */#define DBX_CONTIN_LENGTH 0/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits   is done just by pretending it is already truncated.  */#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1/* Give a comparison code (EQ, NE etc) and the first operand of a COMPARE,   return the mode to be used for the comparison.  For floating-point, CCFPmode   should be used. */#define SELECT_CC_MODE(OP,X,Y)	\(GET_MODE_CLASS(GET_MODE(X)) == MODE_FLOAT? CCFPmode : CCmode)/* We assume that the store-condition-codes instructions store 0 for false   and some other value for true.  This is the value stored for true.  *//* #define STORE_FLAG_VALUE 1 *//* Specify the machine mode that pointers have.   After generation of rtl, the compiler makes no further distinction   between pointers and any other objects of this machine mode.  */#define Pmode HImode/* A function address in a call instruction   is a word address (for indexing purposes)   so give the MEM rtx a word's mode.  */#define FUNCTION_MODE HImode/* Define this if addresses of constant functions   shouldn't be put through pseudo regs where they can be cse'd.   Desirable on machines where ordinary constants are expensive   but a CALL with constant address is cheap.  *//* #define NO_FUNCTION_CSE *//* Compute the cost of computing a constant rtl expression RTX   whose rtx-code is CODE.  The body of this macro is a portion   of a switch statement.  If the code is computed here,   return it with a return statement.  Otherwise, break from the switch.    -1, 0, 1 are cheaper for add, sub ... */#define CONST_COSTS(RTX,CODE,OUTER_CODE) \  case CONST_INT:						\    if (INTVAL(RTX) == 0					\	|| INTVAL(RTX) == -1					\	|| INTVAL(RTX) == 1)					\      return 0;							\  case CONST:							\  case LABEL_REF:						\  case SYMBOL_REF:						\    /* twice as expensive as REG */				\    return 2;							\  case CONST_DOUBLE:						\    /* twice (or 4 times) as expensive as 16 bit */		\    return 4;/* cost of moving one register class to another */#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \  register_move_cost (CLASS1, CLASS2)/* Tell emit-rtl.c how to initialize special values on a per-function base.  */extern int optimize;extern struct rtx_def *cc0_reg_rtx;#define CC_STATUS_MDEP rtx#define CC_STATUS_MDEP_INIT (cc_status.mdep = 0)/* Tell final.c how to eliminate redundant test instructions.  *//* Here we define machine-dependent flags and fields in cc_status   (see `conditions.h').  */#define CC_IN_FPU 04000 /* Do UPDATE_CC if EXP is a set, used in   NOTICE_UPDATE_CC    floats only do compare correctly, else nullify ...   get cc0 out soon ...*//* Store in cc_status the expressions   that the condition codes will describe   after execution of an instruction whose pattern is EXP.   Do not alter them if the instruction would not alter the cc's.  */#define NOTICE_UPDATE_CC(EXP, INSN) \{ if (GET_CODE (EXP) == SET)					\    {								\      notice_update_cc_on_set(EXP, INSN);			\    }								\  else if (GET_CODE (EXP) == PARALLEL				\	   && GET_CODE (XVECEXP (EXP, 0, 0)) == SET)		\    {								\      notice_update_cc_on_set(XVECEXP (EXP, 0, 0), INSN);	\    }								\  else if (GET_CODE (EXP) == CALL)				\    { /* all bets are off */ CC_STATUS_INIT; }			\  if (cc_status.value1 && GET_CODE (cc_status.value1) == REG	\      && cc_status.value2					\      && reg_overlap_mentioned_p (cc_status.value1, cc_status.value2)) \    { 								\      printf ("here!\n");					\      cc_status.value2 = 0;					\    }								\}/* Control the assembler format that we output.  *//* Output at beginning of assembler file.  */#if 0#define ASM_FILE_START(FILE) \(								\fprintf (FILE, "\t.data\n"),					\fprintf (FILE, "$help$: . = .+8 ; space for tmp moves!\n")	\/* do we need reg def's R0 = %0 etc ??? */			\)#else#define ASM_FILE_START(FILE)#endif/* Output to assembler file text saying following lines   may contain character constants, extra white space, comments, etc.  */#define ASM_APP_ON ""/* Output to assembler file text saying following lines   no longer contain unusual constructs.  */#define ASM_APP_OFF ""/* Output before read-only data.  */#define TEXT_SECTION_ASM_OP "\t.text\n"/* Output before writable data.  */#define DATA_SECTION_ASM_OP "\t.data\n"/* How to refer to registers in assembler output.   This sequence is indexed by compiler's hard-register-number (see above).  */#define REGISTER_NAMES \{"r0", "r1", "r2", "r3", "r4", "r5", "sp", "pc",     \ "ac0", "ac1", "ac2", "ac3", "ac4", "ac5" }/* Globalizing directive for a label.  */#define GLOBAL_ASM_OP "\t.globl "/* The prefix to add to user-visible assembler symbols. */#define USER_LABEL_PREFIX "_"/* This is how to output an internal numbered label where   PREFIX is the class of label and NUM is the number within the class.  */#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\  fprintf (FILE, "%s_%d:\n", PREFIX, NUM)/* This is how to store into the string LABEL   the symbol_ref name of an internal numbered label where   PREFIX is the class of label and NUM is the number within the class.   This is suitable for output with `assemble_name'.  */#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)	\  sprintf (LABEL, "*%s_%d", PREFIX, NUM)#define ASM_OUTPUT_ASCII(FILE, P, SIZE)  \  output_ascii (FILE, P, SIZE)/* This is how to output an element of a case-vector that is absolute.  */#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \  fprintf (FILE, "\t%sL_%d\n", TARGET_UNIX_ASM ? "" : ".word ", VALUE)/* This is how to output an element of a case-vector that is relative.   Don't define this if it is not supported. *//* #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) *//* This is how to output an assembler line   that says to advance the location counter   to a multiple of 2**LOG bytes.    who needs this????*/#define ASM_OUTPUT_ALIGN(FILE,LOG)	\  switch (LOG)				\    {					\      case 0:				\	break;				\      case 1:				\	fprintf (FILE, "\t.even\n");	\	break;				\      default:				\	abort ();			\    }#define ASM_OUTPUT_SKIP(FILE,SIZE)  \  fprintf (FILE, "\t.=.+ %#ho\n", (unsigned short)(SIZE))/* This says how to output an assembler line   to define a global common symbol.  */#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \( fprintf ((FILE), ".globl "),			\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), "\n"),			\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), ": .=.+ %#ho\n", (unsigned short)(ROUNDED))		\)/* This says how to output an assembler line   to define a local common symbol.  */#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \( assemble_name ((FILE), (NAME)),				\  fprintf ((FILE), ":\t.=.+ %#ho\n", (unsigned short)(ROUNDED)))/* Store in OUTPUT a string (made with alloca) containing   an assembler-name for a local static variable named NAME.   LABELNO is an integer which is different for each call.  */#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)	\( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\  sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))/* Print operand X (an rtx) in assembler syntax to file FILE.   CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.   For `%' followed by punctuation, CODE is the punctuation and X is null.*/#define PRINT_OPERAND(FILE, X, CODE)  \{ if (CODE == '#') fprintf (FILE, "#");					\  else if (GET_CODE (X) == REG)						\    fprintf (FILE, "%s", reg_names[REGNO (X)]);				\  else if (GET_CODE (X) == MEM)						\    output_address (XEXP (X, 0));					\  else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != SImode)	\    { char buf[30];							\      real_to_decimal (buf, CONST_DOUBLE_REAL_VALUE (X), sizeof (buf), 0, 1); \      fprintf (FILE, "$0F%s", buf); }					\  else { putc ('$', FILE); output_addr_const_pdp11 (FILE, X); }}/* Print a memory address as an operand to reference that memory location.  */#define PRINT_OPERAND_ADDRESS(FILE, ADDR)  \ print_operand_address (FILE, ADDR)#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)			\(							\  fprintf (FILE, "\tmov %s, -(sp)\n", reg_names[REGNO])	\)#define ASM_OUTPUT_REG_POP(FILE,REGNO)                 		\(                                                       	\  fprintf (FILE, "\tmov (sp)+, %s\n", reg_names[REGNO])     	\)/* trampoline - how should i do it in separate i+d ?    have some allocate_trampoline magic???    the following should work for shared I/D: *//* lets see whether this works as trampoline:MV	#STATIC, $4	0x940Y	0x0000 <- STATIC; Y = STATIC_CHAIN_REGNUMJMP	FUNCTION	0x0058  0x0000 <- FUNCTION*/#define TRAMPOLINE_TEMPLATE(FILE)	\{					\  if (TARGET_SPLIT)			\    abort();				\					\  assemble_aligned_integer (2, GEN_INT (0x9400+STATIC_CHAIN_REGNUM));	\  assemble_aligned_integer (2, const0_rtx);				\  assemble_aligned_integer (2, GEN_INT(0x0058));			\  assemble_aligned_integer (2, const0_rtx);				\}#define TRAMPOLINE_SIZE 8#define TRAMPOLINE_ALIGNMENT 16/* Emit RTL insns to initialize the variable parts of a trampoline.   FNADDR is an RTX for the address of the function's pure code.   CXT is an RTX for the static chain value for the function.  */#define INITIALIZE_TRAMPOLINE(TRAMP,FNADDR,CXT)	\{					\  if (TARGET_SPLIT)			\    abort();				\					\  emit_move_insn (gen_rtx_MEM (HImode, plus_constant (TRAMP, 2)), CXT); \  emit_move_insn (gen_rtx_MEM (HImode, plus_constant (TRAMP, 6)), FNADDR); \}/* 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.  */#define OPTIMIZATION_OPTIONS(LEVEL,SIZE)				\{									\  if (LEVEL >= 3)							\    {									\      if (! SIZE)							\        flag_inline_functions		= 1;				\      flag_omit_frame_pointer		= 1;				\      /* flag_unroll_loops			= 1; */			\    }									\}/* Provide the costs of a rtl expression.  This is in the body of a   switch on CODE.    we don't say how expensive SImode is - pretty expensive!!!   there is something wrong in MULT because MULT is not    as cheap as total = 2 even if we can shift!   if optimizing for size make mult etc cheap, but not 1, so when    in doubt the faster insn is chosen.*/#define RTX_COSTS(X,CODE,OUTER_CODE) \  case MULT:								\    if (optimize_size)							\      total = COSTS_N_INSNS(2);						\    else								\      total = COSTS_N_INSNS (11);					\    break;								\  case DIV:								\    if (optimize_size)							\      total = COSTS_N_INSNS(2);						\    else								\      total = COSTS_N_INSNS (25);					\    break;								\  case MOD:								\    if (optimize_size)							\      total = COSTS_N_INSNS(2);						\    else								\      total = COSTS_N_INSNS (26);					\    break;								\  case ABS:								\    /* equivalent to length, so same for optimize_size */		\    total = COSTS_N_INSNS (3);						\    break;								\  case ZERO_EXTEND:							\    /* only used for: qi->hi */						\    total = COSTS_N_INSNS(1);						\    break;								\  case SIGN_EXTEND:							\    if (GET_MODE(X) == HImode)						\      	total = COSTS_N_INSNS(1);					\    else if (GET_MODE(X) == SImode)					\	total = COSTS_N_INSNS(6);					\    else								\	total = COSTS_N_INSNS(2);					\    break;								\  /* case LSHIFT: */		       					\  case ASHIFT:								\  case LSHIFTRT:							\  case ASHIFTRT:							\    if (optimize_size)							\      total = COSTS_N_INSNS(1);						\    else if (GET_MODE(X) ==  QImode)					\    {									\      if (GET_CODE(XEXP (X,1)) != CONST_INT)				\   	total = COSTS_N_INSNS(8); /* worst case */ 			\      else                                                              \	total = COSTS_N_INSNS(INTVAL(XEXP (X,1)));			\    }									\    else if (GET_MODE(X) == HImode)					\    {									\      if (GET_CODE(XEXP (X,1)) == CONST_INT)				\      {									\	if (abs (INTVAL (XEXP (X, 1))) == 1)				\          total = COSTS_N_INSNS(1);					\        else								\	  total = COSTS_N_INSNS(2.5 + 0.5 *INTVAL(XEXP(X,1)));		\      }									\      else /* worst case */						\        total = COSTS_N_INSNS (10);					\    }									\    else if (GET_MODE(X) == SImode)					\    {									\      if (GET_CODE(XEXP (X,1)) == CONST_INT)				\	  total = COSTS_N_INSNS(2.5 + 0.5 *INTVAL(XEXP(X,1)));		\      else /* worst case */						\        total = COSTS_N_INSNS(18);					\    }									\    break;/* there is no point in avoiding branches on a pdp,    since branches are really cheap - I just want to find out   how much difference the BRANCH_COST macro makes in code */#define BRANCH_COST (TARGET_BRANCH_CHEAP ? 0 : 1)#define COMPARE_FLAG_MODE HImode

⌨️ 快捷键说明

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