aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStan Cox <coxs@gnu.org>1994-03-01 17:08:21 +0000
committerStan Cox <coxs@gnu.org>1994-03-01 17:08:21 +0000
commit9fdd8bdb82f818f424632421f42ea58eec901687 (patch)
treedb7de9f6e1b3dbaa5348df08e9ad9263e4b31121 /gcc
parent8cf85c4ba99de5a5c06a419bffb3cbfd1b683db9 (diff)
downloadgcc-9fdd8bdb82f818f424632421f42ea58eec901687.zip
gcc-9fdd8bdb82f818f424632421f42ea58eec901687.tar.gz
gcc-9fdd8bdb82f818f424632421f42ea58eec901687.tar.bz2
(legitimize_address, print_operand): Make -fPIC work
From-SVN: r6681
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/m88k/m88k.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c
index 766dfcad..c2484d3 100644
--- a/gcc/config/m88k/m88k.c
+++ b/gcc/config/m88k/m88k.c
@@ -313,10 +313,16 @@ legitimize_address (pic, orig, reg, scratch)
temp = ((reload_in_progress || reload_completed)
? reg : gen_reg_rtx (Pmode));
- emit_insn (gen_rtx (SET, VOIDmode,
- temp, gen_rtx (HIGH, SImode, addr)));
- emit_insn (gen_rtx (SET, VOIDmode,
- temp, gen_rtx (LO_SUM, SImode, temp, addr)));
+ emit_insn (gen_rtx (SET, VOIDmode, temp,
+ gen_rtx (HIGH, SImode,
+ gen_rtx (UNSPEC, SImode,
+ gen_rtvec (1, addr),
+ 0))));
+ emit_insn (gen_rtx (SET, VOIDmode, temp,
+ gen_rtx (LO_SUM, SImode, temp,
+ gen_rtx (UNSPEC, SImode,
+ gen_rtvec (1, addr),
+ 0))));
addr = temp;
}
new = gen_rtx (MEM, Pmode,
@@ -2938,6 +2944,11 @@ print_operand (file, x, code)
output_address (x);
else if (xc == MEM)
output_address (XEXP (x, 0));
+ else if (flag_pic && xc == UNSPEC)
+ {
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fputs ("#got_rel", file);
+ }
else if (xc == CONST_DOUBLE)
output_operand_lossage ("operand is const_double");
else