1
0
mirror of https://github.com/golang/go synced 2024-11-20 10:24:40 -07:00

arm: fix build

Changes on laptop were not sync'ed to machine
where I ran hg submit.

R=r
CC=golang-dev
https://golang.org/cl/4195048
This commit is contained in:
Russ Cox 2011-02-22 21:10:02 -05:00
parent 23c16cf216
commit bdbea6e410
2 changed files with 13 additions and 12 deletions

View File

@ -659,7 +659,7 @@ noops(void)
q1->reg = NREG; q1->reg = NREG;
q1->to.type = D_REG; q1->to.type = D_REG;
q1->to.reg = REGSP; q1->to.reg = REGSP;
p->spadj = 8; q1->spadj = 8;
break; break;
case AMOVW: case AMOVW:

View File

@ -599,31 +599,29 @@ runtime·selectrecv(Select *sel, Hchan *c, ...)
} }
static void selectdefault(Select**); static void selectdefault(Select*, void*);
// selectdefault(sel *byte) (selected bool); // selectdefault(sel *byte) (selected bool);
#pragma textflag 7 #pragma textflag 7
void void
runtime·selectdefault(Select *sel, ...) runtime·selectdefault(Select *sel, ...)
{ {
selectdefault(&sel); selectdefault(sel, runtime·getcallerpc(&sel));
} }
static void static void
selectdefault(Select **selp) selectdefault(Select *sel, void *callerpc)
{ {
Select *sel;
int32 i; int32 i;
Scase *cas; Scase *cas;
sel = *selp;
i = sel->ncase; i = sel->ncase;
if(i >= sel->tcase) if(i >= sel->tcase)
runtime·throw("selectdefault: too many cases"); runtime·throw("selectdefault: too many cases");
sel->ncase = i+1; sel->ncase = i+1;
cas = runtime·mal(sizeof *cas); cas = runtime·mal(sizeof *cas);
sel->scase[i] = cas; sel->scase[i] = cas;
cas->pc = runtime·getcallerpc(selp); cas->pc = callerpc;
cas->chan = nil; cas->chan = nil;
cas->so = runtime·rnd(sizeof(sel), Structrnd); cas->so = runtime·rnd(sizeof(sel), Structrnd);
@ -682,7 +680,7 @@ runtime·block(void)
runtime·gosched(); runtime·gosched();
} }
static void selectgo(Select**); static void* selectgo(Select**);
// selectgo(sel *byte); // selectgo(sel *byte);
// //
@ -692,10 +690,10 @@ static void selectgo(Select**);
void void
runtime·selectgo(Select *sel) runtime·selectgo(Select *sel)
{ {
selectgo(&sel); runtime·setcallerpc(&sel, selectgo(&sel));
} }
static void static void*
selectgo(Select **selp) selectgo(Select **selp)
{ {
Select *sel; Select *sel;
@ -705,6 +703,7 @@ selectgo(Select **selp)
SudoG *sg; SudoG *sg;
G *gp; G *gp;
byte *as; byte *as;
void *pc;
sel = *selp; sel = *selp;
if(runtime·gcwaiting) if(runtime·gcwaiting)
@ -917,16 +916,18 @@ retc:
selunlock(sel); selunlock(sel);
// return to pc corresponding to chosen case // return to pc corresponding to chosen case
runtime·setcallerpc(selp, cas->pc);
pc = cas->pc;
as = (byte*)selp + cas->so; as = (byte*)selp + cas->so;
freesel(sel); freesel(sel);
*as = true; *as = true;
return; return pc;
sclose: sclose:
// send on closed channel // send on closed channel
selunlock(sel); selunlock(sel);
runtime·panicstring("send on closed channel"); runtime·panicstring("send on closed channel");
return nil; // not reached
} }
// closechan(sel *byte); // closechan(sel *byte);