switch ctxt.Arch.Thechar {
case '6', '8':
return 0
+ case '9':
+ // PIC code on ppc64le requires 32 bytes of stack, and it's easier to
+ // just use that much stack always on ppc64x.
+ return int64(4 * ctxt.Arch.Ptrsize)
default:
return int64(ctxt.Arch.Ptrsize)
}
switch ctxt.Arch.Thechar {
case '6', '8':
return 0
+ case '9':
+ // PIC code on ppc64le requires 32 bytes of stack, and it's easier to
+ // just use that much stack always on ppc64x.
+ return int64(4 * ctxt.Arch.Ptrsize)
default:
return int64(ctxt.Arch.Ptrsize)
}
// with arguments (the arguments should be stored at FIXED_FRAME+0(R1),
// FIXED_FRAME+8(R1) etc) and some other low-level places.
//
-// The reason for using a constant is when code is compiled as PIC on ppc64le
-// the fixed part of the stack is 32 bytes large (although PIC is not actually
-// supported yet).
+// The reason for using a constant is to make supporting PIC easier (although
+// we only support PIC on ppc64le which has a minimum 32 bytes of stack frame,
+// and currently always use that much, PIC on ppc64 would need to use 48).
-#ifdef GOARCH_ppc64
-#define FIXED_FRAME 8
-#endif
-
-#ifdef GOARCH_ppc64le
-#define FIXED_FRAME 8
-#endif
+#define FIXED_FRAME 32
MOVDU R3, -8(R1)
MOVDU R0, -8(R1)
MOVDU R0, -8(R1)
+ MOVDU R0, -8(R1)
+ MOVDU R0, -8(R1)
+ MOVDU R0, -8(R1)
BL runtime·newproc(SB)
- ADD $24, R1
+ ADD $(16+FIXED_FRAME), R1
// start this M
BL runtime·mstart(SB)
MOVD (g_sched+gobuf_sp)(g), R1 // sp = m->g0->sched.sp
MOVDU R3, -8(R1)
MOVDU R0, -8(R1)
+ MOVDU R0, -8(R1)
+ MOVDU R0, -8(R1)
+ MOVDU R0, -8(R1)
BL (CTR)
BR runtime·badmcall2(SB)
PCQuantum = 4
Int64Align = 8
HugePageSize = 0
- MinFrameSize = 8
+ MinFrameSize = 32
)
type Uintreg uint64
PCQuantum = 4
Int64Align = 8
HugePageSize = 0
- MinFrameSize = 8
+ MinFrameSize = 32
)
type Uintreg uint64