**Version and Platform (required):** - Binary Ninja Version: 3.4.4251-dev, 3f761e0a - OS: ubuntu - OS Version: 22.10 - CPU Architecture: x86_64 Code below is loading an 8-byte value into a floating point register. ``` 000020792 93ed047b vldr d7, [r3, #0x10] {data_dd908} {0xfefa0000} ``` Why doesn't BN automatically define a double at `data_dd908`? ``` \x00\x00\x00\x00\x00\x008C\x00\x00\xfa\xfeB.v\xbf:;\x9e\xbc\x9a\xf7\x0c\xbd\xbd\xfd\xff\xff\xff\xff\xdf? ``` HLIL thinks I'm dealing with integers ``` 00002078e q1 = (0 - *(int64_t*)((char*)q1)[8]); ``` Is this because I implemented `VLDR` as a regular register load? ``` case armv7::ARMV7_VLDR: if (instr->format->operandCount == 3) { uint32_t reg = GetRegisterByIndex(instr->fields[instr->format->operands[1].field0]); il.AddInstruction(WriteILOperand(il, instr, 0, il.Load(4, GetMemoryAddress(il, instr, 1, 4, false)))); il.AddInstruction(il.SetRegister(4, reg, il.Add(4, il.Register(4, reg), ReadILOperand(il, instr, 2)))); } else { il.AddInstruction(WriteILOperand(il, instr, 0, il.Load(4, GetMemoryAddress(il, instr, 1, 4)))); } break; ```
Activity
plafosse commentedon Apr 24, 2023
Yes I would assume because the IL isn't loading it as a float
joelreymont commentedon Apr 24, 2023
plafosse commentedon Apr 24, 2023
Something like
I think.
plafosse commentedon Apr 24, 2023
For an example of this see: https://github.com/Vector35/arch-x86/blob/5b134ac7da45c009094faf654f613a9ecd11cae8/il.cpp#L286