aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-riscv.c
diff options
context:
space:
mode:
authorNelson Chu <nelson@rivosinc.com>2023-09-01 15:21:35 +0800
committerNelson Chu <nelson@rivosinc.com>2023-09-01 15:37:59 +0800
commit12e70a6d0c3550e8eec9f9a0a7abb8bae49fc097 (patch)
tree0df35a750c4673933164ea9b827c71379cddc09e /gas/config/tc-riscv.c
parent8ba212f8933df0560d600d14c032be251aa21a71 (diff)
downloadgdb-12e70a6d0c3550e8eec9f9a0a7abb8bae49fc097.zip
gdb-12e70a6d0c3550e8eec9f9a0a7abb8bae49fc097.tar.gz
gdb-12e70a6d0c3550e8eec9f9a0a7abb8bae49fc097.tar.bz2
RISC-V: Fixed the wrong expansion for pseudo vmsge[u].vx instructions.
The original report was from Kiva Oyama <libkernelpanic@gmail.com>, https://sourceware.org/pipermail/binutils/2023-August/129255.html The vmsge[u].vx pseudo should be expanded to masked vmslt[u].vx only when vd != v0. Otherwise, it should be expanded to unmasked one. gas/ * config/tc-riscv.c (vector_macro): Fixed the wrong expansion for pseudo vmsge[u].vx instructions. * testsuite/gas/riscv/vector-insns-vmsgtvx.d: Updated.
Diffstat (limited to 'gas/config/tc-riscv.c')
-rw-r--r--gas/config/tc-riscv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 959cbbc..e49b34f 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -1966,13 +1966,13 @@ vector_macro (struct riscv_cl_insn *ip)
/* Masked. Have vtemp to avoid overlap constraints. */
if (vd == vm)
{
- macro_build (NULL, "vmslt.vx", "Vd,Vt,s", vtemp, vs2, vs1);
+ macro_build (NULL, "vmslt.vx", "Vd,Vt,sVm", vtemp, vs2, vs1, -1);
macro_build (NULL, "vmandnot.mm", "Vd,Vt,Vs", vd, vm, vtemp);
}
else
{
/* Preserve the value of vd if not updating by vm. */
- macro_build (NULL, "vmslt.vx", "Vd,Vt,s", vtemp, vs2, vs1);
+ macro_build (NULL, "vmslt.vx", "Vd,Vt,sVm", vtemp, vs2, vs1, -1);
macro_build (NULL, "vmandnot.mm", "Vd,Vt,Vs", vtemp, vm, vtemp);
macro_build (NULL, "vmandnot.mm", "Vd,Vt,Vs", vd, vd, vm);
macro_build (NULL, "vmor.mm", "Vd,Vt,Vs", vd, vtemp, vd);
@@ -2001,13 +2001,13 @@ vector_macro (struct riscv_cl_insn *ip)
/* Masked. Have vtemp to avoid overlap constraints. */
if (vd == vm)
{
- macro_build (NULL, "vmsltu.vx", "Vd,Vt,s", vtemp, vs2, vs1);
+ macro_build (NULL, "vmsltu.vx", "Vd,Vt,sVm", vtemp, vs2, vs1, -1);
macro_build (NULL, "vmandnot.mm", "Vd,Vt,Vs", vd, vm, vtemp);
}
else
{
/* Preserve the value of vd if not updating by vm. */
- macro_build (NULL, "vmsltu.vx", "Vd,Vt,s", vtemp, vs2, vs1);
+ macro_build (NULL, "vmsltu.vx", "Vd,Vt,sVm", vtemp, vs2, vs1, -1);
macro_build (NULL, "vmandnot.mm", "Vd,Vt,Vs", vtemp, vm, vtemp);
macro_build (NULL, "vmandnot.mm", "Vd,Vt,Vs", vd, vd, vm);
macro_build (NULL, "vmor.mm", "Vd,Vt,Vs", vd, vtemp, vd);