📄 pa.c
字号:
pa_arch = ARCHITECTURE_11; target_flags &= ~MASK_PA_20; target_flags |= MASK_PA_11; } else if (pa_arch_string && ! strcmp (pa_arch_string, "2.0")) { pa_arch_string = "2.0"; pa_arch = ARCHITECTURE_20; target_flags |= MASK_PA_11 | MASK_PA_20; } else if (pa_arch_string) { warning ("unknown -march= option (%s).\nValid options are 1.0, 1.1, and 2.0\n", pa_arch_string); } if (TARGET_HPUX) { /* Set the default UNIX standard for HP-UX. This affects the predefines and startfiles used for the target. */ if (pa_unix_string == NULL) pa_unix_string = TARGET_HPUX_11_11 ? "98" : (TARGET_HPUX_10_10 ? "95" : "93"); if (!strcmp (pa_unix_string, "93")) flag_pa_unix = 1993; else if (!strcmp (pa_unix_string, "95")) flag_pa_unix = 1995; else if (TARGET_HPUX_11_11) { if (!strcmp (pa_unix_string, "98")) flag_pa_unix = 1998; else warning ("unknown -munix= option (%s).\n" "Valid options are 93, 95 and 98.\n", pa_unix_string); } else if (TARGET_HPUX_10_10) warning ("unknown -munix= option (%s)." "\nValid options are 93 and 95.\n", pa_unix_string); else warning ("unknown -munix= option (%s).\nValid option is 93.\n", pa_unix_string); } if (pa_fixed_range_string) fix_range (pa_fixed_range_string); /* Unconditional branches in the delay slot are not compatible with dwarf2 call frame information. There is no benefit in using this optimization on PA8000 and later processors. */ if (pa_cpu >= PROCESSOR_8000 || (! USING_SJLJ_EXCEPTIONS && flag_exceptions) || flag_unwind_tables) target_flags &= ~MASK_JUMP_IN_DELAY; if (flag_pic && TARGET_PORTABLE_RUNTIME) { warning ("PIC code generation is not supported in the portable runtime model\n"); } if (flag_pic && TARGET_FAST_INDIRECT_CALLS) { warning ("PIC code generation is not compatible with fast indirect calls\n"); } if (! TARGET_GAS && write_symbols != NO_DEBUG) { warning ("-g is only supported when using GAS on this processor,"); warning ("-g option disabled"); write_symbols = NO_DEBUG; } /* We only support the "big PIC" model now. And we always generate PIC code when in 64bit mode. */ if (flag_pic == 1 || TARGET_64BIT) flag_pic = 2; /* We can't guarantee that .dword is available for 32-bit targets. */ if (UNITS_PER_WORD == 4) targetm.asm_out.aligned_op.di = NULL; /* The unaligned ops are only available when using GAS. */ if (!TARGET_GAS) { targetm.asm_out.unaligned_op.hi = NULL; targetm.asm_out.unaligned_op.si = NULL; targetm.asm_out.unaligned_op.di = NULL; } init_machine_status = pa_init_machine_status;}static voidpa_init_builtins (void){#ifdef DONT_HAVE_FPUTC_UNLOCKED built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] = NULL_TREE; implicit_built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] = NULL_TREE;#endif}/* Function to init struct machine_function. This will be called, via a pointer variable, from push_function_context. */static struct machine_function *pa_init_machine_status (void){ return ggc_alloc_cleared (sizeof (machine_function));}/* If FROM is a probable pointer register, mark TO as a probable pointer register with the same pointer alignment as FROM. */static voidcopy_reg_pointer (rtx to, rtx from){ if (REG_POINTER (from)) mark_reg_pointer (to, REGNO_POINTER_ALIGN (REGNO (from)));}/* Return nonzero only if OP is a register of mode MODE, or CONST0_RTX. */intreg_or_0_operand (rtx op, enum machine_mode mode){ return (op == CONST0_RTX (mode) || register_operand (op, mode));}/* Return nonzero if OP is suitable for use in a call to a named function. For 2.5 try to eliminate either call_operand_address or function_label_operand, they perform very similar functions. */intcall_operand_address (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED){ return (GET_MODE (op) == word_mode && CONSTANT_P (op) && ! TARGET_PORTABLE_RUNTIME);}/* Return 1 if X contains a symbolic expression. We know these expressions will have one of a few well defined forms, so we need only check those forms. */intsymbolic_expression_p (rtx x){ /* Strip off any HIGH. */ if (GET_CODE (x) == HIGH) x = XEXP (x, 0); return (symbolic_operand (x, VOIDmode));}intsymbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED){ switch (GET_CODE (op)) { case SYMBOL_REF: case LABEL_REF: return 1; case CONST: op = XEXP (op, 0); return ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF || GET_CODE (XEXP (op, 0)) == LABEL_REF) && GET_CODE (XEXP (op, 1)) == CONST_INT); default: return 0; }}/* Return truth value of statement that OP is a symbolic memory operand of mode MODE. */intsymbolic_memory_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED){ if (GET_CODE (op) == SUBREG) op = SUBREG_REG (op); if (GET_CODE (op) != MEM) return 0; op = XEXP (op, 0); return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == CONST || GET_CODE (op) == HIGH || GET_CODE (op) == LABEL_REF);}/* Return 1 if the operand is either a register, zero, or a memory operand that is not symbolic. */intreg_or_0_or_nonsymb_mem_operand (rtx op, enum machine_mode mode){ if (register_operand (op, mode)) return 1; if (op == CONST0_RTX (mode)) return 1; if (GET_CODE (op) == SUBREG) op = SUBREG_REG (op); if (GET_CODE (op) != MEM) return 0; /* Until problems with management of the REG_POINTER flag are resolved, we need to delay creating move insns with unscaled indexed addresses until CSE is not expected. */ if (!TARGET_NO_SPACE_REGS && !cse_not_expected && GET_CODE (XEXP (op, 0)) == PLUS && REG_P (XEXP (XEXP (op, 0), 0)) && REG_P (XEXP (XEXP (op, 0), 1))) return 0; return (!symbolic_memory_operand (op, mode) && memory_address_p (mode, XEXP (op, 0)));}/* Return 1 if the operand is a register operand or a non-symbolic memory operand after reload. This predicate is used for branch patterns that internally handle register reloading. We need to accept non-symbolic memory operands after reload to ensure that the pattern is still valid if reload didn't find a hard register for the operand. */intreg_before_reload_operand (rtx op, enum machine_mode mode){ /* Don't accept a SUBREG since it will need a reload. */ if (GET_CODE (op) == SUBREG) return 0; if (register_operand (op, mode)) return 1; if (reload_completed && memory_operand (op, mode) && !symbolic_memory_operand (op, mode)) return 1; return 0;}/* Accept any constant that can be moved in one instruction into a general register. */intcint_ok_for_move (HOST_WIDE_INT intval){ /* OK if ldo, ldil, or zdepi, can be used. */ return (CONST_OK_FOR_LETTER_P (intval, 'J') || CONST_OK_FOR_LETTER_P (intval, 'N') || CONST_OK_FOR_LETTER_P (intval, 'K'));}/* Return 1 iff OP is an indexed memory operand. */intindexed_memory_operand (rtx op, enum machine_mode mode){ if (GET_MODE (op) != mode) return 0; /* Before reload, a (SUBREG (MEM...)) forces reloading into a register. */ if (reload_completed && GET_CODE (op) == SUBREG) op = SUBREG_REG (op); if (GET_CODE (op) != MEM || symbolic_memory_operand (op, mode)) return 0; op = XEXP (op, 0); return (memory_address_p (mode, op) && IS_INDEX_ADDR_P (op));}/* Accept anything that can be used as a destination operand for a move instruction. We don't accept indexed memory operands since they are supported only for floating point stores. */intmove_dest_operand (rtx op, enum machine_mode mode){ if (register_operand (op, mode)) return 1; if (GET_MODE (op) != mode) return 0; if (GET_CODE (op) == SUBREG) op = SUBREG_REG (op); if (GET_CODE (op) != MEM || symbolic_memory_operand (op, mode)) return 0; op = XEXP (op, 0); return (memory_address_p (mode, op) && !IS_INDEX_ADDR_P (op) && !IS_LO_SUM_DLT_ADDR_P (op));}/* Accept anything that can be used as a source operand for a move instruction. */intmove_src_operand (rtx op, enum machine_mode mode){ if (register_operand (op, mode)) return 1; if (GET_CODE (op) == CONST_INT) return cint_ok_for_move (INTVAL (op)); if (GET_MODE (op) != mode) return 0; if (GET_CODE (op) == SUBREG) op = SUBREG_REG (op); if (GET_CODE (op) != MEM) return 0; /* Until problems with management of the REG_POINTER flag are resolved, we need to delay creating move insns with unscaled indexed addresses until CSE is not expected. */ if (!TARGET_NO_SPACE_REGS && !cse_not_expected && GET_CODE (XEXP (op, 0)) == PLUS && REG_P (XEXP (XEXP (op, 0), 0)) && REG_P (XEXP (XEXP (op, 0), 1))) return 0; return memory_address_p (mode, XEXP (op, 0));}/* Accept anything that can be used as the source operand for a prefetch instruction with a cache-control completer. */intprefetch_cc_operand (rtx op, enum machine_mode mode){ if (GET_CODE (op) != MEM) return 0; op = XEXP (op, 0); /* We must reject virtual registers as we don't allow REG+D. */ if (op == virtual_incoming_args_rtx || op == virtual_stack_vars_rtx || op == virtual_stack_dynamic_rtx || op == virtual_outgoing_args_rtx || op == virtual_cfa_rtx) return 0; if (!REG_P (op) && !IS_INDEX_ADDR_P (op)) return 0; /* Until problems with management of the REG_POINTER flag are resolved, we need to delay creating prefetch insns with unscaled indexed addresses until CSE is not expected. */ if (!TARGET_NO_SPACE_REGS && !cse_not_expected && GET_CODE (op) == PLUS && REG_P (XEXP (op, 0))) return 0; return memory_address_p (mode, op);}/* Accept anything that can be used as the source operand for a prefetch instruction with no cache-control completer. */intprefetch_nocc_operand (rtx op, enum machine_mode mode){ if (GET_CODE (op) != MEM) return 0; op = XEXP (op, 0); /* Until problems with management of the REG_POINTER flag are resolved, we need to delay creating prefetch insns with unscaled indexed addresses until CSE is not expected. */ if (!TARGET_NO_SPACE_REGS && !cse_not_expected && GET_CODE (op) == PLUS && REG_P (XEXP (op, 0)) && REG_P (XEXP (op, 1))) return 0; return memory_address_p (mode, op);}/* Accept REG and any CONST_INT that can be moved in one instruction into a general register. */intreg_or_cint_move_operand (rtx op, enum machine_mode mode){ if (register_operand (op, mode)) return 1; return (GET_CODE (op) == CONST_INT && cint_ok_for_move (INTVAL (op)));}intpic_label_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED){ if (!flag_pic) return 0; switch (GET_CODE (op)) { case LABEL_REF: return 1; case CONST: op = XEXP (op, 0); return (GET_CODE (XEXP (op, 0)) == LABEL_REF && GET_CODE (XEXP (op, 1)) == CONST_INT); default: return 0; }}intfp_reg_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED){ return reg_renumber && FP_REG_P (op);}/* Return truth value of whether OP can be used as an operand in a three operand arithmetic insn that accepts registers of mode MODE or 14-bit signed integers. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -