From 7931b1be5085e60b308a7d6c4d7e26c6ab9bc1ef Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Tue, 7 Feb 2006 20:13:24 +0000 Subject: [PATCH] i386.c (ix86_delegitimize_address): Support Darwin PIC addresses. * config/i386/i386.c (ix86_delegitimize_address): Support Darwin PIC addresses. From-SVN: r110716 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 82f7ec9..71da549 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-02-07 Geoffrey Keating + + * config/i386/i386.c (ix86_delegitimize_address): Support Darwin + PIC addresses. + 2006-02-07 Roger Sayle * config/sparc/sparc.c (sparc_type_code): Don't handle CHAR_TYPE. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f4eb04e..edfe04f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -7152,6 +7152,14 @@ ix86_delegitimize_address (rtx orig_x) return x; } + if (TARGET_MACHO && darwin_local_data_pic (x) + && GET_CODE (orig_x) != MEM) + { + x = XEXP (x, 0); + if (y) + return gen_rtx_PLUS (Pmode, y, x); + return x; + } return orig_x; } -- 2.7.4