Skip to content

Commit

Permalink
Adjusts offset of memory access in disassembler tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Dec 29, 2023
1 parent 2e48d19 commit 58ea841
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/disassembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,22 @@ fn test_lddw() {
// Example for InstructionType::LoadReg.
#[test]
fn test_ldxdw() {
disasm!("entrypoint:\n ldxdw r1, [r2+0x3]\n");
disasm!("entrypoint:\n ldxdw r1, [r2-0x3]\n");
disasm!("entrypoint:\n ldxdw r1, [r2+0x7999]\n");
disasm!("entrypoint:\n ldxdw r1, [r2-0x8000]\n");
}

// Example for InstructionType::StoreImm.
#[test]
fn test_sth() {
disasm!("entrypoint:\n sth [r1+0x2], 3\n");
disasm!("entrypoint:\n sth [r1-0x2], 3\n");
disasm!("entrypoint:\n sth [r1+0x7999], 3\n");
disasm!("entrypoint:\n sth [r1-0x8000], 3\n");
}

// Example for InstructionType::StoreReg.
#[test]
fn test_stxh() {
disasm!("entrypoint:\n stxh [r1+0x2], r3\n");
disasm!("entrypoint:\n stxh [r1-0x2], r3\n");
disasm!("entrypoint:\n stxh [r1+0x7999], r3\n");
disasm!("entrypoint:\n stxh [r1-0x8000], r3\n");
}

// Test all supported AluBinary mnemonics.
Expand Down

0 comments on commit 58ea841

Please sign in to comment.