aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-10-17 19:46:52 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-10-17 19:46:52 +0000
commit8228c8f2a54be12c70070d4eb2cd64483782b138 (patch)
tree4109e45b230e085a1d7ea0fd55982663629832a8 /gcc/cp/error.c
parent6664a5f7ecb8fa96c0b754f66cc9bb73423c42fb (diff)
downloadgcc-8228c8f2a54be12c70070d4eb2cd64483782b138.zip
gcc-8228c8f2a54be12c70070d4eb2cd64483782b138.tar.gz
gcc-8228c8f2a54be12c70070d4eb2cd64483782b138.tar.bz2
[Darwin, PPC] Fix PR 65342.
The current Darwin load/store lo_sum patterns have neither predicate nor constraint. This means that most parts of the backend, which rely on recog() to validate the rtx, can produce invalid combinations/selections. For 32bit cases this isn't a problem since we can load/store to unaligned addresses using D-mode insns. Conversely, for 64bit instructions that use DS mode, this can manifest as assemble errors (for an assembler that checks the LO14 relocations), or as crashes caused by wrong offsets (or worse, wrong content for the two LSBs). What we want to check for "Y" on Darwin is: - that the alignment of the Symbols' target is sufficient for DS mode - that the offset is suitable for DS mode. (while looking through the Mach-O PIC unspecs). So, the patch removes the Darwin-specific lo_sum patterns (we begin using the movdi_internal64 patterns). We also we need to extend the handling of the mem_operand_gpr constraint to allow looking through Mach-O PIC UNSPECs in the lo_sum cases. gcc/ChangeLog: 2019-10-17 Iain Sandoe <iain@sandoe.co.uk> PR target/65342 * config/rs6000/darwin.md (movdi_low, movsi_low_st): Delete. (movdi_low_st): Delete. * config/rs6000/rs6000.c (darwin_rs6000_legitimate_lo_sum_const_p): New. (mem_operand_gpr): Validate Mach-O LO_SUM cases separately. * config/rs6000/rs6000.md (movsi_low): Delete. From-SVN: r277130
Diffstat (limited to 'gcc/cp/error.c')
0 files changed, 0 insertions, 0 deletions