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

📄 pdp11.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
    if (GET_CODE (operand) == PRE_MODIFY				\	&& GET_CODE (XEXP (operand, 0)) == REG				\	&& REGNO (XEXP (operand, 0)) == 6        	        	\	&& GET_CODE ((xfoob = XEXP (operand, 1))) == PLUS		\	&& GET_CODE (XEXP (xfoob, 0)) == REG				\	&& REGNO (XEXP (xfoob, 0)) == 6	        	        	\	&& CONSTANT_P (XEXP (xfoob, 1))                                 \	&& INTVAL (XEXP (xfoob,1)) == -2)      	               		\      goto ADDR;							\									\    /* accept (SP)+ -- which uses POST_MODIFY for byte mode */		\    if (GET_CODE (operand) == POST_MODIFY				\	&& GET_CODE (XEXP (operand, 0)) == REG				\	&& REGNO (XEXP (operand, 0)) == 6        	        	\	&& GET_CODE ((xfoob = XEXP (operand, 1))) == PLUS		\	&& GET_CODE (XEXP (xfoob, 0)) == REG				\	&& REGNO (XEXP (xfoob, 0)) == 6	        	        	\	&& CONSTANT_P (XEXP (xfoob, 1))                                 \	&& INTVAL (XEXP (xfoob,1)) == 2)      	               		\      goto ADDR;							\									\    									\    /* handle another level of indirection ! */				\    if (GET_CODE(operand) != MEM)					\      goto fail;							\									\    xfoob = XEXP (operand, 0);						\									\    /* (MEM:xx (MEM:xx ())) is not valid for SI, DI and currently */    \    /* also forbidden for float, because we have to handle this */  	\    /* in output_move_double and/or output_move_quad() - we could */   	\    /* do it, but currently it's not worth it!!! */			\    /* now that DFmode cannot go into CPU register file, */		\    /* maybe I should allow float ... */				\    /*  but then I have to handle memory-to-memory moves in movdf ?? */ \									\    if (GET_MODE_BITSIZE(mode) > 16)					\      goto fail;							\									\    /* accept @(R0) - which is @0(R0) */				\    if (GET_CODE (xfoob) == REG						\	&& REG_OK_FOR_BASE_P(xfoob))					\      goto ADDR;							\									\    /* accept @address */						\    if (CONSTANT_ADDRESS_P (xfoob))					\      goto ADDR;							\    									\    /* accept @X(R0) */							\    if (GET_CODE (xfoob) == PLUS       					\	&& GET_CODE (XEXP (xfoob, 0)) == REG				\	&& REG_OK_FOR_BASE_P (XEXP (xfoob, 0))				\	&& CONSTANT_ADDRESS_P (XEXP (xfoob, 1)))			\      goto ADDR;							\									\    /* accept @-(R0) */							\    if (GET_CODE (xfoob) == PRE_DEC					\	&& GET_CODE (XEXP (xfoob, 0)) == REG				\	&& REG_OK_FOR_BASE_P (XEXP (xfoob, 0)))				\      goto ADDR;							\									\    /* accept @(R0)+ */							\    if (GET_CODE (xfoob) == POST_INC					\	&& GET_CODE (XEXP (xfoob, 0)) == REG				\	&& REG_OK_FOR_BASE_P (XEXP (xfoob, 0)))				\      goto ADDR;							\									\  /* anything else is invalid */					\  fail: ;								\}/* Go to LABEL if ADDR (a legitimate address expression)   has an effect that depends on the machine mode it is used for.   On the pdp this is for predec/postinc */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)	\ { if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC)	\     goto LABEL; 							\ }/* Specify the machine mode that this machine uses   for the index in the tablejump instruction.  */#define CASE_VECTOR_MODE HImode/* Define this if a raw index is all that is needed for a   `tablejump' insn.  */#define CASE_TAKES_INDEX_RAW/* 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)/* 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 *//* 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 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 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_%lu", PREFIX, (unsigned long)(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)))/* 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)	\    { REAL_VALUE_TYPE r;						\      long sval[2];							\      REAL_VALUE_FROM_CONST_DOUBLE (r, X);				\      REAL_VALUE_TO_TARGET_DOUBLE (r, sval);				\      fprintf (FILE, "$%#o", sval[0] >> 16); }				\  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)							\    {									\      flag_omit_frame_pointer		= 1;				\      /* flag_unroll_loops			= 1; */			\    }									\}/* 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 + -