diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-05 17:41:49 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-05 17:41:49 +0000 |
commit | 29c05e22902bbba7db08fa62c244b68172cc14a2 (patch) | |
tree | a9e29626a294417f7835ab23c14674d3ce69ce5d /gcc/config/arm/arm.c | |
parent | bfff5bd71a8cc29d1147627c6c779bbc422c1e81 (diff) | |
download | gcc-29c05e22902bbba7db08fa62c244b68172cc14a2.tar.gz |
gcc/
* rtl.h (plus_constant, plus_constant_mode): Merge into a single
plus_constant function.
* explow.c (plus_constant, plus_constant_mode): Likewise. Assert
that the mode is sensible.
(use_anchored_address, round_push, allocate_dynamic_stack_space)
(probe_stack_range, anti_adjust_stack_and_probe): Update calls to
plus_constant.
* alias.c (canon_rtx): Likewise.
(init_alias_analysis): Likewise.
* builtins.c (expand_builtin_return_addr)
(expand_builtin_setjmp_setup, expand_builtin_longjmp)
(expand_builtin_nonlocal_goto, expand_builtin_update_setjmp_buf)
(expand_builtin_apply_args_1, expand_builtin_apply, expand_movstr)
(expand_builtin_stpcpy): Likewise.
* calls.c (save_fixed_argument_area, restore_fixed_argument_area)
(compute_argument_addresses, internal_arg_pointer_based_exp)
(expand_call, emit_library_call_value_1): Likewise.
* cfgexpand.c (expand_one_stack_var_at, expand_debug_expr): Likewise.
* combine-stack-adj.c (try_apply_stack_adjustment): Likewise.
* combine.c (combine_simplify_rtx, force_to_mode): Likewise.
* cse.c (insert_const_anchor, find_reg_offset_for_const)
(use_related_value, fold_rtx): Likewise.
* cselib.c (cselib_subst_to_values): Likewise.
* dse.c (record_store, check_mem_read_rtx): Likewise.
* dwarf2out.c (rtl_for_decl_location, gen_variable_die): Likewise.
* emit-rtl.c (adjust_address_1): Likewise.
* except.c (sjlj_emit_function_enter)
(expand_builtin_extract_return_addr)
(expand_builtin_frob_return_addr): Likewise.
* expmed.c (expand_divmod): Likewise.
* expr.c (move_by_pieces, store_by_pieces, store_by_pieces_1)
(emit_move_resolve_push, push_block, emit_push_insn, store_expr)
(expand_expr_addr_expr_1, expand_expr_real_1): Likewise.
* function.c (assign_stack_local_1)
(instantiate_virtual_regs_in_rtx): Likewise.
* optabs.c (prepare_cmp_insn): Likewise.
* recog.c (offsettable_address_addr_space_p): Likewise.
* reload.c (find_reloads_address, form_sum)
(find_reloads_subreg_address): Likewise.
* reload1.c (init_reload, eliminate_regs_1)
(eliminate_regs_in_insn): Likewise.
* simplify-rtx.c (simplify_unary_operation_1)
(simplify_binary_operation_1, simplify_plus_minus): Likewise.
* var-tracking.c (compute_cfa_pointer, prepare_call_arguments)
(vt_add_function_parameter): Likewise.
* config/alpha/alpha.h (EH_RETURN_HANDLER_RTX): Likewise.
* config/alpha/vms.h (EH_RETURN_HANDLER_RTX): Likewise.
* config/alpha/alpha.c (alpha_legitimize_address_1)
(get_unaligned_address, alpha_expand_unaligned_load)
(alpha_expand_unaligned_store, alpha_expand_unaligned_load_words)
(alpha_expand_unaligned_store_words, alpha_expand_block_clear)
(alpha_expand_builtin_establish_vms_condition_handler)
(alpha_setup_incoming_varargs, emit_frame_store_1)
(alpha_expand_prologue, alpha_expand_epilogue)
(alpha_use_linkage): Likewise.
* config/alpha/alpha.md: Likewise.
* config/arm/arm.c (arm_trampoline_init, legitimize_pic_address)
(arm_load_pic_register, arm_pic_static_addr, arm_legitimize_address)
(thumb_legitimize_address, arm_gen_load_multiple_1)
(arm_gen_store_multiple_1, arm_gen_multiple_op, gen_ldm_seq)
(gen_stm_seq, gen_const_stm_seq, arm_block_move_unaligned_straight)
(arm_block_move_unaligned_loop, arm_gen_movmemqi, arm_reload_in_hi)
(arm_reload_out_hi, arm_reorg, vfp_emit_fstmd, emit_multi_reg_push)
(emit_sfm, thumb_set_frame_pointer, arm_expand_prologue)
(thumb1_emit_multi_reg_push, thumb1_expand_prologue)
(thumb_expand_movmemqi, arm_set_return_address)
(thumb_set_return_address): Likewise.
* config/arm/arm.md: Likewise.
* config/avr/avr.c (avr_incoming_return_addr_rtx)
(avr_prologue_setup_frame, expand_epilogue)
(avr_const_address_lo16): Likewise.
* config/bfin/bfin.h (EH_RETURN_HANDLER_RTX): Likewise.
* config/bfin/bfin.c (setup_incoming_varargs, bfin_load_pic_reg)
(bfin_expand_prologue, bfin_trampoline_init, bfin_expand_call)
(bfin_output_mi_thunk): Likewise.
* config/c6x/c6x.c (c6x_initialize_trampoline)
(c6x_output_mi_thunk): Likewise.
* config/cr16/cr16.h (EH_RETURN_HANDLER_RTX): Likewise.
* config/cr16/cr16.c (cr16_create_dwarf_for_multi_push): Likewise.
* config/cris/cris.c (cris_return_addr_rtx, cris_split_movdx)
(cris_expand_prologue, cris_expand_epilogue, cris_gen_movem_load)
(cris_emit_movem_store, cris_trampoline_init): Likewise.
* config/cris/cris.md: Likewise.
* config/darwin.c (machopic_indirect_data_reference)
(machopic_legitimize_pic_address): Likewise.
* config/epiphany/epiphany.c (epiphany_emit_save_restore)
(epiphany_expand_prologue, epiphany_expand_epilogue)
(epiphany_trampoline_init): Likewise.
* config/epiphany/epiphany.md: Likewise.
* config/fr30/fr30.c (fr30_move_double): Likewise.
* config/frv/frv.c (frv_dwarf_store, frv_expand_prologue)
(frv_expand_block_move, frv_expand_block_clear, frv_return_addr_rtx)
(frv_index_memory, unspec_got_name, frv_find_base_term)
(frv_output_dwarf_dtprel): Likewise.
* config/h8300/h8300.c (h8300_push_pop, h8300_return_addr_rtx)
(h8300_swap_into_er6, h8300_swap_out_of_er6): Likewise.
* config/i386/i386.h (RETURN_ADDR_RTX): Likewise.
* config/i386/i386.c (setup_incoming_varargs_64)
(setup_incoming_varargs_ms_64, choose_baseaddr)
(ix86_emit_save_reg_using_mov, ix86_adjust_stack_and_probe)
(ix86_emit_probe_stack_range, ix86_expand_prologue)
(ix86_emit_restore_reg_using_pop, ix86_emit_leave)
(ix86_expand_epilogue, legitimize_pic_address, ix86_legitimize_address)
(ix86_split_long_move, ix86_expand_movmem, ix86_expand_setmem)
(ix86_static_chain, ix86_trampoline_init, x86_this_parameter)
(x86_output_mi_thunk): Likewise.
* config/i386/i386.md: Likewise.
* config/ia64/ia64.c (ia64_expand_load_address)
(ia64_expand_tls_address, ia64_expand_move, ia64_split_tmode)
(do_spill, ia64_trampoline_init): Likewise.
* config/iq2000/iq2000.c (iq2000_va_start)
(iq2000_emit_frame_related_store, iq2000_expand_prologue)
(iq2000_expand_eh_return, iq2000_setup_incoming_varargs)
(iq2000_print_operand, iq2000_legitimize_address): Likewise.
* config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise.
* config/m32c/m32c.c (m32c_return_addr_rtx)
(m32c_expand_insv): Likewise.
* config/m32r/m32r.c (m32r_setup_incoming_varargs)
(m32r_legitimize_pic_address, m32r_print_operand)
(m32r_print_operand_address): Likewise.
* config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
* config/m68k/m68k.h (RETURN_ADDR_RTX): Likewise.
(EH_RETURN_HANDLER_RTX): Likewise.
* config/m68k/m68k.c (m68k_emit_movem, m68k_expand_prologue)
(m68k_expand_epilogue, legitimize_pic_address)
(m68k_output_mi_thunk): Likewise.
* config/m68k/m68k.md: Likewise.
* config/mcore/mcore.c (mcore_expand_prolog): Likewise.
(mcore_expand_epilog): Likewise.
* config/mcore/mcore.md: Likewise.
* config/mep/mep.c (mep_allocate_initial_value)
(mep_expand_prologue, mep_expand_epilogue): Likewise.
* config/microblaze/microblaze.c (double_memory_operand)
(microblaze_block_move_loop): Likewise.
* config/mips/mips.c (mips_strip_unspec_address, mips_add_offset)
(mips_setup_incoming_varargs, mips_va_start, mips_block_move_loop)
(mips_print_operand, mips16e_save_restore_reg, mips_save_restore_reg)
(mips_expand_prologue, mips_epilogue_set_cfa)
(mips_expand_epilogue): Likewise.
* config/mips/mips.md: Likewise.
* config/mmix/mmix.c (mmix_dynamic_chain_address, mmix_return_addr_rtx)
(mmix_expand_prologue, mmix_expand_epilogue): Likewise.
* config/mn10300/mn10300.c (mn10300_gen_multiple_store)
(mn10300_builtin_saveregs, mn10300_trampoline_init): Likewise.
* config/moxie/moxie.h (INCOMING_RETURN_ADDR_RTX): Likewise.
(EH_RETURN_HANDLER_RTX): Likewise.
* config/moxie/moxie.c (moxie_static_chain): Likewise.
* config/pa/pa.c (legitimize_pic_address, hppa_legitimize_address)
(store_reg, set_reg_plus_d, pa_expand_prologue, load_reg)
(pa_return_addr_rtx, hppa_builtin_saveregs)
(pa_trampoline_init): Likewise.
* config/pa/pa.md: Likewise.
* config/pdp11/pdp11.c (pdp11_expand_epilogue): Likewise.
* config/picochip/picochip.c (picochip_static_chain): Likewise.
* config/rs6000/rs6000.h (RS6000_SAVE_TOC): Likewise.
* config/rs6000/rs6000.c (rs6000_legitimize_address)
(setup_incoming_varargs, print_operand, rs6000_return_addr)
(rs6000_emit_eh_reg_restore, rs6000_emit_probe_stack_range)
(rs6000_emit_epilogue)
(rs6000_machopic_legitimize_pic_address): Likewise.
* config/rx/rx.c (gen_rx_rtsd_vector, gen_rx_popm_vector): Likewise.
* config/s390/s390.h (INITIAL_FRAME_ADDRESS_RTX): Likewise.
(DYNAMIC_CHAIN_ADDRESS): Likewise.
* config/s390/s390.c (s390_decompose_address, legitimize_pic_address)
(s390_delegitimize_address, print_operand, annotate_constant_pool_refs)
(replace_constant_pool_ref, s390_return_addr_rtx, s390_back_chain_rtx)
(save_fpr, restore_fpr, save_gprs, restore_gprs, s390_emit_prologue)
(s390_emit_epilogue, s390_function_profiler): Likewise.
* config/s390/s390.md: Likewise.
* config/score/score.c (score_add_offset, score_prologue): Likewise.
* config/sh/sh.c (expand_block_move, push_regs, sh_builtin_saveregs)
(sh_output_mi_thunk): Likewise.
* config/sh/sh.md: Likewise.
* config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS, FRAME_ADDR_RTX)
(RETURN_ADDR_RTX, INCOMING_RETURN_ADDR_RTX): Likewise.
* config/sparc/sparc.c (sparc_legitimize_pic_address)
(sparc_emit_probe_stack_range, emit_save_or_restore_regs)
(emit_window_save, sparc_flat_expand_prologue, sparc_struct_value_rtx)
(emit_and_preserve): Likewise.
* config/sparc/sparc.md: Likewise.
* config/spu/spu.h (DYNAMIC_CHAIN_ADDRESS): Likewise.
* config/spu/spu.c (spu_expand_insv, spu_machine_dependent_reorg)
(spu_setup_incoming_varargs, ea_load_store_inline)
(spu_expand_load): Likewise.
* config/stormy16/stormy16.c (xstormy16_expand_prologue)
(combine_bnp): Likewise.
* config/tilegx/tilegx.h (DYNAMIC_CHAIN_ADDRESS): Likewise.
* config/tilegx/tilegx.c (tilegx_setup_incoming_varargs)
(tilegx_expand_unaligned_load, tilegx_trampoline_init): Likewise.
* config/tilepro/tilepro.h (DYNAMIC_CHAIN_ADDRESS): Likewise.
* config/tilepro/tilepro.c (tilepro_setup_incoming_varargs)
(tilepro_expand_unaligned_load, tilepro_trampoline_init): Likewise.
* config/v850/v850.c (expand_prologue, expand_epilogue): Likewise.
* config/v850/v850.md: Likewise.
* config/vax/elf.h (EH_RETURN_STACKADJ_RTX): Likewise.
(EH_RETURN_HANDLER_RTX): Likewise.
* config/vax/vax.h (DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX): Likewise.
* config/vax/vax.c (vax_add_reg_cfa_offset, vax_expand_prologue)
(print_operand_address, vax_trampoline_init): Likewise.
* config/xtensa/xtensa.c (xtensa_expand_prologue, xtensa_return_addr)
(xtensa_function_value_regno_p): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187199 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r-- | gcc/config/arm/arm.c | 157 |
1 files changed, 85 insertions, 72 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 4d11d7e5e36..17b4b5d43de 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2226,7 +2226,7 @@ arm_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) a_tramp = XEXP (m_tramp, 0); emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), LCT_NORMAL, VOIDmode, 2, a_tramp, Pmode, - plus_constant (a_tramp, TRAMPOLINE_SIZE), Pmode); + plus_constant (Pmode, a_tramp, TRAMPOLINE_SIZE), Pmode); } /* Thumb trampolines should be entered in thumb mode, so set @@ -5458,7 +5458,7 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) } if (GET_CODE (offset) == CONST_INT) - return plus_constant (base, INTVAL (offset)); + return plus_constant (Pmode, base, INTVAL (offset)); } if (GET_MODE_SIZE (mode) > 4 @@ -5575,7 +5575,7 @@ arm_load_pic_register (unsigned long saved_regs ATTRIBUTE_UNUSED) /* On the ARM the PC register contains 'dot + 8' at the time of the addition, on the Thumb it is 'dot + 4'. */ - pic_rtx = plus_constant (l1, TARGET_ARM ? 8 : 4); + pic_rtx = plus_constant (Pmode, l1, TARGET_ARM ? 8 : 4); pic_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, pic_rtx), UNSPEC_GOTSYM_OFF); pic_rtx = gen_rtx_CONST (Pmode, pic_rtx); @@ -5623,7 +5623,7 @@ arm_pic_static_addr (rtx orig, rtx reg) /* On the ARM the PC register contains 'dot + 8' at the time of the addition, on the Thumb it is 'dot + 4'. */ - offset_rtx = plus_constant (l1, TARGET_ARM ? 8 : 4); + offset_rtx = plus_constant (Pmode, l1, TARGET_ARM ? 8 : 4); offset_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, orig, offset_rtx), UNSPEC_SYMBOL_OFFSET); offset_rtx = gen_rtx_CONST (Pmode, offset_rtx); @@ -6513,9 +6513,9 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) } base_reg = gen_reg_rtx (SImode); - val = force_operand (plus_constant (xop0, n), NULL_RTX); + val = force_operand (plus_constant (Pmode, xop0, n), NULL_RTX); emit_move_insn (base_reg, val); - x = plus_constant (base_reg, low_n); + x = plus_constant (Pmode, base_reg, low_n); } else if (xop0 != XEXP (x, 0) || xop1 != XEXP (x, 1)) x = gen_rtx_PLUS (SImode, xop0, xop1); @@ -6563,7 +6563,7 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) index -= mask; } base_reg = force_reg (SImode, GEN_INT (base)); - x = plus_constant (base_reg, index); + x = plus_constant (Pmode, base_reg, index); } if (flag_pic) @@ -6612,9 +6612,9 @@ thumb_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) else delta = offset & (~31 * GET_MODE_SIZE (mode)); - xop0 = force_operand (plus_constant (xop0, offset - delta), + xop0 = force_operand (plus_constant (Pmode, xop0, offset - delta), NULL_RTX); - x = plus_constant (xop0, delta); + x = plus_constant (Pmode, xop0, delta); } else if (offset < 0 && offset > -256) /* Small negative offsets are best done with a subtract before the @@ -10781,7 +10781,7 @@ arm_gen_load_multiple_1 (int count, int *regs, rtx *mems, rtx basereg, emit_move_insn (gen_rtx_REG (SImode, regs[i]), mems[i]); if (wback_offset != 0) - emit_move_insn (basereg, plus_constant (basereg, wback_offset)); + emit_move_insn (basereg, plus_constant (Pmode, basereg, wback_offset)); seq = get_insns (); end_sequence (); @@ -10795,7 +10795,7 @@ arm_gen_load_multiple_1 (int count, int *regs, rtx *mems, rtx basereg, { XVECEXP (result, 0, 0) = gen_rtx_SET (VOIDmode, basereg, - plus_constant (basereg, wback_offset)); + plus_constant (Pmode, basereg, wback_offset)); i = 1; count++; } @@ -10833,7 +10833,7 @@ arm_gen_store_multiple_1 (int count, int *regs, rtx *mems, rtx basereg, emit_move_insn (mems[i], gen_rtx_REG (SImode, regs[i])); if (wback_offset != 0) - emit_move_insn (basereg, plus_constant (basereg, wback_offset)); + emit_move_insn (basereg, plus_constant (Pmode, basereg, wback_offset)); seq = get_insns (); end_sequence (); @@ -10847,7 +10847,7 @@ arm_gen_store_multiple_1 (int count, int *regs, rtx *mems, rtx basereg, { XVECEXP (result, 0, 0) = gen_rtx_SET (VOIDmode, basereg, - plus_constant (basereg, wback_offset)); + plus_constant (Pmode, basereg, wback_offset)); i = 1; count++; } @@ -10889,7 +10889,7 @@ arm_gen_multiple_op (bool is_load, int *regs, int count, rtx basereg, for (i = 0; i < count; i++) { - rtx addr = plus_constant (basereg, i * 4); + rtx addr = plus_constant (Pmode, basereg, i * 4); mems[i] = adjust_automodify_address_nv (basemem, SImode, addr, offset); offset += 4; } @@ -10978,7 +10978,7 @@ gen_ldm_seq (rtx *operands, int nops, bool sort_regs) for (i = 0; i < nops; i++) { - addr = plus_constant (base_reg_rtx, offset + i * 4); + addr = plus_constant (Pmode, base_reg_rtx, offset + i * 4); mems[i] = adjust_automodify_address_nv (operands[nops + mem_order[i]], SImode, addr, 0); } @@ -11028,11 +11028,11 @@ gen_stm_seq (rtx *operands, int nops) offset = 0; } - addr = plus_constant (base_reg_rtx, offset); + addr = plus_constant (Pmode, base_reg_rtx, offset); for (i = 0; i < nops; i++) { - addr = plus_constant (base_reg_rtx, offset + i * 4); + addr = plus_constant (Pmode, base_reg_rtx, offset + i * 4); mems[i] = adjust_automodify_address_nv (operands[nops + mem_order[i]], SImode, addr, 0); } @@ -11144,11 +11144,11 @@ gen_const_stm_seq (rtx *operands, int nops) offset = 0; } - addr = plus_constant (base_reg_rtx, offset); + addr = plus_constant (Pmode, base_reg_rtx, offset); for (i = 0; i < nops; i++) { - addr = plus_constant (base_reg_rtx, offset + i * 4); + addr = plus_constant (Pmode, base_reg_rtx, offset + i * 4); mems[i] = adjust_automodify_address_nv (operands[nops + mem_order[i]], SImode, addr, 0); } @@ -11220,8 +11220,8 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase, { for (j = 0; j < interleave_factor; j++) { - addr = plus_constant (src, srcoffset + j * UNITS_PER_WORD - - src_autoinc); + addr = plus_constant (Pmode, src, (srcoffset + j * UNITS_PER_WORD + - src_autoinc)); mem = adjust_automodify_address (srcbase, SImode, addr, srcoffset + j * UNITS_PER_WORD); emit_insn (gen_unaligned_loadsi (regs[j], mem)); @@ -11240,8 +11240,8 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase, { for (j = 0; j < interleave_factor; j++) { - addr = plus_constant (dst, dstoffset + j * UNITS_PER_WORD - - dst_autoinc); + addr = plus_constant (Pmode, dst, (dstoffset + j * UNITS_PER_WORD + - dst_autoinc)); mem = adjust_automodify_address (dstbase, SImode, addr, dstoffset + j * UNITS_PER_WORD); emit_insn (gen_unaligned_storesi (mem, regs[j])); @@ -11269,7 +11269,7 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase, { for (j = 0; j < words; j++) { - addr = plus_constant (src, + addr = plus_constant (Pmode, src, srcoffset + j * UNITS_PER_WORD - src_autoinc); mem = adjust_automodify_address (srcbase, SImode, addr, srcoffset + j * UNITS_PER_WORD); @@ -11288,7 +11288,7 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase, { for (j = 0; j < words; j++) { - addr = plus_constant (dst, + addr = plus_constant (Pmode, dst, dstoffset + j * UNITS_PER_WORD - dst_autoinc); mem = adjust_automodify_address (dstbase, SImode, addr, dstoffset + j * UNITS_PER_WORD); @@ -11307,7 +11307,7 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase, { halfword_tmp = gen_reg_rtx (SImode); - addr = plus_constant (src, srcoffset - src_autoinc); + addr = plus_constant (Pmode, src, srcoffset - src_autoinc); mem = adjust_automodify_address (srcbase, HImode, addr, srcoffset); emit_insn (gen_unaligned_loadhiu (halfword_tmp, mem)); @@ -11315,7 +11315,7 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase, byte, depending on interleave factor. */ if (interleave_factor == 1) { - addr = plus_constant (dst, dstoffset - dst_autoinc); + addr = plus_constant (Pmode, dst, dstoffset - dst_autoinc); mem = adjust_automodify_address (dstbase, HImode, addr, dstoffset); emit_insn (gen_unaligned_storehi (mem, gen_lowpart (HImode, halfword_tmp))); @@ -11335,13 +11335,13 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase, { byte_tmp = gen_reg_rtx (SImode); - addr = plus_constant (src, srcoffset - src_autoinc); + addr = plus_constant (Pmode, src, srcoffset - src_autoinc); mem = adjust_automodify_address (srcbase, QImode, addr, srcoffset); emit_move_insn (gen_lowpart (QImode, byte_tmp), mem); if (interleave_factor == 1) { - addr = plus_constant (dst, dstoffset - dst_autoinc); + addr = plus_constant (Pmode, dst, dstoffset - dst_autoinc); mem = adjust_automodify_address (dstbase, QImode, addr, dstoffset); emit_move_insn (mem, gen_lowpart (QImode, byte_tmp)); byte_tmp = NULL; @@ -11356,7 +11356,7 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase, if (halfword_tmp) { - addr = plus_constant (dst, dstoffset - dst_autoinc); + addr = plus_constant (Pmode, dst, dstoffset - dst_autoinc); mem = adjust_automodify_address (dstbase, HImode, addr, dstoffset); emit_insn (gen_unaligned_storehi (mem, gen_lowpart (HImode, halfword_tmp))); @@ -11367,7 +11367,7 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase, if (byte_tmp) { - addr = plus_constant (dst, dstoffset - dst_autoinc); + addr = plus_constant (Pmode, dst, dstoffset - dst_autoinc); mem = adjust_automodify_address (dstbase, QImode, addr, dstoffset); emit_move_insn (mem, gen_lowpart (QImode, byte_tmp)); dstoffset++; @@ -11433,8 +11433,8 @@ arm_block_move_unaligned_loop (rtx dest, rtx src, HOST_WIDE_INT length, interleave_factor); /* Move on to the next block. */ - emit_move_insn (src_reg, plus_constant (src_reg, bytes_per_iter)); - emit_move_insn (dest_reg, plus_constant (dest_reg, bytes_per_iter)); + emit_move_insn (src_reg, plus_constant (Pmode, src_reg, bytes_per_iter)); + emit_move_insn (dest_reg, plus_constant (Pmode, dest_reg, bytes_per_iter)); /* Emit the loop condition. */ test = gen_rtx_NE (VOIDmode, src_reg, final_src); @@ -11595,7 +11595,8 @@ arm_gen_movmemqi (rtx *operands) while (last_bytes) { mem = adjust_automodify_address (dstbase, QImode, - plus_constant (dst, last_bytes - 1), + plus_constant (Pmode, dst, + last_bytes - 1), dstoffset + last_bytes - 1); emit_move_insn (mem, gen_lowpart (QImode, part_bytes_reg)); @@ -12120,11 +12121,11 @@ arm_reload_in_hi (rtx *operands) emit_insn (gen_zero_extendqisi2 (scratch, gen_rtx_MEM (QImode, - plus_constant (base, + plus_constant (Pmode, base, offset)))); emit_insn (gen_zero_extendqisi2 (gen_rtx_SUBREG (SImode, operands[0], 0), gen_rtx_MEM (QImode, - plus_constant (base, + plus_constant (Pmode, base, offset + 1)))); if (!BYTES_BIG_ENDIAN) emit_set_insn (gen_rtx_SUBREG (SImode, operands[0], 0), @@ -12284,23 +12285,27 @@ arm_reload_out_hi (rtx *operands) if (BYTES_BIG_ENDIAN) { emit_insn (gen_movqi (gen_rtx_MEM (QImode, - plus_constant (base, offset + 1)), + plus_constant (Pmode, base, + offset + 1)), gen_lowpart (QImode, outval))); emit_insn (gen_lshrsi3 (scratch, gen_rtx_SUBREG (SImode, outval, 0), GEN_INT (8))); - emit_insn (gen_movqi (gen_rtx_MEM (QImode, plus_constant (base, offset)), + emit_insn (gen_movqi (gen_rtx_MEM (QImode, plus_constant (Pmode, base, + offset)), gen_lowpart (QImode, scratch))); } else { - emit_insn (gen_movqi (gen_rtx_MEM (QImode, plus_constant (base, offset)), + emit_insn (gen_movqi (gen_rtx_MEM (QImode, plus_constant (Pmode, base, + offset)), gen_lowpart (QImode, outval))); emit_insn (gen_lshrsi3 (scratch, gen_rtx_SUBREG (SImode, outval, 0), GEN_INT (8))); emit_insn (gen_movqi (gen_rtx_MEM (QImode, - plus_constant (base, offset + 1)), + plus_constant (Pmode, base, + offset + 1)), gen_lowpart (QImode, scratch))); } } @@ -13814,7 +13819,8 @@ arm_reorg (void) if (GET_CODE (this_fix->insn) != BARRIER) { rtx addr - = plus_constant (gen_rtx_LABEL_REF (VOIDmode, + = plus_constant (Pmode, + gen_rtx_LABEL_REF (VOIDmode, minipool_vector_label), this_fix->minipool->offset); *this_fix->loc = gen_rtx_MEM (this_fix->mode, addr); @@ -14025,7 +14031,7 @@ vfp_emit_fstmd (int base_reg, int count) gen_rtx_PRE_MODIFY (Pmode, stack_pointer_rtx, plus_constant - (stack_pointer_rtx, + (Pmode, stack_pointer_rtx, - (count * 8))) ), gen_rtx_UNSPEC (BLKmode, @@ -14033,7 +14039,7 @@ vfp_emit_fstmd (int base_reg, int count) UNSPEC_PUSH_MULT)); tmp = gen_rtx_SET (VOIDmode, stack_pointer_rtx, - plus_constant (stack_pointer_rtx, -(count * 8))); + plus_constant (Pmode, stack_pointer_rtx, -(count * 8))); RTX_FRAME_RELATED_P (tmp) = 1; XVECEXP (dwarf, 0, 0) = tmp; @@ -14051,7 +14057,8 @@ vfp_emit_fstmd (int base_reg, int count) tmp = gen_rtx_SET (VOIDmode, gen_frame_mem (DFmode, - plus_constant (stack_pointer_rtx, + plus_constant (Pmode, + stack_pointer_rtx, i * 8)), reg); RTX_FRAME_RELATED_P (tmp) = 1; @@ -16538,7 +16545,7 @@ emit_multi_reg_push (unsigned long mask) gen_rtx_PRE_MODIFY (Pmode, stack_pointer_rtx, plus_constant - (stack_pointer_rtx, + (Pmode, stack_pointer_rtx, -4 * num_regs)) ), gen_rtx_UNSPEC (BLKmode, @@ -16573,7 +16580,7 @@ emit_multi_reg_push (unsigned long mask) = gen_rtx_SET (VOIDmode, gen_frame_mem (SImode, - plus_constant (stack_pointer_rtx, + plus_constant (Pmode, stack_pointer_rtx, 4 * j)), reg); RTX_FRAME_RELATED_P (tmp) = 1; @@ -16588,7 +16595,7 @@ emit_multi_reg_push (unsigned long mask) tmp = gen_rtx_SET (VOIDmode, stack_pointer_rtx, - plus_constant (stack_pointer_rtx, -4 * num_regs)); + plus_constant (Pmode, stack_pointer_rtx, -4 * num_regs)); RTX_FRAME_RELATED_P (tmp) = 1; XVECEXP (dwarf, 0, 0) = tmp; @@ -16631,7 +16638,7 @@ emit_sfm (int base_reg, int count) gen_rtx_PRE_MODIFY (Pmode, stack_pointer_rtx, plus_constant - (stack_pointer_rtx, + (Pmode, stack_pointer_rtx, -12 * count)) ), gen_rtx_UNSPEC (BLKmode, @@ -16649,7 +16656,8 @@ emit_sfm (int base_reg, int count) tmp = gen_rtx_SET (VOIDmode, gen_frame_mem (XFmode, - plus_constant (stack_pointer_rtx, + plus_constant (Pmode, + stack_pointer_rtx, i * 12)), reg); RTX_FRAME_RELATED_P (tmp) = 1; @@ -16658,7 +16666,7 @@ emit_sfm (int base_reg, int count) tmp = gen_rtx_SET (VOIDmode, stack_pointer_rtx, - plus_constant (stack_pointer_rtx, -12 * count)); + plus_constant (Pmode, stack_pointer_rtx, -12 * count)); RTX_FRAME_RELATED_P (tmp) = 1; XVECEXP (dwarf, 0, 0) = tmp; @@ -17130,7 +17138,7 @@ thumb_set_frame_pointer (arm_stack_offsets *offsets) stack_pointer_rtx)); } dwarf = gen_rtx_SET (VOIDmode, hard_frame_pointer_rtx, - plus_constant (stack_pointer_rtx, amount)); + plus_constant (Pmode, stack_pointer_rtx, amount)); RTX_FRAME_RELATED_P (dwarf) = 1; add_reg_note (insn, REG_FRAME_RELATED_EXPR, dwarf); } @@ -17261,7 +17269,7 @@ arm_expand_prologue (void) /* Just tell the dwarf backend that we adjusted SP. */ dwarf = gen_rtx_SET (VOIDmode, stack_pointer_rtx, - plus_constant (stack_pointer_rtx, + plus_constant (Pmode, stack_pointer_rtx, -fp_offset)); RTX_FRAME_RELATED_P (insn) = 1; add_reg_note (insn, REG_FRAME_RELATED_EXPR, dwarf); @@ -17289,7 +17297,8 @@ arm_expand_prologue (void) } insn = emit_set_insn (ip_rtx, - plus_constant (stack_pointer_rtx, fp_offset)); + plus_constant (Pmode, stack_pointer_rtx, + fp_offset)); RTX_FRAME_RELATED_P (insn) = 1; } @@ -17318,7 +17327,7 @@ arm_expand_prologue (void) { rtx lr = gen_rtx_REG (SImode, LR_REGNUM); - emit_set_insn (lr, plus_constant (lr, -4)); + emit_set_insn (lr, plus_constant (SImode, lr, -4)); } if (live_regs_mask) @@ -17368,7 +17377,7 @@ arm_expand_prologue (void) insn = gen_rtx_REG (SImode, 3); else /* if (crtl->args.pretend_args_size == 0) */ { - insn = plus_constant (hard_frame_pointer_rtx, 4); + insn = plus_constant (Pmode, hard_frame_pointer_rtx, 4); insn = gen_frame_mem (SImode, insn); } emit_set_insn (ip_rtx, insn); @@ -21595,7 +21604,7 @@ thumb1_emit_multi_reg_push (unsigned long mask, unsigned long real_regs) par[i] = tmp; } - tmp = plus_constant (stack_pointer_rtx, -4 * i); + tmp = plus_constant (Pmode, stack_pointer_rtx, -4 * i); tmp = gen_rtx_PRE_MODIFY (Pmode, stack_pointer_rtx, tmp); tmp = gen_frame_mem (BLKmode, tmp); tmp = gen_rtx_SET (VOIDmode, tmp, par[0]); @@ -21605,7 +21614,7 @@ thumb1_emit_multi_reg_push (unsigned long mask, unsigned long real_regs) insn = emit_insn (tmp); /* Always build the stack adjustment note for unwind info. */ - tmp = plus_constant (stack_pointer_rtx, -4 * i); + tmp = plus_constant (Pmode, stack_pointer_rtx, -4 * i); tmp = gen_rtx_SET (VOIDmode, stack_pointer_rtx, tmp); par[0] = tmp; @@ -21615,7 +21624,7 @@ thumb1_emit_multi_reg_push (unsigned long mask, unsigned long real_regs) regno = ctz_hwi (real_regs); reg = gen_rtx_REG (SImode, regno); - tmp = plus_constant (stack_pointer_rtx, j * 4); + tmp = plus_constant (Pmode, stack_pointer_rtx, j * 4); tmp = gen_frame_mem (SImode, tmp); tmp = gen_rtx_SET (VOIDmode, tmp, reg); RTX_FRAME_RELATED_P (tmp) = 1; @@ -22559,7 +22568,7 @@ thumb1_expand_prologue (void) x = GEN_INT (offset + 16 + crtl->args.pretend_args_size); emit_insn (gen_addsi3 (work_reg, stack_pointer_rtx, x)); - x = plus_constant (stack_pointer_rtx, offset + 4); + x = plus_constant (Pmode, stack_pointer_rtx, offset + 4); x = gen_frame_mem (SImode, x); emit_move_insn (x, work_reg); @@ -22573,13 +22582,13 @@ thumb1_expand_prologue (void) x = gen_rtx_REG (SImode, PC_REGNUM); emit_move_insn (work_reg, x); - x = plus_constant (stack_pointer_rtx, offset + 12); + x = plus_constant (Pmode, stack_pointer_rtx, offset + 12); x = gen_frame_mem (SImode, x); emit_move_insn (x, work_reg); emit_move_insn (work_reg, arm_hfp_rtx); - x = plus_constant (stack_pointer_rtx, offset); + x = plus_constant (Pmode, stack_pointer_rtx, offset); x = gen_frame_mem (SImode, x); emit_move_insn (x, work_reg); } @@ -22587,14 +22596,14 @@ thumb1_expand_prologue (void) { emit_move_insn (work_reg, arm_hfp_rtx); - x = plus_constant (stack_pointer_rtx, offset); + x = plus_constant (Pmode, stack_pointer_rtx, offset); x = gen_frame_mem (SImode, x); emit_move_insn (x, work_reg); x = gen_rtx_REG (SImode, PC_REGNUM); emit_move_insn (work_reg, x); - x = plus_constant (stack_pointer_rtx, offset + 12); + x = plus_constant (Pmode, stack_pointer_rtx, offset + 12); x = gen_frame_mem (SImode, x); emit_move_insn (x, work_reg); } @@ -22602,7 +22611,7 @@ thumb1_expand_prologue (void) x = gen_rtx_REG (SImode, LR_REGNUM); emit_move_insn (work_reg, x); - x = plus_constant (stack_pointer_rtx, offset + 8); + x = plus_constant (Pmode, stack_pointer_rtx, offset + 8); x = gen_frame_mem (SImode, x); emit_move_insn (x, work_reg); @@ -22736,7 +22745,7 @@ thumb1_expand_prologue (void) stack_pointer_rtx, reg)); dwarf = gen_rtx_SET (VOIDmode, stack_pointer_rtx, - plus_constant (stack_pointer_rtx, + plus_constant (Pmode, stack_pointer_rtx, -amount)); add_reg_note (insn, REG_FRAME_RELATED_EXPR, dwarf); RTX_FRAME_RELATED_P (insn) = 1; @@ -23087,8 +23096,10 @@ thumb_expand_movmemqi (rtx *operands) { rtx reg = gen_reg_rtx (HImode); emit_insn (gen_movhi (reg, gen_rtx_MEM (HImode, - plus_constant (in, offset)))); - emit_insn (gen_movhi (gen_rtx_MEM (HImode, plus_constant (out, offset)), + plus_constant (Pmode, in, + offset)))); + emit_insn (gen_movhi (gen_rtx_MEM (HImode, plus_constant (Pmode, out, + offset)), reg)); len -= 2; offset += 2; @@ -23098,8 +23109,10 @@ thumb_expand_movmemqi (rtx *operands) { rtx reg = gen_reg_rtx (QImode); emit_insn (gen_movqi (reg, gen_rtx_MEM (QImode, - plus_constant (in, offset)))); - emit_insn (gen_movqi (gen_rtx_MEM (QImode, plus_constant (out, offset)), + plus_constant (Pmode, in, + offset)))); + emit_insn (gen_movqi (gen_rtx_MEM (QImode, plus_constant (Pmode, out, + offset)), reg)); } } @@ -23884,7 +23897,7 @@ arm_set_return_address (rtx source, rtx scratch) else { if (frame_pointer_needed) - addr = plus_constant(hard_frame_pointer_rtx, -4); + addr = plus_constant (Pmode, hard_frame_pointer_rtx, -4); else { /* LR will be the first saved register. */ @@ -23901,7 +23914,7 @@ arm_set_return_address (rtx source, rtx scratch) else addr = stack_pointer_rtx; - addr = plus_constant (addr, delta); + addr = plus_constant (Pmode, addr, delta); } emit_move_insn (gen_frame_mem (Pmode, addr), source); } @@ -23953,7 +23966,7 @@ thumb_set_return_address (rtx source, rtx scratch) addr = scratch; } else - addr = plus_constant (addr, delta); + addr = plus_constant (Pmode, addr, delta); emit_move_insn (gen_frame_mem (Pmode, addr), source); } |