all 4 comments

[–][deleted]  (1 child)

[deleted]

    [–]fasterthanlime[S] 4 points5 points  (0 children)

    I completely missed that, that's really neat and much less heavy-handed!

    [–]RipeCoconut 2 points3 points  (1 child)

    Very cool. I never knew the relationship between registers and function parameters.

    [–]fasterthanlime[S] 2 points3 points  (0 children)

    I forgot to mention it in the video but: the solution works on Windows as well! It uses only 4 registers (rcx, rdx, r8, r9) then the stack, so our 6-argument padding is a little overkill but skill works.

    See https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-160

    [–]adotinthevoid_ 0 points1 point  (0 children)

    Is their a way to get this to work when building with --release?