ghidra icon indicating copy to clipboard operation
ghidra copied to clipboard

Invalid calling convention for arm64

Open sr-tream opened this issue 1 year ago • 0 comments

Describe the bug Extra float variables stored to integer registers, instead of stack. Also stack align set to 4, instead of 8

To Reproduce Steps to reproduce the behavior:

  1. Open function with signature like T(float1, float2, float3, float4, float5, float6, float7, int1, int2, int3, int4, int5, int6, float8, float9, int7, int8)
  2. Ghidra place this args in next stores: s0, s1, s2, s3, s4, s5, s6, s7, w0, w1, w2, w3, w4, w5, w6, w7, sstack[0x0]:4, sstack[0x4]:4

Expected behavior Right stores fo this args: s0, s1, s2, s3, s4, s5, s6, s7, w0, w1, w2, w3, w4, w5, sstack[0x0]:4, sstack[0x8]:4, w6, w7

Screenshots image

image

Attachments

Builtin Specification extension: __cdecl.xml.txt

Environment (please complete the following information):

  • OS: ArchLinux
  • Java Version: 17
  • Ghidra Version: 10.4
  • Ghidra Origin: 033d2a2ec6b573a3b17f264d17f7c3d0cfb85f13

sr-tream avatar May 18 '23 12:05 sr-tream