Skip to content

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

@jrmuizel

Description

@jrmuizel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    X86ArchbugSomething is not working as it should

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions