aboutsummaryrefslogtreecommitdiff
path: root/gas/NEWS
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-11-24 09:53:15 +0100
committerJan Beulich <jbeulich@suse.com>2023-11-24 09:53:15 +0100
commit27b33966b18ed8bf1701a60999448224b1d28273 (patch)
tree2d6ad5e3535f234553e9afacf7f4d18eb9ca2560 /gas/NEWS
parent6c0c7d489bdf106d90b300aeb8d042c7b1ad3d2b (diff)
downloadgdb-27b33966b18ed8bf1701a60999448224b1d28273.zip
gdb-27b33966b18ed8bf1701a60999448224b1d28273.tar.gz
gdb-27b33966b18ed8bf1701a60999448224b1d28273.tar.bz2
RISC-V: disallow x0 with certain macro-insns
While for some of the macro insns using x0 is kind of okay, as they would merely resolve to a sequence of hint insns (and hence not cause misbehavior at runtime), several of them have the degenerate AUIPC followed by a load, store, or branch using other than the designated symbol as address and hence causing runtime issues. Refuse to assemble those, leveraging that the matching function so far wasn't really used for macro insns: NULL is now allowed, indicating a match (which imo is preferable over converting match_never() to match_always()), while other matching functions now (also) used for macro insns need to avoid calling match_opcode(). Note that for LA the restriction is slightly too strict: In non-PIC mode using x0 would be okay-ish as per above (as it's just LLA there). Yet libopcodes doesn't know what mode gas is presently assembling for, so we want to err on the safe side. Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'gas/NEWS')
-rw-r--r--gas/NEWS3
1 files changed, 3 insertions, 0 deletions
diff --git a/gas/NEWS b/gas/NEWS
index 53b8759..643f0e6 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -1,5 +1,8 @@
-*- text -*-
+* On RISC-V macro instructions expanding to AUIPC and a load, store, or branch
+ no longer accept x0 as an intermediate and/or destination register.
+
* Add support for Reliability, Availability and Serviceability extension v2
(RASv2) for AArch64.