[llvm-dev] Capturing x86 %rax in prologue to use in body
John Reagan via llvm-dev
llvm-dev at lists.llvm.org
Wed Mar 14 11:28:42 PDT 2018
As part of our OpenVMS-specific changes, we're adding an arg-count to
all of our calls.
We've done this as part of callLowering to put the # of slots used into
%ah and leaving %al to hold the standard info about vector registers.
That part is working.
However, we're struggling somewhat on the code in the prologue to
capture the %ah value to then be obtained by our "arg_count" compiler
builtin. We found where the 1st parameter is put into a virtual
register in the event that it has to be passed back in %rax for
functions returning large structures. We certainly could do the same
with %ah, but what IR would we generate to fetch that value in the body
of a routine?
We haven't created our own private OpenVMS calling convention but just
riding along on the standard convention. Another thought would be to
create a new CC but that seems overkill just for this.
Anybody have suggestions on where we should be poking with our
screwdriver? Do we have to write a new intrinsic to obtain that saved
value?
Thanks for any advice
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180314/27ec4015/attachment.sig>
More information about the llvm-dev
mailing list