Skip to content

Commit 6461ed0

Browse files
authored
Add Call group to svc, smc and hvc. (#2651)
1 parent e2f1dc8 commit 6461ed0

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

arch/AArch64/AArch64GenCSMappingInsn.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29070,7 +29070,7 @@
2907029070
/* hvc $imm */
2907129071
AArch64_HVC /* 3813 */, AARCH64_INS_HVC,
2907229072
#ifndef CAPSTONE_DIET
29073-
{ 0 }, { 0 }, { 0 }, 0, 0, { .aarch64 = { .mem_acc = CS_AC_INVALID }}
29073+
{ 0 }, { 0 }, { AARCH64_GRP_CALL, 0 }, 0, 0, { .aarch64 = { .mem_acc = CS_AC_INVALID }}
2907429074

2907529075
#endif
2907629076
},
@@ -43350,7 +43350,7 @@
4335043350
/* smc $imm */
4335143351
AArch64_SMC /* 5598 */, AARCH64_INS_SMC,
4335243352
#ifndef CAPSTONE_DIET
43353-
{ 0 }, { 0 }, { AARCH64_FEATURE_HASEL3, 0 }, 0, 0, { .aarch64 = { .mem_acc = CS_AC_INVALID }}
43353+
{ 0 }, { 0 }, { AARCH64_GRP_CALL, AARCH64_FEATURE_HASEL3, 0 }, 0, 0, { .aarch64 = { .mem_acc = CS_AC_INVALID }}
4335443354

4335543355
#endif
4335643356
},
@@ -54582,7 +54582,7 @@
5458254582
/* svc $imm */
5458354583
AArch64_SVC /* 7002 */, AARCH64_INS_SVC,
5458454584
#ifndef CAPSTONE_DIET
54585-
{ 0 }, { 0 }, { 0 }, 0, 0, { .aarch64 = { .mem_acc = CS_AC_INVALID }}
54585+
{ 0 }, { 0 }, { AARCH64_GRP_CALL, 0 }, 0, 0, { .aarch64 = { .mem_acc = CS_AC_INVALID }}
5458654586

5458754587
#endif
5458854588
},

tests/issues/issues.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5840,3 +5840,43 @@ test_cases:
58405840
- type: MIPS_OP_IMM
58415841
imm: 0
58425842
access: CS_AC_READ
5843+
5844+
-
5845+
input:
5846+
name: "issue 2630 - missing call group for svc, hvc, smc."
5847+
bytes: [ 0xc2, 0x00, 0x00, 0xd4 ]
5848+
arch: "CS_ARCH_AARCH64"
5849+
options: [ CS_OPT_DETAIL ]
5850+
address: 0x0
5851+
expected:
5852+
insns:
5853+
-
5854+
asm_text: "hvc #0x6"
5855+
details:
5856+
groups: [ call ]
5857+
-
5858+
input:
5859+
name: "issue 2630 - missing call group for svc, hvc, smc."
5860+
bytes: [ 0xe3, 0x00, 0x00, 0xd4 ]
5861+
arch: "CS_ARCH_AARCH64"
5862+
options: [ CS_OPT_DETAIL ]
5863+
address: 0x0
5864+
expected:
5865+
insns:
5866+
-
5867+
asm_text: "smc #0x7"
5868+
details:
5869+
groups: [ call, HasEL3, privilege ]
5870+
-
5871+
input:
5872+
name: "issue 2630 - missing call group for svc, hvc, smc."
5873+
bytes: [ 0x01, 0x01, 0x00, 0xd4 ]
5874+
arch: "CS_ARCH_AARCH64"
5875+
options: [ CS_OPT_DETAIL ]
5876+
address: 0x0
5877+
expected:
5878+
insns:
5879+
-
5880+
asm_text: "svc #0x8"
5881+
details:
5882+
groups: [ call, int ]

0 commit comments

Comments
 (0)