aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2006-02-07 20:13:24 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2006-02-07 20:13:24 +0000
commit7931b1be5085e60b308a7d6c4d7e26c6ab9bc1ef (patch)
tree1ec4cdc67979c2ed3236b627710e9ca1af304443 /gcc/config/i386
parent62de55f71fa83d38a298bbfa15c8476f8e2de773 (diff)
downloadgcc-7931b1be5085e60b308a7d6c4d7e26c6ab9bc1ef.zip
gcc-7931b1be5085e60b308a7d6c4d7e26c6ab9bc1ef.tar.gz
gcc-7931b1be5085e60b308a7d6c4d7e26c6ab9bc1ef.tar.bz2
i386.c (ix86_delegitimize_address): Support Darwin PIC addresses.
* config/i386/i386.c (ix86_delegitimize_address): Support Darwin PIC addresses. From-SVN: r110716
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/i386.c8
1 files changed, 8 insertions, 0 deletions
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;
}