Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kathlenemagnus committed Dec 11, 2024
1 parent aa8d5d9 commit edf7af2
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 33 deletions.
12 changes: 6 additions & 6 deletions core/inst_handlers/a/RvaInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace atlas
template <typename XLEN>
void RvaInsts::getInstComputeAddressHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace(
"amoadd.d",
Expand Down Expand Up @@ -117,7 +117,7 @@ namespace atlas
atlas::Action::createAction<&RvaInsts::sc_w_64_compute_address_handler, RvaInsts>(
nullptr, "sc_w", ActionTags::COMPUTE_ADDR_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand All @@ -126,8 +126,8 @@ namespace atlas
template <typename XLEN>
void RvaInsts::getInstHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace(
"amoadd.d", atlas::Action::createAction<&RvaInsts::amoadd_d_64_handler, RvaInsts>(
Expand Down Expand Up @@ -196,7 +196,7 @@ namespace atlas
atlas::Action::createAction<&RvaInsts::sc_w_64_handler, RvaInsts>(
nullptr, "sc_w", ActionTags::EXECUTE_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand Down
12 changes: 6 additions & 6 deletions core/inst_handlers/d/RvdInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace atlas
template <typename XLEN>
void RvdInsts::getInstComputeAddressHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace(
"fld",
Expand All @@ -27,7 +27,7 @@ namespace atlas
atlas::Action::createAction<&RvdInsts::fsw_64_compute_address_handler, RvdInsts>(
nullptr, "fsw", ActionTags::COMPUTE_ADDR_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand All @@ -36,8 +36,8 @@ namespace atlas
template <typename XLEN>
void RvdInsts::getInstHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace(
"fadd.d", atlas::Action::createAction<&RvdInsts::fadd_d_64_handler, RvdInsts>(
Expand Down Expand Up @@ -148,7 +148,7 @@ namespace atlas
atlas::Action::createAction<&RvdInsts::fsw_64_handler, RvdInsts>(
nullptr, "fsw", ActionTags::EXECUTE_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand Down
12 changes: 6 additions & 6 deletions core/inst_handlers/f/RvfInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace atlas
template <typename XLEN>
void RvfInsts::getInstComputeAddressHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace(
"flw",
Expand All @@ -19,7 +19,7 @@ namespace atlas
atlas::Action::createAction<&RvfInsts::fsw_64_compute_address_handler, RvfInsts>(
nullptr, "fsw", ActionTags::COMPUTE_ADDR_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand All @@ -28,8 +28,8 @@ namespace atlas
template <typename XLEN>
void RvfInsts::getInstHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace(
"fadd.s", atlas::Action::createAction<&RvfInsts::fadd_s_64_handler, RvfInsts>(
Expand Down Expand Up @@ -122,7 +122,7 @@ namespace atlas
atlas::Action::createAction<&RvfInsts::fsw_64_handler, RvfInsts>(
nullptr, "fsw", ActionTags::EXECUTE_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand Down
12 changes: 6 additions & 6 deletions core/inst_handlers/i/RviInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace atlas
template <typename XLEN>
void RviInsts::getInstComputeAddressHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace(
"lb",
Expand Down Expand Up @@ -58,7 +58,7 @@ namespace atlas
atlas::Action::createAction<&RviInsts::sw_64_compute_address_handler, RviInsts>(
nullptr, "sw", ActionTags::COMPUTE_ADDR_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand All @@ -67,8 +67,8 @@ namespace atlas
template <typename XLEN>
void RviInsts::getInstHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace("add",
atlas::Action::createAction<&RviInsts::add_64_handler, RviInsts>(
Expand Down Expand Up @@ -267,7 +267,7 @@ namespace atlas
atlas::Action::createAction<&RviInsts::xori_64_handler, RviInsts>(
nullptr, "xori", ActionTags::EXECUTE_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand Down
6 changes: 3 additions & 3 deletions core/inst_handlers/m/RvmInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace atlas
template <typename XLEN>
void RvmInsts::getInstHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace("div",
atlas::Action::createAction<&RvmInsts::div_64_handler, RvmInsts>(
Expand Down Expand Up @@ -53,7 +53,7 @@ namespace atlas
atlas::Action::createAction<&RvmInsts::remw_64_handler, RvmInsts>(
nullptr, "remw", ActionTags::EXECUTE_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand Down
6 changes: 3 additions & 3 deletions core/inst_handlers/zicsr/RvzicsrInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace atlas
template <typename XLEN>
void RvzicsrInsts::getInstHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace(
"csrrc", atlas::Action::createAction<&RvzicsrInsts::csrrc_64_handler, RvzicsrInsts>(
Expand All @@ -32,7 +32,7 @@ namespace atlas
atlas::Action::createAction<&RvzicsrInsts::csrrwi_64_handler, RvzicsrInsts>(
nullptr, "csrrwi", ActionTags::EXECUTE_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand Down
6 changes: 3 additions & 3 deletions core/inst_handlers/zifencei/RvzifenceiInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ namespace atlas
template <typename XLEN>
void RvzifenceiInsts::getInstHandlers(std::map<std::string, Action> & inst_handlers)
{
static_assert(std::is_same<XLEN, RV64>::value || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same<XLEN, RV64>::value)
static_assert(std::is_same_v<XLEN, RV64> || std::is_same<XLEN, RV32>::value);
if constexpr (std::is_same_v<XLEN, RV64>)
{
inst_handlers.emplace(
"fence.i",
atlas::Action::createAction<&RvzifenceiInsts::fence_i_64_handler, RvzifenceiInsts>(
nullptr, "fence_i", ActionTags::EXECUTE_TAG));
}
else if constexpr (std::is_same<XLEN, RV32>::value)
else if constexpr (std::is_same_v<XLEN, RV32>)
{
sparta_assert(false, "RV32 is not supported yet!");
}
Expand Down

0 comments on commit edf7af2

Please sign in to comment.