Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wysiwyng committed Jan 23, 2024
1 parent f414b42 commit 9fa1218
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ArchImpl/RV64IMACFD/RV64IMACFDArch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void RV64IMACFDArch::resetCPU(ETISS_CPU * cpu,etiss::uint64 * startpointer)
*rv64imacfdcpu->CSR[0] = 11;
*rv64imacfdcpu->CSR[256] = 11;
*rv64imacfdcpu->CSR[768] = 11;
*rv64imacfdcpu->CSR[769] = 9223372036856090925;
*rv64imacfdcpu->CSR[769] = 9223372036856090925ULL;
*rv64imacfdcpu->CSR[3088] = 3;
*rv64imacfdcpu->CSR[772] = 4294966203;
*rv64imacfdcpu->CSR[260] = 4294964019;
Expand Down
4 changes: 2 additions & 2 deletions ArchImpl/RV64IMACFD/RV64IMACFD_RV64MInstr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ cp.code() += "{ // block\n";
cp.code() += "if (*((RV64IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) + "ULL] != 0ULL) { // conditional\n";
{ // block
cp.code() += "{ // block\n";
etiss_int32 MMIN = 2147483648ULL;
etiss_int32 MMIN = -2147483648LL;
cp.code() += "if ((etiss_int32)(*((RV64IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) + "ULL]) == " + std::to_string(MMIN) + "LL && (etiss_int32)(*((RV64IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) + "ULL]) == -1LL) { // conditional\n";
cp.code() += "*((RV64IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) + "ULL] = -2147483648LL;\n";
cp.code() += "} // conditional\n";
Expand Down Expand Up @@ -317,7 +317,7 @@ cp.code() += "{ // block\n";
cp.code() += "if (*((RV64IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) + "ULL] != 0ULL) { // conditional\n";
{ // block
cp.code() += "{ // block\n";
etiss_int32 MMIN = 2147483648ULL;
etiss_int32 MMIN = -2147483648LL;
cp.code() += "if ((etiss_int32)(*((RV64IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) + "ULL]) == " + std::to_string(MMIN) + "LL && (etiss_int32)(*((RV64IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) + "ULL]) == -1LL) { // conditional\n";
cp.code() += "*((RV64IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) + "ULL] = 0ULL;\n";
cp.code() += "} // conditional\n";
Expand Down
2 changes: 1 addition & 1 deletion include/etiss/Instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ class Instruction : public etiss::ToString
Instruction(const OPCode &opc, const std::string &name);
template <typename T, typename = typename std::enable_if<std::is_integral<T>::value, T>::type>
Instruction(unsigned width, const T code, const T mask, const std::string &name)
: width(width), builtinGroups_(0), printer_(printASMSimple), opc_(OPCode(width, code, mask)), name_(name)
: builtinGroups_(0), printer_(printASMSimple), width(width), opc_(OPCode(width, code, mask)), name_(name)
{
}
virtual std::string print(std::string indent, I pos, unsigned pfillwidth, bool printunused = false);
Expand Down
6 changes: 3 additions & 3 deletions src/Instruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ unsigned &InstructionContext::ufield(std::string name)
}

Instruction::Instruction(const OPCode &opc, const std::string &name)
: builtinGroups_(0), printer_(printASMSimple), opc_(opc), name_(name), width(opc.code_.size())
: builtinGroups_(0), printer_(printASMSimple), width(opc.code_.size()), opc_(opc), name_(name)
{
}
std::string Instruction::printASMSimple(BitArray &ba, Instruction &instr)
Expand Down Expand Up @@ -349,7 +349,7 @@ void Instruction::setASMPrinter(std::function<std::string(BitArray &, Instructio
}

InstructionSet::InstructionSet(VariableInstructionSet &parent, unsigned width, const std::string &name, unsigned c_size)
: parent_(parent), name_(name), width_(width), root_(nullptr), invalid(width, -1, -1, "INVALID"), chunk_size(c_size)
: parent_(parent), name_(name), width_(width), chunk_size(c_size), root_(nullptr), invalid(width, -1, -1, "INVALID")
{

}
Expand All @@ -365,7 +365,7 @@ InstructionSet::~InstructionSet()
iter = instrmap_.begin();
delete i;
}
for(int i = 0; i < width_ / chunk_size; i++)
for(unsigned int i = 0; i < width_ / chunk_size; i++)
delete[] root_[i];
delete root_;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bare_etiss_processor/TracePrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class TracePrinter : public etiss::CoroutinePlugin
public:
// ctor
TracePrinter(etiss::uint32 terminateAddr, bool printOnScreen = false, char terminateHit = 1)
: terminateAddr_(terminateAddr), printOnScreen_(printOnScreen), terminateHit_(terminateHit), CoroutinePlugin()
: CoroutinePlugin(), printOnScreen_(printOnScreen), terminateAddr_(terminateAddr), terminateHit_(terminateHit)
{
}

Expand Down

0 comments on commit 9fa1218

Please sign in to comment.