Skip to content

Commit

Permalink
update test structure
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasKl committed May 29, 2024
1 parent cbd942d commit 546b7d8
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,9 @@ impl SliceValue {
) -> Self {
let mut tmp = value << idx;
let unsigned = part_type.get_unsigned(unsigned_imm);
println!("bit width {}", bit_width);

if !unsigned && ((tmp >> (bit_width - 1)) != 0) {
println!("{}", tmp);
tmp |= u128::MAX - (1 << bit_width) + 1;
println!("{}", tmp);
}
SliceValue {
name: name.clone(),
Expand Down
10 changes: 5 additions & 5 deletions src/tests/rv32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ macro_rules! isa_test {

#[test]
fn test_rv32i() {
isa_test!("../../examples/RV32I.toml", "src/tests/data/rv32i.test");
isa_test!("../../examples/RV32I.toml", "test_data/rv32/rv32i.test");
}

#[test]
fn test_rv32m() {
isa_test!("../../examples/RV32M.toml", "src/tests/data/rv32m.test");
isa_test!("../../examples/RV32M.toml", "test_data/rv32/rv32m.test");
}

#[test]
fn test_rv32a() {
isa_test!("../../examples/RV32A.toml", "src/tests/data/rv32a.test");
isa_test!("../../examples/RV32A.toml", "test_data/rv32/rv32a.test");
}

#[test]
fn test_rv32f() {
isa_test!("../../examples/RV32F.toml", "src/tests/data/rv32f.test");
isa_test!("../../examples/RV32F.toml", "test_data/rv32/rv32f.test");
}

#[test]
fn test_rv32d() {
isa_test!("../../examples/RV32D.toml", "src/tests/data/rv32d.test");
isa_test!("../../examples/RV32D.toml", "test_data/rv32/rv32d.test");
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 546b7d8

Please sign in to comment.