Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cstool -d x64 "4c 85 7d 30" doesn't give the correct register reads after sync with LLVM 7.0.1 #2128

Closed
Tracked by #2081
jrmuizel opened this issue Jul 29, 2023 · 0 comments · Fixed by #2335
Closed
Tracked by #2081
Labels
Milestone

Comments

@jrmuizel
Copy link

Before:

 0  4c 85 7d 30                                      test	qword ptr [rbp + 0x30], r15
	Prefix:0x00 0x00 0x00 0x00
	Opcode:0x85 0x00 0x00 0x00
	rex: 0x4c
	addr_size: 8
	modrm: 0x7d
	disp: 0x30
	sib: 0x0
	op_count: 2
		operands[0].type: MEM
			operands[0].mem.base: REG = rbp
			operands[0].mem.disp: 0x30
		operands[0].size: 8
		operands[0].access: READ
		operands[1].type: REG = r15
		operands[1].size: 8
		operands[1].access: READ
	Registers read: rbp r15
	Registers modified: rflags
	EFLAGS: MOD_SF MOD_ZF MOD_PF RESET_OF RESET_CF UNDEF_AF

after

 0  4c 85 7d 30                                      test	qword ptr [rbp + 0x30], r15
	Prefix:0x00 0x00 0x00 0x00
	Opcode:0x85 0x00 0x00 0x00
	rex: 0x4c
	addr_size: 8
	modrm: 0x7d
	disp: 0x30
	sib: 0x0
	op_count: 2
		operands[0].type: MEM
			operands[0].mem.base: REG = rbp
			operands[0].mem.disp: 0x30
		operands[0].size: 8
		operands[1].type: REG = r15
		operands[1].size: 8
	Registers read: rbp

The read access of r15 is not included in operands[1] and r15 doesn't show up in "Registers read"

I bisected this to 5a99624

@XVilka XVilka mentioned this issue Jul 26, 2023
24 tasks
@Rot127 Rot127 added this to the v5.0.2 milestone Mar 19, 2024
@Rot127 Rot127 added bug X86 Arch labels Mar 20, 2024
Rot127 added a commit to Rot127/capstone that referenced this issue Apr 24, 2024
Rot127 added a commit to Rot127/capstone that referenced this issue Apr 24, 2024
Rot127 added a commit to Rot127/capstone that referenced this issue Apr 24, 2024
Rot127 added a commit to Rot127/capstone that referenced this issue Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants