From 67f192f7687d0cce6cf81e188745a48c71b4b019 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 13 Oct 2019 18:30:25 +0000 Subject: [PATCH] [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 * config/darwin.c (machopic_indirect_data_reference): Remove redundant code. From-SVN: r276942 --- gcc/ChangeLog | 5 +++++ gcc/config/darwin.c | 15 --------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 752eda4cd53..c72f4d86729 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-13 Iain Sandoe + + * config/darwin.c (machopic_indirect_data_reference): Remove + redundant code. + 2019-10-13 Nathan Sidwell * gengtype-lex.l (CXX_KEYWORD): Add 'mutable'. diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index f6543fc9976..eefffee55f6 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); -- 2.30.2