This patch implements the LLVM part for no_caller_saved_registers attribute as appear in interrupt and exception handler proposal
Details
Diff Detail
Event Timeline
test/CodeGen/X86/x86-32-intrcc.ll | ||
---|---|---|
60–67 | I will commit this change in a separate commit as it is not related to no_caller_saved_register attribute. This test was written incorrect and the below lines were ignored by FileCheck. | |
test/CodeGen/X86/x86-64-intrcc.ll | ||
60–71 | I will commit this change in a separate commit as it is not related to no_caller_saved_register attribute. This test was written incorrect and the below lines were ignored by FileCheck. |
lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
3374 | The right way to do this, IMO, is to add the calling convention in LLVM like all other ones and have clang/the front-end selects the right calling convention when it sees the attribute. |
lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
3374 | Please, correct me if I am mistaken, but calling convention determine not only what the callee and the caller function saved registers are, but also how we move parameters to the called function, right? So, using a calling convention for this attribute will not be right. H.J., can you confirm this? |
lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
3374 | That is correct. no_caller_saved_registers attribute |
The right way to do this, IMO, is to add the calling convention in LLVM like all other ones and have clang/the front-end selects the right calling convention when it sees the attribute.
In other words, I don’t think we want to push attribute checking in here.