pass in extra arg (bitwidth) into rv_sr
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 6 Nov 2018 11:33:26 +0000 (11:33 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 6 Nov 2018 11:33:26 +0000 (11:33 +0000)
riscv/insns/sra.h
riscv/insns/srai.h
riscv/insns/sraiw.h
riscv/insns/sraw.h
riscv/insns/srl.h
riscv/insns/srli.h
riscv/insns/srliw.h
riscv/insns/srlw.h

index 5f0586f5493ed749cf9f3a2c61b2ae75186c3fb1..52b30a8d5cc0b37f395149ebc1a76ac148dad021 100644 (file)
@@ -1,2 +1 @@
-WRITE_RD(sext_xlen(rv_sr(sext_xlen(RS1),
-                         rv_and(RS2, sv_reg_t(xlen-1)))));
+WRITE_RD(sext_xlen(rv_sr(sext_xlen(RS1), RS2, xlen)));
index 2de77e38000b93ba650b0979a77158df9b666593..86b20250f6b5f547114a8a657d691b772ea9abb4 100644 (file)
@@ -1,2 +1,2 @@
 require(rv_lt(SHAMT, sv_reg_t(xlen)));
-WRITE_RD(sext_xlen(rv_sr(sext_xlen(RS1), SHAMT)));
+WRITE_RD(sext_xlen(rv_sr(sext_xlen(RS1), SHAMT, 64)));
index 6c4d3323c0833d56b8edfd76b1aca8a7d3bfcaef..31b3b7666f03a5ac10f9f28d42423eef9069cd33 100644 (file)
@@ -1,2 +1,2 @@
 require_rv64;
-WRITE_RD(sext32(rv_sr(sv_reg_int32(RS1), SHAMT)));
+WRITE_RD(sext32(rv_sr(sv_reg_int32(RS1), SHAMT, 64)));
index 99d3e21f5669a3de0e68339f873df253675b7fd6..83607f97687323dc3194ba051ea99f931d1b77d1 100644 (file)
@@ -1,2 +1,2 @@
 require_rv64;
-WRITE_RD(sext32(rv_sr(sv_reg_int32(RS1), RS2, 0x1FU)));
+WRITE_RD(sext32(rv_sr(sv_reg_int32(RS1), RS2, 32U)));
index c51d2ad761c264c0049f44f8e7fe933d9149aa25..1d854c16953a979010815c3283b90649d19fcaca 100644 (file)
@@ -1,2 +1 @@
-WRITE_RD(sext_xlen(rv_sr(zext_xlen(RS1),
-                         rv_and(RS2, sv_reg_t(xlen-1)))));
+WRITE_RD(sext_xlen(rv_sr(zext_xlen(RS1), RS2, xlen)));
index bca4c8356aada577338ee5343a09579ef40491c8..e87caba69c849582c8d924fce1b57b28dbefd7fd 100644 (file)
@@ -1,2 +1,2 @@
 require(rv_lt(SHAMT, sv_reg_t(xlen)));
-WRITE_RD(sext_xlen(rv_sr(zext_xlen(RS1), SHAMT)));
+WRITE_RD(sext_xlen(rv_sr(zext_xlen(RS1), SHAMT, 64)));
index 357c72462e974136e2179146bac6318998b86539..4dfc0ed8d81eefc0a52d364289cfbf1dceefac41 100644 (file)
@@ -1,2 +1,2 @@
 require_rv64;
-WRITE_RD(sext32(rv_sr(sv_reg_uint32(RS1), SHAMT)));
+WRITE_RD(sext32(rv_sr(sv_reg_uint32(RS1), SHAMT, 64)));
index 34b574e0f75ea5bc0500dc8811682dbd542eb7e0..2cf8cef1897b364c5ccc29fce74eac72583253a5 100644 (file)
@@ -1,3 +1,2 @@
 require_rv64;
-WRITE_RD(sext32(rv_sr(sv_reg_uint32(RS1),
-                      rv_and(RS2, sv_reg_t(0x1FU)))));
+WRITE_RD(sext32(rv_sr(sv_reg_uint32(RS1), RS2, 32U)));