X86_64 UEFI target uses Microsoft X64 Calling Convention.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/X86/X86CallingConv.td | ||
---|---|---|
522 | You'll need to add switching for Win64 here too; this appears to be the convention used for assigning return values. | |
1165 | It looks like you'll need some stitching in X86RegisterInfo.cpp to cause the Win64 set of callee-saved registers to be used for UEFI targets. |
Handle UEFI64 in X86RegisterInfo for all Win64 equivalent cases except for Swift and OCL.
There should also be tests for this behavior in llvm/test/CodeGen/X86. I wouldn't think it necessary to fully test the calling convention; that should already be well covered; just something in those key test files (e.g., sse-regcall.ll) to verify that the uefi OS actually switches the calling convention at these key points.
You'll need to add switching for Win64 here too; this appears to be the convention used for assigning return values.