Skip to content

Commit

Permalink
#87 - Fixed CALL instruction access for rIP operand - it must inc…
Browse files Browse the repository at this point in the history
…lude read access, as the instruction pointer is saved on the stack.
  • Loading branch information
vlutas committed Feb 26, 2024
1 parent 2b12d0a commit 3df189f
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 80 deletions.
8 changes: 4 additions & 4 deletions bddisasm/include/bdx86_instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -6971,7 +6971,7 @@ const ND_IDBE gInstructions[4075] =
.Operands =
{
OP(ND_OPT_E, ND_OPS_v, 0, ND_OPA_R, 0, 0),
OP(ND_OPT_rIP, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_W, 0, 0),
OP(ND_OPT_rIP, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_RW, 0, 0),
OP(ND_OPT_K, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_W, 0, 0),
OP(ND_OPT_SHSP, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_W, 0, 0),
},
Expand Down Expand Up @@ -7001,7 +7001,7 @@ const ND_IDBE gInstructions[4075] =
{
OP(ND_OPT_A, ND_OPS_p, 0, ND_OPA_R, 0, 0),
OP(ND_OPT_CS, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_RW, 0, 0),
OP(ND_OPT_rIP, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_W, 0, 0),
OP(ND_OPT_rIP, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_RW, 0, 0),
OP(ND_OPT_K, ND_OPS_v2, ND_OPF_OPDEF, ND_OPA_W, 0, 0),
OP(ND_OPT_SHSP, ND_OPS_v2, ND_OPF_OPDEF, ND_OPA_W, 0, 0),
},
Expand Down Expand Up @@ -7030,8 +7030,8 @@ const ND_IDBE gInstructions[4075] =
.Operands =
{
OP(ND_OPT_M, ND_OPS_p, 0, ND_OPA_R, 0, 0),
OP(ND_OPT_CS, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_W, 0, 0),
OP(ND_OPT_rIP, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_W, 0, 0),
OP(ND_OPT_CS, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_RW, 0, 0),
OP(ND_OPT_rIP, ND_OPS_v, ND_OPF_OPDEF, ND_OPA_RW, 0, 0),
OP(ND_OPT_K, ND_OPS_v2, ND_OPF_OPDEF, ND_OPA_W, 0, 0),
OP(ND_OPT_SHSP, ND_OPS_v2, ND_OPF_OPDEF, ND_OPA_W, 0, 0),
},
Expand Down
34 changes: 17 additions & 17 deletions bddisasm_test/x86/basic/branch_16.result
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
HLE: no, XACQUIRE only: no, XRELEASE only: no
BND: yes, BHINT: no, DNT: yes
Operand: 0, Acc: R-, Type: Register, Size: 2, RawSize: 2, Encoding: M, RegType: General Purpose, RegSize: 2, RegId: 0, RegCount: 1
Operand: 1, Acc: -W, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 1, Acc: RW, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 2, Acc: -W, Type: Memory, Size: 2, RawSize: 2, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 3, Acc: -W, Type: Memory, Size: 2, RawSize: 2, Encoding: S, Shadow stack: 3,
Expand All @@ -49,7 +49,7 @@
HLE: no, XACQUIRE only: no, XRELEASE only: no
BND: yes, BHINT: no, DNT: yes
Operand: 0, Acc: R-, Type: Register, Size: 4, RawSize: 4, Encoding: M, RegType: General Purpose, RegSize: 4, RegId: 0, RegCount: 1
Operand: 1, Acc: -W, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 1, Acc: RW, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 2, Acc: -W, Type: Memory, Size: 4, RawSize: 4, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 3, Acc: -W, Type: Memory, Size: 4, RawSize: 4, Encoding: S, Shadow stack: 3,
Expand All @@ -69,7 +69,7 @@
BND: yes, BHINT: no, DNT: yes
Operand: 0, Acc: R-, Type: Memory, Size: 2, RawSize: 2, Encoding: M,
Segment: 3, Base: 3,
Operand: 1, Acc: -W, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 1, Acc: RW, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 2, Acc: -W, Type: Memory, Size: 2, RawSize: 2, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 3, Acc: -W, Type: Memory, Size: 2, RawSize: 2, Encoding: S, Shadow stack: 3,
Expand All @@ -89,7 +89,7 @@
BND: yes, BHINT: no, DNT: yes
Operand: 0, Acc: R-, Type: Memory, Size: 2, RawSize: 2, Encoding: M,
Segment: 3, Base: 3,
Operand: 1, Acc: -W, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 1, Acc: RW, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 2, Acc: -W, Type: Memory, Size: 2, RawSize: 2, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 3, Acc: -W, Type: Memory, Size: 2, RawSize: 2, Encoding: S, Shadow stack: 3,
Expand All @@ -109,7 +109,7 @@
BND: yes, BHINT: no, DNT: yes
Operand: 0, Acc: R-, Type: Memory, Size: 2, RawSize: 2, Encoding: M,
Segment: 3, Base: 3,
Operand: 1, Acc: -W, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 1, Acc: RW, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 2, Acc: -W, Type: Memory, Size: 2, RawSize: 2, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 3, Acc: -W, Type: Memory, Size: 2, RawSize: 2, Encoding: S, Shadow stack: 3,
Expand All @@ -129,7 +129,7 @@
BND: yes, BHINT: no, DNT: yes
Operand: 0, Acc: R-, Type: Memory, Size: 4, RawSize: 4, Encoding: M,
Segment: 3, Base: 3,
Operand: 1, Acc: -W, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 1, Acc: RW, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 2, Acc: -W, Type: Memory, Size: 4, RawSize: 4, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 3, Acc: -W, Type: Memory, Size: 4, RawSize: 4, Encoding: S, Shadow stack: 3,
Expand Down Expand Up @@ -258,7 +258,7 @@
BND: no, BHINT: no, DNT: no
Operand: 0, Acc: R-, Type: Address, Size: 4, RawSize: 4, Encoding: D
Operand: 1, Acc: RW, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: Segment, RegSize: 2, RegId: 1, RegCount: 1
Operand: 2, Acc: -W, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 2, Acc: RW, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 3, Acc: -W, Type: Memory, Size: 4, RawSize: 4, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 4, Acc: -W, Type: Memory, Size: 4, RawSize: 4, Encoding: S, Shadow stack: 3,
Expand All @@ -278,7 +278,7 @@
BND: no, BHINT: no, DNT: no
Operand: 0, Acc: R-, Type: Address, Size: 6, RawSize: 6, Encoding: D
Operand: 1, Acc: RW, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: Segment, RegSize: 4, RegId: 1, RegCount: 1
Operand: 2, Acc: -W, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 2, Acc: RW, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 3, Acc: -W, Type: Memory, Size: 8, RawSize: 8, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 4, Acc: -W, Type: Memory, Size: 8, RawSize: 8, Encoding: S, Shadow stack: 3,
Expand Down Expand Up @@ -314,7 +314,7 @@
BND: no, BHINT: no, DNT: no
Operand: 0, Acc: R-, Type: Address, Size: 6, RawSize: 6, Encoding: D
Operand: 1, Acc: RW, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: Segment, RegSize: 4, RegId: 1, RegCount: 1
Operand: 2, Acc: -W, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 2, Acc: RW, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 3, Acc: -W, Type: Memory, Size: 8, RawSize: 8, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 4, Acc: -W, Type: Memory, Size: 8, RawSize: 8, Encoding: S, Shadow stack: 3,
Expand All @@ -334,8 +334,8 @@
BND: no, BHINT: no, DNT: no
Operand: 0, Acc: R-, Type: Memory, Size: 4, RawSize: 4, Encoding: M,
Segment: 3, Base: 3,
Operand: 1, Acc: -W, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: Segment, RegSize: 2, RegId: 1, RegCount: 1
Operand: 2, Acc: -W, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 1, Acc: RW, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: Segment, RegSize: 2, RegId: 1, RegCount: 1
Operand: 2, Acc: RW, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 3, Acc: -W, Type: Memory, Size: 4, RawSize: 4, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 4, Acc: -W, Type: Memory, Size: 4, RawSize: 4, Encoding: S, Shadow stack: 3,
Expand All @@ -355,8 +355,8 @@
BND: no, BHINT: no, DNT: no
Operand: 0, Acc: R-, Type: Memory, Size: 4, RawSize: 4, Encoding: M,
Segment: 3, Base: 3,
Operand: 1, Acc: -W, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: Segment, RegSize: 2, RegId: 1, RegCount: 1
Operand: 2, Acc: -W, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 1, Acc: RW, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: Segment, RegSize: 2, RegId: 1, RegCount: 1
Operand: 2, Acc: RW, Type: Register, Size: 2, RawSize: 2, Encoding: S, RegType: IP, RegSize: 2, RegId: 0, RegCount: 1
Operand: 3, Acc: -W, Type: Memory, Size: 4, RawSize: 4, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 4, Acc: -W, Type: Memory, Size: 4, RawSize: 4, Encoding: S, Shadow stack: 3,
Expand All @@ -376,8 +376,8 @@
BND: no, BHINT: no, DNT: no
Operand: 0, Acc: R-, Type: Memory, Size: 6, RawSize: 6, Encoding: M,
Segment: 3, Base: 3,
Operand: 1, Acc: -W, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: Segment, RegSize: 4, RegId: 1, RegCount: 1
Operand: 2, Acc: -W, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 1, Acc: RW, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: Segment, RegSize: 4, RegId: 1, RegCount: 1
Operand: 2, Acc: RW, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 3, Acc: -W, Type: Memory, Size: 8, RawSize: 8, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 4, Acc: -W, Type: Memory, Size: 8, RawSize: 8, Encoding: S, Shadow stack: 3,
Expand All @@ -397,8 +397,8 @@
BND: no, BHINT: no, DNT: no
Operand: 0, Acc: R-, Type: Memory, Size: 6, RawSize: 6, Encoding: M,
Segment: 3, Base: 3,
Operand: 1, Acc: -W, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: Segment, RegSize: 4, RegId: 1, RegCount: 1
Operand: 2, Acc: -W, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 1, Acc: RW, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: Segment, RegSize: 4, RegId: 1, RegCount: 1
Operand: 2, Acc: RW, Type: Register, Size: 4, RawSize: 4, Encoding: S, RegType: IP, RegSize: 4, RegId: 0, RegCount: 1
Operand: 3, Acc: -W, Type: Memory, Size: 8, RawSize: 8, Encoding: S, Stack: yes,
Segment: 2, Base: 4,
Operand: 4, Acc: -W, Type: Memory, Size: 8, RawSize: 8, Encoding: S, Shadow stack: 3,
Expand Down
Loading

0 comments on commit 3df189f

Please sign in to comment.