Skip to content

Commit

Permalink
add: debug gpr.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
umanachi authored and ShinyMiraidon committed Sep 22, 2023
1 parent a04250d commit afa8c64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dv/gpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TEST_CASE("REGS") {
VGPR model;
uint8_t regsrc1, regsrc2;
uint32_t dstdata;
uint32_t regvals[32];
uint32_t regvals[32] = {0};

for(int i = 0; i < 1000; i++) {
// initialize
Expand All @@ -18,7 +18,7 @@ TEST_CASE("REGS") {
model.rstn = 0;
model.eval();

for(int regdst = 0; regdst < 32; regdst++) {
for(int regdst = 1; regdst < 32; regdst++) {
dstdata = rand() % (int) (pow(2, 32) - 1);
regvals[regdst] = dstdata;

Expand Down Expand Up @@ -48,4 +48,4 @@ TEST_CASE("REGS") {
REQUIRE(model.rs1d == regvals[regsrc1]);
REQUIRE(model.rs2d == regvals[regsrc2]);
}
}
}

0 comments on commit afa8c64

Please sign in to comment.