Skip to content

Commit

Permalink
updated instruction casting
Browse files Browse the repository at this point in the history
  • Loading branch information
ved-rivos committed Nov 2, 2023
1 parent d244d2c commit e2d382b
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion riscv/insns/amoadd_b.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int8_t)MMU.amo<uint8_t>(RS1, [&](uint8_t lhs) { return lhs + RS2; })));
WRITE_RD(sreg_t(MMU.amo<int8_t>(RS1, [&](int8_t lhs) { return lhs + RS2; })));
2 changes: 1 addition & 1 deletion riscv/insns/amoadd_h.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int16_t)MMU.amo<uint16_t>(RS1, [&](uint16_t lhs) { return lhs + RS2; })));
WRITE_RD(sreg_t(MMU.amo<int16_t>(RS1, [&](int16_t lhs) { return lhs + RS2; })));
2 changes: 1 addition & 1 deletion riscv/insns/amoand_b.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int8_t)MMU.amo<uint8_t>(RS1, [&](uint8_t lhs) { return lhs & RS2; })));
WRITE_RD(sreg_t(MMU.amo<int8_t>(RS1, [&](int8_t lhs) { return lhs & RS2; })));
2 changes: 1 addition & 1 deletion riscv/insns/amoand_h.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int16_t)MMU.amo<uint16_t>(RS1, [&](uint16_t lhs) { return lhs & RS2; })));
WRITE_RD(sreg_t(MMU.amo<int16_t>(RS1, [&](int16_t lhs) { return lhs & RS2; })));
2 changes: 1 addition & 1 deletion riscv/insns/amocas_b.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require_extension(EXT_ZACAS);
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int8_t)MMU.amo_compare_and_swap<uint8_t>(RS1, RD, RS2)));
WRITE_RD(sreg_t(MMU.amo_compare_and_swap<int8_t>(RS1, RD, RS2)));
2 changes: 1 addition & 1 deletion riscv/insns/amocas_h.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require_extension(EXT_ZACAS);
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int16_t)MMU.amo_compare_and_swap<uint16_t>(RS1, RD, RS2)));
WRITE_RD(sreg_t(MMU.amo_compare_and_swap<int16_t>(RS1, RD, RS2)));
2 changes: 1 addition & 1 deletion riscv/insns/amomax_b.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int8_t)MMU.amo<uint8_t>(RS1, [&](int8_t lhs) { return std::max(lhs, int8_t(RS2)); })));
WRITE_RD(sreg_t(MMU.amo<int8_t>(RS1, [&](int8_t lhs) { return std::max(lhs, int8_t(RS2)); })));
2 changes: 1 addition & 1 deletion riscv/insns/amomax_h.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int16_t)MMU.amo<uint16_t>(RS1, [&](int16_t lhs) { return std::max(lhs, int16_t(RS2)); })));
WRITE_RD(sreg_t(MMU.amo<int16_t>(RS1, [&](int16_t lhs) { return std::max(lhs, int16_t(RS2)); })));
2 changes: 1 addition & 1 deletion riscv/insns/amomaxu_b.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int8_t)MMU.amo<uint8_t>(RS1, [&](uint8_t lhs) { return std::max(lhs, uint8_t(RS2)); })));
WRITE_RD(sreg_t(MMU.amo<int8_t>(RS1, [&](uint8_t lhs) { return std::max(lhs, uint8_t(RS2)); })));
2 changes: 1 addition & 1 deletion riscv/insns/amomaxu_h.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int16_t)MMU.amo<uint16_t>(RS1, [&](uint16_t lhs) { return std::max(lhs, uint16_t(RS2)); })));
WRITE_RD(sreg_t(MMU.amo<int16_t>(RS1, [&](uint16_t lhs) { return std::max(lhs, uint16_t(RS2)); })));
2 changes: 1 addition & 1 deletion riscv/insns/amomin_b.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int8_t)MMU.amo<uint8_t>(RS1, [&](int8_t lhs) { return std::min(lhs, int8_t(RS2)); })));
WRITE_RD(sreg_t(MMU.amo<int8_t>(RS1, [&](int8_t lhs) { return std::min(lhs, int8_t(RS2)); })));
2 changes: 1 addition & 1 deletion riscv/insns/amomin_h.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int16_t)MMU.amo<uint16_t>(RS1, [&](int16_t lhs) { return std::min(lhs, int16_t(RS2)); })));
WRITE_RD(sreg_t(MMU.amo<int16_t>(RS1, [&](int16_t lhs) { return std::min(lhs, int16_t(RS2)); })));
2 changes: 1 addition & 1 deletion riscv/insns/amominu_b.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int8_t)MMU.amo<uint8_t>(RS1, [&](uint8_t lhs) { return std::min(lhs, uint8_t(RS2)); })));
WRITE_RD(sreg_t(MMU.amo<int8_t>(RS1, [&](uint8_t lhs) { return std::min(lhs, uint8_t(RS2)); })));
2 changes: 1 addition & 1 deletion riscv/insns/amominu_h.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int16_t)MMU.amo<uint16_t>(RS1, [&](uint16_t lhs) { return std::min(lhs, uint16_t(RS2)); })));
WRITE_RD(sreg_t(MMU.amo<int16_t>(RS1, [&](uint16_t lhs) { return std::min(lhs, uint16_t(RS2)); })));
2 changes: 1 addition & 1 deletion riscv/insns/amoor_b.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int8_t)MMU.amo<uint8_t>(RS1, [&](uint8_t lhs) { return lhs | RS2; })));
WRITE_RD(sreg_t(MMU.amo<int8_t>(RS1, [&](int8_t lhs) { return lhs | RS2; })));
2 changes: 1 addition & 1 deletion riscv/insns/amoor_h.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int16_t)MMU.amo<uint16_t>(RS1, [&](uint16_t lhs) { return lhs | RS2; })));
WRITE_RD(sreg_t(MMU.amo<int16_t>(RS1, [&](int16_t lhs) { return lhs | RS2; })));
2 changes: 1 addition & 1 deletion riscv/insns/amoswap_b.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int8_t)MMU.amo<uint8_t>(RS1, [&](uint8_t UNUSED lhs) { return RS2; })));
WRITE_RD(sreg_t(MMU.amo<int8_t>(RS1, [&](int8_t UNUSED lhs) { return RS2; })));
2 changes: 1 addition & 1 deletion riscv/insns/amoswap_h.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int16_t)MMU.amo<uint16_t>(RS1, [&](uint16_t UNUSED lhs) { return RS2; })));
WRITE_RD(sreg_t(MMU.amo<int16_t>(RS1, [&](int16_t UNUSED lhs) { return RS2; })));
2 changes: 1 addition & 1 deletion riscv/insns/amoxor_b.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int8_t)MMU.amo<uint8_t>(RS1, [&](uint8_t lhs) { return lhs ^ RS2; })));
WRITE_RD(sreg_t(MMU.amo<int8_t>(RS1, [&](int8_t lhs) { return lhs ^ RS2; })));
2 changes: 1 addition & 1 deletion riscv/insns/amoxor_h.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require_extension(EXT_ZABHA);
WRITE_RD(sreg_t((int16_t)MMU.amo<uint16_t>(RS1, [&](uint16_t lhs) { return lhs ^ RS2; })));
WRITE_RD(sreg_t(MMU.amo<int16_t>(RS1, [&](int16_t lhs) { return lhs ^ RS2; })));

0 comments on commit e2d382b

Please sign in to comment.