aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-10-13 18:30:25 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-10-13 18:30:25 +0000
commit67f192f7687d0cce6cf81e188745a48c71b4b019 (patch)
tree84dd3d2f64a78af6be1b21095e70a60487dc0cfb /gcc
parent51a6a4044c9eed53d86b3f79ca5c3c7b87ade39d (diff)
downloadgcc-67f192f7687d0cce6cf81e188745a48c71b4b019.zip
gcc-67f192f7687d0cce6cf81e188745a48c71b4b019.tar.gz
gcc-67f192f7687d0cce6cf81e188745a48c71b4b019.tar.bz2
[Darwin, machopic 7/n] Remove code that should be dead.
This code fragment was imported from the Apple branch (it was never applied to mainline). It is stated to fix up a problem sometimes created by reload (before that had been extended to have greater flexibility in assigning the pic registers). In any event, reload is no longer in use for the port. gcc/ChangeLog: 2019-10-13 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c (machopic_indirect_data_reference): Remove redundant code. From-SVN: r276942
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/darwin.c15
2 files changed, 5 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 752eda4..c72f4d8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-13 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.c (machopic_indirect_data_reference): Remove
+ redundant code.
+
2019-10-13 Nathan Sidwell <nathan@acm.org>
* gengtype-lex.l (CXX_KEYWORD): Add 'mutable'.
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index f6543fc..eefffee 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -760,21 +760,6 @@ machopic_indirect_data_reference (rtx orig, rtx reg)
else if (GET_CODE (orig) == PLUS)
{
rtx base, result;
- /* When the target is i386, this code prevents crashes due to the
- compiler's ignorance on how to move the PIC base register to
- other registers. (The reload phase sometimes introduces such
- insns.) */
- if (GET_CODE (XEXP (orig, 0)) == REG
- && REGNO (XEXP (orig, 0)) == PIC_OFFSET_TABLE_REGNUM
- /* Prevent the same register from being erroneously used
- as both the base and index registers. */
- && (DARWIN_X86 && (GET_CODE (XEXP (orig, 1)) == CONST))
- && reg)
- {
- emit_move_insn (reg, XEXP (orig, 0));
- XEXP (ptr_ref, 0) = reg;
- return ptr_ref;
- }
/* Legitimize both operands of the PLUS. */
base = machopic_indirect_data_reference (XEXP (orig, 0), reg);