Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Commit

Permalink
fix: mte instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Nov 12, 2020
1 parent bcf52b6 commit e596084
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions arm64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1337,13 +1337,13 @@ func Test_decompose_single_instr(t *testing.T) {
wantErr bool
}{
{
name: "stllr x1, [x4]",
name: "stg x8, [x8]",
args: args{
// instructionValue: 0x9AC03000,
instructionValue: binary.LittleEndian.Uint32([]byte{0x81, 0x18, 0x8d, 0xc8}),
instructionValue: binary.LittleEndian.Uint32([]byte{0x08, 0x09, 0x20, 0xd9}),
address: 0,
},
want: "stllr x1, [x4]",
want: "stg x8, [x8]",
wantErr: false,
},
}
Expand Down
7 changes: 3 additions & 4 deletions decompose.go
Original file line number Diff line number Diff line change
Expand Up @@ -7358,13 +7358,12 @@ func decompose(instructionValue uint32, address uint64) (*Instruction, error) {
}

if ExtractBits(instructionValue, 24, 6) == 25 {
if op0 == 0x0d {
return instruction.decompose_load_store_mem_tags()
}
return instruction.decompose_load_store_unscaled()
}

if op0 == 0x0d {
return instruction.decompose_load_store_mem_tags()
}

if (op0&3) == 0 && op1 == 0 && (op2>>1) == 0 {
return instruction.decompose_load_store_exclusive()
}
Expand Down

0 comments on commit e596084

Please sign in to comment.