aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_x86.go
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2015-11-11 12:39:30 -0500
committerMichael Matloob <matloob@golang.org>2015-11-12 17:04:45 +0000
commit432cb66f16b2bb6a167725057168bbe4aefe5fb5 (patch)
tree0a6aaf45df2810dc7276212496a4b647ed0bb6d2 /src/runtime/sys_x86.go
parentb5a0c67fcc2f87b5e2fd04e023f9a0b2f3d759da (diff)
downloadgo-432cb66f16b2bb6a167725057168bbe4aefe5fb5.tar.gz
go-432cb66f16b2bb6a167725057168bbe4aefe5fb5.zip
runtime: break out system-specific constants into package sys
runtime/internal/sys will hold system-, architecture- and config- specific constants. Updates #11647 Change-Id: I6db29c312556087a42e8d2bdd9af40d157c56b54 Reviewed-on: https://go-review.googlesource.com/16817 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/sys_x86.go')
-rw-r--r--src/runtime/sys_x86.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/runtime/sys_x86.go b/src/runtime/sys_x86.go
index 3f0771fe0c..137e706d24 100644
--- a/src/runtime/sys_x86.go
+++ b/src/runtime/sys_x86.go
@@ -6,17 +6,20 @@
package runtime
-import "unsafe"
+import (
+ "runtime/internal/sys"
+ "unsafe"
+)
// adjust Gobuf as it if executed a call to fn with context ctxt
// and then did an immediate gosave.
func gostartcall(buf *gobuf, fn, ctxt unsafe.Pointer) {
sp := buf.sp
- if regSize > ptrSize {
- sp -= ptrSize
+ if sys.RegSize > sys.PtrSize {
+ sp -= sys.PtrSize
*(*uintptr)(unsafe.Pointer(sp)) = 0
}
- sp -= ptrSize
+ sp -= sys.PtrSize
*(*uintptr)(unsafe.Pointer(sp)) = buf.pc
buf.sp = sp
buf.pc = uintptr(fn)