[Issue 22932] New: -vasm: wrong registers shown for calls to C-style variadic functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 25 12:31:40 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22932
Issue ID: 22932
Summary: -vasm: wrong registers shown for calls to C-style
variadic functions
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: disassembler
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: duser at neet.fi
CC: duser at neet.fi
import core.stdc.stdarg;
extern(C) void fn(int, ...) {}
void main()
{
fn(1, 2, 3, 4, 5);
}
-vasm output on 64-bit linux:
_Dmain:
0000: 55 push RBP
0001: 48 8B EC mov RBP,RSP
0004: 41 B8 05 00 00 00 mov EAX,5
000a: B9 04 00 00 00 mov EAX,4
000f: BA 03 00 00 00 mov EAX,3
0014: BE 02 00 00 00 mov EAX,2
0019: BF 01 00 00 00 mov EAX,1
001e: 31 C0 xor EAX,EAX
0020: E8 00 00 00 00 call L0
0025: 31 C0 xor EAX,EAX
0027: 5D pop RBP
0028: C3 ret
--
More information about the Digitalmars-d-bugs
mailing list