Commit 0c6e4b96 authored by Dave Cheney's avatar Dave Cheney

runtime: small Native Client fixes

cgocall.c: define the CBARGS macro for GOARCH_amd64p32. I don't think the value of this macro will ever be used under nacl/amd64p32 but it is required to compile even if cgo is not used.

hashmap.goc: amd64p32 uses 32bit words.

LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/69960044
parent c535ce85
......@@ -223,6 +223,12 @@ struct CallbackArgs
#define CBARGS (CallbackArgs*)((byte*)m->g0->sched.sp+2*sizeof(void*))
#endif
// There is no cgo support for nacl/amd64p32 but we need to have something here
// so use the amd64 value as a placeholder.
#ifdef GOARCH_amd64p32
#define CBARGS (CallbackArgs*)((byte*)m->g0->sched.sp+2*sizeof(void*))
#endif
// On 386, stack frame is three words, plus caller PC.
#ifdef GOARCH_386
#define CBARGS (CallbackArgs*)((byte*)m->g0->sched.sp+4*sizeof(void*))
......
......@@ -448,6 +448,9 @@ hash_lookup(MapType *t, Hmap *h, byte **keyp)
#ifdef GOARCH_amd64
#define CHECKTYPE uint64
#endif
#ifdef GOARCH_amd64p32
#define CHECKTYPE uint32
#endif
#ifdef GOARCH_386
#define CHECKTYPE uint32
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment