fix(asm): reject the operand-starved riscv64 spellings instead of panicking
Assisted-by: GLM 5.3
This commit is contained in:
1 parent
d03de62c07
commit
acd30088af
3 files changed
+17
-2
No files matched your search
@@ -232,6 +232,11 @@ func FuzzAssembleRISCV64(f *testing.F) {
|
||||
f.Add("TEXT ·f(SB), NOSPLIT, $0\n\tCSRRW $0x1000, X5, X6\n\tRET\n")
|
||||
f.Add("TEXT ·f(SB), NOSPLIT, $0\n\tSLLI $64, X5, X6\n\tRET\n")
|
||||
f.Add("TEXT ·f(SB), NOSPLIT, $0\n\tVLE8V (X10), V32\n\tRET\n")
|
||||
// Operand-starved spellings that used to panic the layout and encode
|
||||
// passes; each must come back as a diagnostic.
|
||||
f.Add("TEXT ·f(SB), $0\n\tJALR\n\tRET\n")
|
||||
f.Add("TEXT ·f(SB), NOSPLIT, $0\n\tROR $3\n\tRET\n")
|
||||
f.Add("TEXT ·f(SB), NOSPLIT, $0\n\tVLE8V (X10)\n\tRET\n")
|
||||
f.Add("#define A A\nA\n")
|
||||
|
||||
f.Fuzz(func(t *testing.T, src string) {
|
||||
|
||||
Reference in new issue
Block a user