diff options
author | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-26 13:46:29 +0000 |
---|---|---|
committer | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-26 13:46:29 +0000 |
commit | 4e27ffd041ecc99985835a1c372a636b406ad804 (patch) | |
tree | 91a9229d2e7d90865629ad03c4b391936c79877e /gcc/combine.c | |
parent | f811051bf87b1de7804c19c8192d0d099d157145 (diff) | |
download | gcc-4e27ffd041ecc99985835a1c372a636b406ad804.tar.gz |
PR middle-end/54635
* doc/tm.texi.in (TARGET_MODE_DEPENDENT_ADDRESS_P): Document new
parameter addrspace.
* doc/tm.texi: Regenerate.
* target.def (mode_dependent_address_p): Add addr_space_t parameter.
* targhooks.h (default_mode_dependent_address_p): Ditto.
* targhooks.c (default_mode_dependent_address_p): Ditto.
* expr.c (convert_move): Pass address space to mode_dependent_address_p.
* combine.c (combine_simplify_rtx): Ditto.
(make_extraction): Ditto.
(simplify_shift_const_1): Ditto.
(gen_lowpart_for_combine): Ditto.
* lower-subreg.c (simple_move_operand): Ditto.
* recog.c (simplify_while_replacing): Ditto.
(offsettable_address_addr_space_p): Ditto.
(mode_dependent_address_p): Ditto.
* simplify-rtx.c (simplify_unary_operation_1): Ditto.
(simplify_subreg): Ditto.
* config/m68k/m68k.md: Ditto.
* config/vax/vax.md: Ditto.
* config/vax/constraints.md (Q): Ditto.
* config/vax/predicates.md (indexed_memory_operand): Ditto.
* config/alpha/alpha.c (alpha_mode_dependent_address_p): Add
unused addr_space_t parameter.
* config/avr/avr.c (avr_mode_dependent_address_p): Ditto.
* config/h8300/h8300.c (h8300_mode_dependent_address_p): Ditto.
* config/m32r/m32r.c (m32r_mode_dependent_address_p): Ditto.
* config/rs6000/rs6000.c (rs6000_mode_dependent_address_p): Ditto.
* config/rx/rx.c (rx_mode_dependent_address_p): Ditto.
* config/sparc/sparc.c (sparc_mode_dependent_address_p): Ditto.
* config/stormy16/stormy16.c (xstormy16_mode_dependent_address_p):
Ditto.
* config/vax/vax.c (vax_mode_dependent_address_p): Ditto.
* config/xtensa/xtensa.c (xtensa_mode_dependent_address_p): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191761 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index ad86f68d26d..4e0a57963dc 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5424,7 +5424,8 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest, of the address. */ if (MEM_P (SUBREG_REG (x)) && (MEM_VOLATILE_P (SUBREG_REG (x)) - || mode_dependent_address_p (XEXP (SUBREG_REG (x), 0)))) + || mode_dependent_address_p (XEXP (SUBREG_REG (x), 0), + MEM_ADDR_SPACE (SUBREG_REG (x))))) return gen_rtx_CLOBBER (mode, const0_rtx); /* Note that we cannot do any narrowing for non-constants since @@ -7054,7 +7055,8 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, may not be aligned, for one thing). */ && GET_MODE_PRECISION (inner_mode) >= GET_MODE_PRECISION (tmode) && (inner_mode == tmode - || (! mode_dependent_address_p (XEXP (inner, 0)) + || (! mode_dependent_address_p (XEXP (inner, 0), + MEM_ADDR_SPACE (inner)) && ! MEM_VOLATILE_P (inner)))))) { /* If INNER is a MEM, make a new MEM that encompasses just the desired @@ -7233,7 +7235,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, /* If we have to change the mode of memory and cannot, the desired mode is EXTRACTION_MODE. */ if (inner_mode != wanted_inner_mode - && (mode_dependent_address_p (XEXP (inner, 0)) + && (mode_dependent_address_p (XEXP (inner, 0), MEM_ADDR_SPACE (inner)) || MEM_VOLATILE_P (inner) || pos_rtx)) wanted_inner_mode = extraction_mode; @@ -7271,7 +7273,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, && ! pos_rtx && GET_MODE_SIZE (wanted_inner_mode) < GET_MODE_SIZE (is_mode) && MEM_P (inner) - && ! mode_dependent_address_p (XEXP (inner, 0)) + && ! mode_dependent_address_p (XEXP (inner, 0), MEM_ADDR_SPACE (inner)) && ! MEM_VOLATILE_P (inner)) { int offset = 0; @@ -9883,7 +9885,8 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode, minus the width of a smaller mode, we can do this with a SIGN_EXTEND or ZERO_EXTEND from the narrower memory location. */ if ((code == ASHIFTRT || code == LSHIFTRT) - && ! mode_dependent_address_p (XEXP (varop, 0)) + && ! mode_dependent_address_p (XEXP (varop, 0), + MEM_ADDR_SPACE (varop)) && ! MEM_VOLATILE_P (varop) && (tmode = mode_for_size (GET_MODE_BITSIZE (mode) - count, MODE_INT, 1)) != BLKmode) @@ -10702,7 +10705,8 @@ gen_lowpart_for_combine (enum machine_mode omode, rtx x) /* Refuse to work on a volatile memory ref or one with a mode-dependent address. */ - if (MEM_VOLATILE_P (x) || mode_dependent_address_p (XEXP (x, 0))) + if (MEM_VOLATILE_P (x) + || mode_dependent_address_p (XEXP (x, 0), MEM_ADDR_SPACE (x))) goto fail; /* If we want to refer to something bigger than the original memref, |