Vector registers assumed to be caller or callee-saved?

Andreas Klebinger klebinger.andreas at gmx.at
Sun Jun 30 17:16:15 UTC 2019


What you want is not the macro but this function:
https://hackage.haskell.org/package/ghc-8.6.5/docs/src/X86.Regs.html#callClobberedRegs


whose results depend on the System ABI.

Cheers,
Andreas




> Hi all,
>
> I'm wondering what GHC assumes about vector registers XMMi, YMMi, and ZMMi used
> by the STG machine: are those assumed to be caller or callee-saved? Only for
> the x86-64 architecture there exist macro definitions like CALLER_SAVES_XMM1 in
> includes/stg/MachRegs.h.  However, I cannot find any other place where those
> macros are used.  AFAIK most C ABIs assume that vector registers are call
> clobbered. Is this also the case for GHC?
>
> Many thanks in advance,
> Stefan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20190630/1216b509/attachment.html>


More information about the ghc-devs mailing list