Re: Vector registers assumed to be caller or callee-saved?

2019-06-30 Thread Andreas Klebinger
It is my understanding that we only communicate the calling convention to be used via LLVM IR  and LLVM handles generation of the save/restore instructions required for the call. So indeed neither the macro nor this function would be used there. But I gathered that just by skimming the LLVM code

Re: Vector registers assumed to be caller or callee-saved?

2019-06-30 Thread Stefan Schulze Frielinghaus
But this only includes the NCG. What about the LLVM backend? For LLVM I only found in compiler/llvmGen/LlvmCodeGen/CodeGen.hs function definition getTrashRegs which makes use of function callerSaves which is defined in includes/CodeGen.Platform.hs: callerSaves :: GlobalReg -> Bool #if

Re: Vector registers assumed to be caller or callee-saved?

2019-06-30 Thread Andreas Klebinger
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

Re: Workflow question (changing codegen)

2019-06-30 Thread Sebastian Graf
Re: git worktree: That's the workflow I'm currently using. It has its problems with submodules, see https://stackoverflow.com/questions/31871888/what-goes-wrong-when-using-git-worktree-with-git-submodules. But you can make it work with this git alias from the first answer: