#define CBARGS (CallbackArgs*)((byte*)g->m->g0->sched.sp+4*sizeof(void*))
#endif
+// Unimplemented on power64 or power64le
+#ifdef GOARCH_power64
+#define CBARGS (CallbackArgs*)(nil)
+#endif
+#ifdef GOARCH_power64le
+#define CBARGS (CallbackArgs*)(nil)
+#endif
+
void runtime·cgocallbackg1(void);
#pragma textflag NOSPLIT
d = newdefer(siz);
d->fn = fn;
d->pc = runtime·getcallerpc(&siz);
- if(thechar == '5')
+ if(thechar == '5' || thechar == '9')
d->argp = (byte*)(&fn+2); // skip caller's saved link register
else
d->argp = (byte*)(&fn+1);
// (The pc we're returning to does pop pop
// before it tests the return value.)
// On the arm there are 2 saved LRs mixed in too.
- if(thechar == '5')
+ if(thechar == '5' || thechar == '9')
gp->sched.sp = (uintptr)argp - 4*sizeof(uintptr);
else
gp->sched.sp = (uintptr)argp - 2*sizeof(uintptr);
void
runtime·throw(int8 *s)
{
+ runtime·printf("fatal error: %s\n", s);
if(g->m->throwing == 0)
g->m->throwing = 1;
runtime·startpanic();
- runtime·printf("fatal error: %s\n", s);
runtime·dopanic(0);
*(int32*)0 = 0; // not reached
runtime·exit(1); // even more not reached
{
byte *argp;
- if(thechar == '5')
+ if(thechar == '5' || thechar == '9')
argp = (byte*)(&fn+2); // skip caller's saved LR
else
argp = (byte*)(&fn+1);
sp = (byte*)newg->stackbase;
sp -= siz;
runtime·memmove(sp, argp, narg);
- if(thechar == '5') {
+ if(thechar == '5' || thechar == '9') {
// caller's LR
sp -= sizeof(void*);
*(void**)sp = nil;