From 160d1b3d74593bf42155da24569f54a6e7140f65 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 19 Jun 2018 07:12:48 +0200 Subject: RISC-V: Accept constant operands in la and lla opcodes/ PR gas/23305 * riscv-opc.c (riscv_opcodes): Use new format specifier 'B' for la and lla. gas/ PR gas/23305 * config/tc-riscv.c (riscv_ip): Add format specifier 'B' for constants and symbols. * testsuite/gas/riscv/lla32.d: New file. * testsuite/gas/riscv/lla32.s: Likewise. * testsuite/gas/riscv/lla64-fail.d: Likewise. * testsuite/gas/riscv/lla64-fail.l: Likewise. * testsuite/gas/riscv/lla64-fail.s: Likewise. * testsuite/gas/riscv/lla64.d: Likewise. * testsuite/gas/riscv/lla64.s: Likewise. --- opcodes/ChangeLog | 6 ++++++ opcodes/riscv-opc.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'opcodes') diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 0cfb806..c5ef6a3 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2018-06-20 Sebastian Huber + + PR gas/23305 + * riscv-opc.c (riscv_opcodes): Use new format specifier 'B' for + la and lla. + 2018-06-19 Simon Marchi * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11. diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c index 47e9659..8e55916 100644 --- a/opcodes/riscv-opc.c +++ b/opcodes/riscv-opc.c @@ -278,8 +278,8 @@ const struct riscv_opcode riscv_opcodes[] = applied to an add instruction, for relaxation to use. */ {"add", "I", "d,s,t,0",MATCH_ADD, MASK_ADD, match_opcode, 0 }, {"add", "I", "d,s,j", MATCH_ADDI, MASK_ADDI, match_opcode, INSN_ALIAS }, -{"la", "I", "d,A", 0, (int) M_LA, match_never, INSN_MACRO }, -{"lla", "I", "d,A", 0, (int) M_LLA, match_never, INSN_MACRO }, +{"la", "I", "d,B", 0, (int) M_LA, match_never, INSN_MACRO }, +{"lla", "I", "d,B", 0, (int) M_LLA, match_never, INSN_MACRO }, {"la.tls.gd", "I", "d,A", 0, (int) M_LA_TLS_GD, match_never, INSN_MACRO }, {"la.tls.ie", "I", "d,A", 0, (int) M_LA_TLS_IE, match_never, INSN_MACRO }, {"neg", "I", "d,t", MATCH_SUB, MASK_SUB | MASK_RS1, match_opcode, INSN_ALIAS }, /* sub 0 */ -- cgit v1.1