The liblink code to insert the FUNCDATA for a stack map
from the Go prototype was not correct for ARM
(different data structure layout).
Also, sync/atomic was missing some Go prototypes
for ARM-specific functions.
TBR=r
CC=golang-codereviews
https://golang.org/cl/
143160045
int D_PARAM;
int D_SCONST;
int D_STATIC;
+ int D_OREG;
int ACALL;
int ADATA;
.D_PARAM = D_PARAM,
.D_SCONST = D_SCONST,
.D_STATIC = D_STATIC,
+ .D_OREG = D_OREG,
.ACALL = ABL,
.ADATA = ADATA,
p->as = ctxt->arch->AFUNCDATA;
p->from.type = ctxt->arch->D_CONST;
p->from.offset = FUNCDATA_ArgsPointerMaps;
- p->to.type = ctxt->arch->D_EXTERN;
+ if(ctxt->arch->thechar == '6' || ctxt->arch->thechar == '8')
+ p->to.type = ctxt->arch->D_EXTERN;
+ else {
+ p->to.type = ctxt->arch->D_OREG;
+ p->to.name = ctxt->arch->D_EXTERN;
+ }
p->to.sym = linklookup(ctxt, smprint("%s.args_stackmap", s->name), s->version);
}
}
}
return
}
+
+// Additional ARM-specific assembly routines.
+// Declaration here to give assembly routines correct stack maps for arguments.
+func armCompareAndSwapUint32(addr *uint32, old, new uint32) (swapped bool)
+func armCompareAndSwapUint64(addr *uint64, old, new uint64) (swapped bool)
+func generalCAS64(addr *uint64, old, new uint64) (swapped bool)