aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.h
diff options
context:
space:
mode:
authorDave Cheney <dave@cheney.net>2014-03-11 14:43:10 +1100
committerDave Cheney <dave@cheney.net>2014-03-11 14:43:10 +1100
commit6431be3fe414a73c84da6ef0777e04b4afadede0 (patch)
tree0a3ac55971e4e8a7ae8b4aff858dab1350fc8f13 /src/pkg/runtime/runtime.h
parentcf57cf17e785e0e1c36c522067490b9a806e9cb1 (diff)
downloadgo-6431be3fe414a73c84da6ef0777e04b4afadede0.tar.xz
runtime: more Native Client fixes
Thanks to Ian for spotting these. runtime.h: define uintreg correctly. stack.c: address warning caused by the type of uintreg being 32 bits on amd64p32. Commentary (mainly for my own use) nacl/amd64p32 defines a machine with 64bit registers, but address space is limited to a 4gb window (the window is placed randomly inside the full 48 bit virtual address space of a process). To cope with this 6c defines _64BIT and _64BITREG. _64BITREG is always defined by 6c, so both GOARCH=amd64 and GOARCH=amd64p32 use 64bit wide registers. However _64BIT itself is only defined when 6c is compiling for amd64 targets. The definition is elided for amd64p32 environments causing int, uint and other arch specific types to revert to their 32bit definitions. LGTM=iant R=iant, rsc, remyoudompheng CC=golang-codereviews https://golang.org/cl/72860046
Diffstat (limited to 'src/pkg/runtime/runtime.h')
-rw-r--r--src/pkg/runtime/runtime.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index 716071eb83..0682a8026a 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -21,19 +21,17 @@ typedef uint64 uintptr;
typedef int64 intptr;
typedef int64 intgo; // Go's int
typedef uint64 uintgo; // Go's uint
-typedef uint64 uintreg;
#else
typedef uint32 uintptr;
typedef int32 intptr;
typedef int32 intgo; // Go's int
typedef uint32 uintgo; // Go's uint
-typedef uint32 uintreg;
#endif
#ifdef _64BITREG
-//typedef uint64 uintreg;
+typedef uint64 uintreg;
#else
-//typedef uint32 uintreg;
+typedef uint32 uintreg;
#endif
/*