__PWTB_FloatArgumentRegisters = \extraLocals
- .if ((__PWTB_FloatArgumentRegisters % 16) != 0)
+ // Note, stack (see __PWTB_StackAlloc variable) must be 16 byte aligned,
+ // SIZEOF__FloatArgumentRegisters (0x40) is 16 byte aligned, that mean initial
+ // __PWTB_FloatArgumentRegisters value must be not 16 byte aligned and
+ // after add (120 + 64) provide 16 byte aligned result.
+ .if ((__PWTB_FloatArgumentRegisters % 16) == 0)
__PWTB_FloatArgumentRegisters = __PWTB_FloatArgumentRegisters + 8
.endif
// ------------------------------------------------------------------
// Hijack function for functions which return a scalar type or a struct (value type)
NESTED_ENTRY OnHijackTripThread, _TEXT, NoHandler
- PROLOG_SAVE_REG_PAIR_INDEXED fp, ra, 0x88
+ PROLOG_SAVE_REG_PAIR_INDEXED fp, ra, 0x90
// Spill callee saved registers
PROLOG_SAVE_REG_PAIR s1, s2, 16
EPILOG_RESTORE_REG_PAIR s7, s8, 64
EPILOG_RESTORE_REG_PAIR s9, s10, 80
EPILOG_RESTORE_REG s11, 96
- EPILOG_RESTORE_REG_PAIR_INDEXED fp, ra, 0x88
+ EPILOG_RESTORE_REG_PAIR_INDEXED fp, ra, 0x90
EPILOG_RETURN
NESTED_END OnHijackTripThread, _TEXT
// a3 = address of the location where the SP of funclet's caller (i.e. this helper) should be saved.
//
- PROLOG_SAVE_REG_PAIR_INDEXED fp, ra, 120, 0
+ PROLOG_SAVE_REG_PAIR_INDEXED fp, ra, 128, 0
// Spill callee saved registers
PROLOG_SAVE_REG_PAIR s1, s2, 16
EPILOG_RESTORE_REG_PAIR s11, gp, 96
EPILOG_RESTORE_REG tp, 112
- EPILOG_RESTORE_REG_PAIR_INDEXED fp, ra, 120
+ EPILOG_RESTORE_REG_PAIR_INDEXED fp, ra, 128
EPILOG_RETURN
NESTED_END CallEHFunclet, _TEXT