Skip to content

Lifting error for instruction MOVSS (x86) #4030

Description

@Boyan-MILANOV

Binary Ninja Version
Version 2.4.2927-dev

Describe the bug
The LLIL generated for instruction movss xmm0, dword [rel 0x43bfd7] is xmm0 = [0x43bfd7].d . The right hand side [0x43bfd7].d is 32 bits in size while xmm0 is 128 bits long. [0x43bfd7].d should be zero extended to 128 bits, according to the MOVSS instruction reference

To Reproduce
Steps to reproduce the behavior:

  1. Generate LLIL for instruction movss xmm0, dword [rel 0x43bfd7] (or any other address)
  2. See that the LLIL is xmm0 = [0x43bfd7].d, while we rather expect: xmm0 = zx([0x43bfd7].d)
  3. Additionally, the python API can be used to verify that the extend field for [0x43bfd7].d is indeed ImplicitRegisterExtend.NoExtend

Expected behavior
When the second argument of MOVSS is a m32 memory access, the loaded value should be zero extended to 128 bits to match the size of XMM* registers

Version and Platform (required):

  • Binary Ninja: 2.4.2927-dev
  • OS: macOS
  • Version: 11.5.1

Metadata

Metadata

Assignees

Labels

Arch: x86Issues with the x86/x64 architecture pluginComponent: ArchitectureIssue needs changes to an architecture pluginEffort: TrivialIssues require < 1 day of workImpact: LowIssue is a papercut or has a good, supported workaround

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions