aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-riscv.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-04-25 11:19:18 +0200
committerJan Beulich <jbeulich@suse.com>2023-04-25 11:19:18 +0200
commit7a29ee290307087e1749ce610207e93a15d0b78d (patch)
tree328cb1753ab008f092ca067163938b13de9afced /gas/config/tc-riscv.h
parent42dabba6578e4b19037512d052fdc711c1349d6f (diff)
downloadgdb-7a29ee290307087e1749ce610207e93a15d0b78d.zip
gdb-7a29ee290307087e1749ce610207e93a15d0b78d.tar.gz
gdb-7a29ee290307087e1749ce610207e93a15d0b78d.tar.bz2
RISC-V: adjust logic to avoid register name symbols
Special casing GPR names in my_getSmallExpression() leads to a number of inconsistencies. Generalize this by utilizing the md_parse_name() hook, limited to when instruction operands are being parsed (really: probed). Then both the GPR lookup there and the yet more ad hoc workaround for PR/gas 29940 can be removed (including its extension needed for making the compressed form JAL work again).
Diffstat (limited to 'gas/config/tc-riscv.h')
-rw-r--r--gas/config/tc-riscv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gas/config/tc-riscv.h b/gas/config/tc-riscv.h
index 111492a..0c70c7d 100644
--- a/gas/config/tc-riscv.h
+++ b/gas/config/tc-riscv.h
@@ -123,6 +123,10 @@ extern void riscv_elf_final_processing (void);
/* Adjust debug_line after relaxation. */
#define DWARF2_USE_FIXED_ADVANCE_PC 1
+#define md_parse_name(name, exp, mode, c) \
+ riscv_parse_name (name, exp, mode)
+bool riscv_parse_name (const char *, struct expressionS *, enum expr_mode);
+
#define md_finish riscv_md_finish
#define CONVERT_SYMBOLIC_ATTRIBUTE riscv_convert_symbolic_attribute