mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
In order to correctly compile
struct s { double x1; float x2; }; __attribute__((regparm(3))) struct s f(int a, int b, int c); void g(void) { f(41, 42, 43); } We need to be able to represent passing the address of s to f (sret) in a register (inreg). Turns out that all that is needed is to not mark them as mutually incompatible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160695 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -165,8 +165,9 @@ const AttrConst FunctionOnly = {NoReturn_i | NoUnwind_i | ReadNone_i |
|
||||
const AttrConst VarArgsIncompatible = {StructRet_i};
|
||||
|
||||
/// @brief Attributes that are mutually incompatible.
|
||||
const AttrConst MutuallyIncompatible[4] = {
|
||||
{ByVal_i | InReg_i | Nest_i | StructRet_i},
|
||||
const AttrConst MutuallyIncompatible[5] = {
|
||||
{ByVal_i | Nest_i | StructRet_i},
|
||||
{ByVal_i | Nest_i | InReg_i },
|
||||
{ZExt_i | SExt_i},
|
||||
{ReadNone_i | ReadOnly_i},
|
||||
{NoInline_i | AlwaysInline_i}
|
||||
|
Reference in New Issue
Block a user