digitalmars.D - AArch64 va_arg()
- Walter Bright (67/67) Feb 19 Figuring out stdarg for the Arm.
- Stefan Koch (3/7) Feb 19 this is without any optimization enabled, right?
- Walter Bright (2/3) Feb 19 Right.
Figuring out stdarg for the Arm. ``` #include <stdarg.h> int square(float a, float b, ...) { va_list args; va_start(args, b); int i = va_arg(args, int); va_end(args); return i; } ``` which compiles to, I kid you not: ``` 78: 540000ab b.lt 8c <square+0x8c> // b.tstop 88: 1400000d b bc <square+0xbc> 9c: 540000ad b.le b0 <square+0xb0> ac: 14000004 b bc <square+0xbc> b4: 93407c20 sxtw x0, w1 b8: 8b000040 add x0, x2, x0 bc: b9400000 ldr w0, [x0] cc: d65f03c0 ret // epilog ```
Feb 19
On Wednesday, 19 February 2025 at 09:11:36 UTC, Walter Bright wrote:Figuring out stdarg for the Arm. ``` which compiles to, I kid you not: [ ... ]this is without any optimization enabled, right?
Feb 19
On 2/19/2025 8:42 AM, Stefan Koch wrote:this is without any optimization enabled, right?Right.
Feb 19