aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2015-10-20 15:36:21 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2015-10-20 15:36:21 -0700
commita5b9f44390259333ab47d6dfaafbf2fa50b4a8e0 (patch)
treef434739678c53aa54c0645f2c0e6b64a9bf09094 /binutils
parent0814689ac1af6f4be47779be470cbd2ed478cc7b (diff)
downloadriscv-gnu-toolchain-a5b9f44390259333ab47d6dfaafbf2fa50b4a8e0.zip
riscv-gnu-toolchain-a5b9f44390259333ab47d6dfaafbf2fa50b4a8e0.tar.gz
riscv-gnu-toolchain-a5b9f44390259333ab47d6dfaafbf2fa50b4a8e0.tar.bz2
Revert "binutils: relax LA macro to C.LUI when appropriate"
This reverts commit e05cc858aa5a6ed1ae0fec885a83090f81f355fe. Too much code assumes LA maps to AUIPC. Perhaps that is unreasonable, but the improvement of this patch is so minor that it seems hard to justify going back and fixing the code.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/gas/config/tc-riscv.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/binutils/gas/config/tc-riscv.c b/binutils/gas/config/tc-riscv.c
index d7e5bb6..2d77871 100644
--- a/binutils/gas/config/tc-riscv.c
+++ b/binutils/gas/config/tc-riscv.c
@@ -937,18 +937,12 @@ macro (struct riscv_cl_insn *ip, expressionS *imm_expr,
if (imm_expr->X_op == O_constant)
load_const (rd, imm_expr);
- else if (riscv_opts.pic && mask == M_LA) /* Global symbol in PIC */
+ else if (riscv_opts.pic && mask == M_LA) /* Global PIC symbol */
pcrel_load (rd, rd, imm_expr, LOAD_ADDRESS_INSN,
BFD_RELOC_RISCV_GOT_HI20, BFD_RELOC_RISCV_PCREL_LO12_I);
- else if (riscv_opts.pic) /* Local symbol in PIC */
+ else /* Local PIC symbol, or any non-PIC symbol */
pcrel_load (rd, rd, imm_expr, "addi",
BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I);
- else /* Any symbol in non-PIC */
- {
- macro_build (imm_expr, "lui", "d,u", rd, BFD_RELOC_RISCV_HI20);
- macro_build (imm_expr, "addi", "d,s,j", rd, rd,
- BFD_RELOC_RISCV_LO12_I);
- }
break;
case M_LA_TLS_GD: