1
0
mirror of https://github.com/golang/go synced 2024-11-20 01:24:43 -07:00
go/src/runtime/sys_freebsd_arm.s

379 lines
8.6 KiB
ArmAsm
Raw Normal View History

// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
// System calls and other sys.stuff for ARM, FreeBSD
// /usr/src/sys/kern/syscalls.master for syscall numbers.
//
#include "go_asm.h"
#include "go_tls.h"
#include "textflag.h"
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
// for EABI, as we don't support OABI
#define SYS_BASE 0x0
#define SYS_exit (SYS_BASE + 1)
#define SYS_read (SYS_BASE + 3)
#define SYS_write (SYS_BASE + 4)
#define SYS_open (SYS_BASE + 5)
#define SYS_close (SYS_BASE + 6)
#define SYS_getpid (SYS_BASE + 20)
#define SYS_kill (SYS_BASE + 37)
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
#define SYS_sigaltstack (SYS_BASE + 53)
#define SYS_munmap (SYS_BASE + 73)
#define SYS_madvise (SYS_BASE + 75)
#define SYS_setitimer (SYS_BASE + 83)
#define SYS_fcntl (SYS_BASE + 92)
#define SYS_getrlimit (SYS_BASE + 194)
#define SYS___sysctl (SYS_BASE + 202)
#define SYS_nanosleep (SYS_BASE + 240)
#define SYS_clock_gettime (SYS_BASE + 232)
#define SYS_sched_yield (SYS_BASE + 331)
#define SYS_sigprocmask (SYS_BASE + 340)
#define SYS_kqueue (SYS_BASE + 362)
#define SYS_kevent (SYS_BASE + 363)
#define SYS_sigaction (SYS_BASE + 416)
#define SYS_thr_exit (SYS_BASE + 431)
#define SYS_thr_self (SYS_BASE + 432)
#define SYS_thr_kill (SYS_BASE + 433)
#define SYS__umtx_op (SYS_BASE + 454)
#define SYS_thr_new (SYS_BASE + 455)
#define SYS_mmap (SYS_BASE + 477)
TEXT runtime·sys_umtx_op(SB),NOSPLIT,$0
MOVW addr+0(FP), R0
MOVW mode+4(FP), R1
MOVW val+8(FP), R2
MOVW ptr2+12(FP), R3
ADD $20, R13 // arg 5 is passed on stack
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS__umtx_op, R7
SWI $0
SUB $20, R13
// BCS error
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret+20(FP)
RET
TEXT runtime·thr_new(SB),NOSPLIT,$0
MOVW param+0(FP), R0
MOVW size+4(FP), R1
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_thr_new, R7
SWI $0
RET
TEXT runtime·thr_start(SB),NOSPLIT,$0
// set up g
2014-06-26 09:54:39 -06:00
MOVW m_g0(R0), g
MOVW R0, g_m(g)
BL runtime·emptyfunc(SB) // fault if stack check is wrong
BL runtime·mstart(SB)
MOVW $2, R8 // crash (not reached)
MOVW R8, (R8)
RET
// Exit the entire program (like C exit)
TEXT runtime·exit(SB),NOSPLIT,$-8
MOVW code+0(FP), R0 // arg 1 exit status
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_exit, R7
SWI $0
MOVW.CS $0, R8 // crash on syscall failure
MOVW.CS R8, (R8)
RET
TEXT runtime·exit1(SB),NOSPLIT,$-8
MOVW code+0(FP), R0 // arg 1 exit status
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_thr_exit, R7
SWI $0
MOVW.CS $0, R8 // crash on syscall failure
MOVW.CS R8, (R8)
RET
TEXT runtime·open(SB),NOSPLIT,$-8
MOVW name+0(FP), R0 // arg 1 name
MOVW mode+4(FP), R1 // arg 2 mode
MOVW perm+8(FP), R2 // arg 3 perm
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_open, R7
SWI $0
MOVW.CS $-1, R0
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret+12(FP)
RET
TEXT runtime·read(SB),NOSPLIT,$-8
MOVW fd+0(FP), R0 // arg 1 fd
MOVW p+4(FP), R1 // arg 2 buf
MOVW n+8(FP), R2 // arg 3 count
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_read, R7
SWI $0
MOVW.CS $-1, R0
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret+12(FP)
RET
TEXT runtime·write(SB),NOSPLIT,$-8
MOVW fd+0(FP), R0 // arg 1 fd
MOVW p+4(FP), R1 // arg 2 buf
MOVW n+8(FP), R2 // arg 3 count
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_write, R7
SWI $0
MOVW.CS $-1, R0
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret+12(FP)
RET
TEXT runtime·closefd(SB),NOSPLIT,$-8
MOVW fd+0(FP), R0 // arg 1 fd
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_close, R7
SWI $0
MOVW.CS $-1, R0
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret+4(FP)
RET
TEXT runtime·getrlimit(SB),NOSPLIT,$-8
MOVW kind+0(FP), R0
MOVW limit+4(FP), R1
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_getrlimit, R7
SWI $0
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret+8(FP)
RET
TEXT runtime·raise(SB),NOSPLIT,$8
// thr_self(&4(R13))
MOVW $4(R13), R0 // arg 1 &4(R13)
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_thr_self, R7
SWI $0
// thr_kill(self, SIGPIPE)
MOVW 4(R13), R0 // arg 1 id
MOVW sig+0(FP), R1 // arg 2 - signal
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_thr_kill, R7
SWI $0
RET
TEXT runtime·raiseproc(SB),NOSPLIT,$0
// getpid
MOVW $SYS_getpid, R7
SWI $0
// kill(self, sig)
// arg 1 - pid, now in R0
MOVW sig+0(FP), R1 // arg 2 - signal
MOVW $SYS_kill, R7
SWI $0
RET
TEXT runtime·setitimer(SB), NOSPLIT, $-8
MOVW mode+0(FP), R0
MOVW new+4(FP), R1
MOVW old+8(FP), R2
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_setitimer, R7
SWI $0
RET
// func now() (sec int64, nsec int32)
TEXT time·now(SB), NOSPLIT, $32
MOVW $0, R0 // CLOCK_REALTIME
MOVW $8(R13), R1
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_clock_gettime, R7
SWI $0
MOVW 8(R13), R0 // sec.low
MOVW 12(R13), R1 // sec.high
MOVW 16(R13), R2 // nsec
MOVW R0, sec_lo+0(FP)
MOVW R1, sec_hi+4(FP)
MOVW R2, nsec+8(FP)
RET
// int64 nanotime(void) so really
// void nanotime(int64 *nsec)
TEXT runtime·nanotime(SB), NOSPLIT, $32
// We can use CLOCK_MONOTONIC_FAST here when we drop
// support for FreeBSD 8-STABLE.
MOVW $4, R0 // CLOCK_MONOTONIC
MOVW $8(R13), R1
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_clock_gettime, R7
SWI $0
MOVW 8(R13), R0 // sec.low
MOVW 12(R13), R4 // sec.high
MOVW 16(R13), R2 // nsec
MOVW $1000000000, R3
MULLU R0, R3, (R1, R0)
MUL R3, R4
ADD.S R2, R0
ADC R4, R1
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret_lo+0(FP)
MOVW R1, ret_hi+4(FP)
RET
TEXT runtime·sigaction(SB),NOSPLIT,$-8
MOVW sig+0(FP), R0 // arg 1 sig
MOVW new+4(FP), R1 // arg 2 act
MOVW old+8(FP), R2 // arg 3 oact
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_sigaction, R7
SWI $0
MOVW.CS $0, R8 // crash on syscall failure
MOVW.CS R8, (R8)
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$12
// this might be called in external code context,
2014-06-26 09:54:39 -06:00
// where g is not set.
// first save R0, because runtime·load_g will clobber it
MOVW R0, 4(R13) // signum
MOVB runtime·iscgo(SB), R0
CMP $0, R0
2014-06-26 09:54:39 -06:00
BL.NE runtime·load_g(SB)
MOVW R1, 8(R13)
MOVW R2, 12(R13)
BL runtime·sigtrampgo(SB)
RET
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
TEXT runtime·mmap(SB),NOSPLIT,$16
MOVW addr+0(FP), R0 // arg 1 addr
MOVW n+4(FP), R1 // arg 2 len
MOVW prot+8(FP), R2 // arg 3 prot
MOVW flags+12(FP), R3 // arg 4 flags
// arg 5 (fid) and arg6 (offset_lo, offset_hi) are passed on stack
// note the C runtime only passes the 32-bit offset_lo to us
MOVW fd+16(FP), R4 // arg 5
MOVW R4, 4(R13)
MOVW off+20(FP), R5 // arg 6 lower 32-bit
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
// the word at 8(R13) is skipped due to 64-bit argument alignment.
MOVW R5, 12(R13)
MOVW $0, R6 // higher 32-bit for arg 6
MOVW R6, 16(R13)
ADD $4, R13
MOVW $SYS_mmap, R7
SWI $0
SUB $4, R13
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
// TODO(dfc) error checking ?
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret+24(FP)
RET
TEXT runtime·munmap(SB),NOSPLIT,$0
MOVW addr+0(FP), R0 // arg 1 addr
MOVW n+4(FP), R1 // arg 2 len
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_munmap, R7
SWI $0
MOVW.CS $0, R8 // crash on syscall failure
MOVW.CS R8, (R8)
RET
TEXT runtime·madvise(SB),NOSPLIT,$0
MOVW addr+0(FP), R0 // arg 1 addr
MOVW n+4(FP), R1 // arg 2 len
MOVW flags+8(FP), R2 // arg 3 flags
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_madvise, R7
SWI $0
// ignore failure - maybe pages are locked
RET
TEXT runtime·sigaltstack(SB),NOSPLIT,$-8
MOVW new+0(FP), R0
MOVW old+4(FP), R1
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_sigaltstack, R7
SWI $0
MOVW.CS $0, R8 // crash on syscall failure
MOVW.CS R8, (R8)
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$0-16
MOVW sig+4(FP), R0
MOVW info+8(FP), R1
MOVW ctx+12(FP), R2
MOVW fn+0(FP), R11
MOVW R13, R4
SUB $24, R13
BIC $0x7, R13 // alignment for ELF ABI
BL (R11)
MOVW R4, R13
RET
TEXT runtime·usleep(SB),NOSPLIT,$16
MOVW usec+0(FP), R0
CALL runtime·usplitR0(SB)
// 0(R13) is the saved LR, don't use it
MOVW R0, 4(R13) // tv_sec.low
MOVW $0, R0
MOVW R0, 8(R13) // tv_sec.high
MOVW $1000, R2
MUL R1, R2
MOVW R2, 12(R13) // tv_nsec
MOVW $4(R13), R0 // arg 1 - rqtp
MOVW $0, R1 // arg 2 - rmtp
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_nanosleep, R7
SWI $0
RET
TEXT runtime·sysctl(SB),NOSPLIT,$0
MOVW mib+0(FP), R0 // arg 1 - name
MOVW miblen+4(FP), R1 // arg 2 - namelen
MOVW out+8(FP), R2 // arg 3 - old
MOVW size+12(FP), R3 // arg 4 - oldlenp
// arg 5 (newp) and arg 6 (newlen) are passed on stack
ADD $20, R13
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS___sysctl, R7
SWI $0
SUB.CS $0, R0, R0
SUB $20, R13
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret+24(FP)
RET
TEXT runtime·osyield(SB),NOSPLIT,$-4
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_sched_yield, R7
SWI $0
RET
TEXT runtime·sigprocmask(SB),NOSPLIT,$0
MOVW how+0(FP), R0 // arg 1 - how
MOVW new+4(FP), R1 // arg 2 - set
MOVW old+8(FP), R2 // arg 3 - oset
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_sigprocmask, R7
SWI $0
MOVW.CS $0, R8 // crash on syscall failure
MOVW.CS R8, (R8)
RET
// int32 runtime·kqueue(void)
TEXT runtime·kqueue(SB),NOSPLIT,$0
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_kqueue, R7
SWI $0
RSB.CS $0, R0
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret+0(FP)
RET
// int32 runtime·kevent(int kq, Kevent *changelist, int nchanges, Kevent *eventlist, int nevents, Timespec *timeout)
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
TEXT runtime·kevent(SB),NOSPLIT,$0
MOVW kq+0(FP), R0 // kq
MOVW ch+4(FP), R1 // changelist
MOVW nch+8(FP), R2 // nchanges
MOVW ev+12(FP), R3 // eventlist
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
ADD $20, R13 // pass arg 5 and 6 on stack
MOVW $SYS_kevent, R7
SWI $0
RSB.CS $0, R0
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
SUB $20, R13
cmd/cc, runtime: convert C compilers to use Go calling convention To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
2014-08-27 09:32:17 -06:00
MOVW R0, ret+24(FP)
RET
// void runtime·closeonexec(int32 fd)
TEXT runtime·closeonexec(SB),NOSPLIT,$0
MOVW fd+0(FP), R0 // fd
MOVW $2, R1 // F_SETFD
MOVW $1, R2 // FD_CLOEXEC
runtime, syscall: update freebsd/arm calling convention to match EABI Fixes #6451. There is still some breakages unrelated to the syscall change. [root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version go version devel freebsd/arm a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install - fatal error: mark - finalizer inconsistency runtime stack: runtime.throw(0x3e80ac) /root/go/src/pkg/runtime/panic.c:464 +0x5c addfinroots(0x2) /root/go/src/pkg/runtime/mgc0.c:1501 +0x74 runtime.walkfintab(0x6c200) /root/go/src/pkg/runtime/mfinal.c:216 +0xa0 addroots() /root/go/src/pkg/runtime/mgc0.c:1561 +0x188 gc(0x50632f78) /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c mgc(0x306170a0) /root/go/src/pkg/runtime/mgc0.c:2049 +0x30 runtime.mcall(0x3e97b0) /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c goroutine 1 [garbage collection]: runtime.gc(0x0) /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80 runtime.mallocgc(0x680, 0x1b1971, 0x1) /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc ----- stack segment boundary ----- cnew(0x1b1970, 0x640, 0x1) /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110 runtime.cnewarray(0x1b1970, 0x640) /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120 makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190) /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...) /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144 runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...) /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174 go/build.(*importReader).readByte(0x3070d1b0, 0xb384e) /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4 go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180) /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0 go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...) /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4 go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...) /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...) /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...) /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904 main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...) /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8 path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...) /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44 path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1) /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68 main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10) /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1) /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70 main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...) /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04 main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...) /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88 main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...) /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...) /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1) /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60 main.main() /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c runtime.main() /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0 runtime.goexit() /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0 goroutine 3 [syscall]: os/signal.loop() /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24 created by os/signal.init·1 /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48 R=minux.ma, rsc CC=golang-dev https://golang.org/cl/13824044
2013-09-26 05:35:49 -06:00
MOVW $SYS_fcntl, R7
SWI $0
RET
// TODO: this is only valid for ARMv7+
TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0
B runtime·armPublicationBarrier(SB)
// TODO(minux): this only supports ARMv6K+.
runtime.cmd/ld: Add ARM external linking and implement -shared in terms of external linking This CL is an aggregate of 10271047, 10499043, 9733044. Descriptions of each follow: 10499043 runtime,cmd/ld: Merge TLS symbols and teach 5l about ARM TLS This CL prepares for external linking support to ARM. The pseudo-symbols runtime.g and runtime.m are merged into a single runtime.tlsgm symbol. When external linking, the offset of a thread local variable is stored at a memory location instead of being embedded into a offset of a ldr instruction. With a single runtime.tlsgm symbol for both g and m, only one such offset is needed. The larger part of this CL moves TLS code from gcc compiled to internally compiled. The TLS code now uses the modern MRC instruction, and 5l is taught about TLS fallbacks in case the instruction is not available or appropriate. 10271047 This CL adds support for -linkmode external to 5l. For 5l itself, use addrel to allow for D_CALL relocations to be handled by the host linker. Of the cases listed in rsc's comment in issue 4069, only case 5 and 63 needed an update. One of the TODO: addrel cases was since replaced, and the rest of the cases are either covered by indirection through addpool (cases with LTO or LFROM flags) or stubs (case 74). The addpool cases are covered because addpool emits AWORD instructions, which in turn are handled by case 11. In the runtime, change the argv argument in the rt0* functions slightly to be a pointer to the argv list, instead of relying on a particular location of argv. 9733044 The -shared flag to 6l outputs a shared library, implemented in Go and callable from non-Go programs such as C. The main part of this CL change the thread local storage model. Go uses the fastest and least general mode, local exec. TLS data in shared libraries normally requires at least the local dynamic mode, however, this CL instead opts for using the initial exec mode. Initial exec mode is faster than local dynamic mode and can be used in linux since the linker has reserved a limited amount of TLS space for performance sensitive TLS code. Initial exec mode requires an extra load from the GOT table to determine the TLS offset. This penalty will not be paid if ld is not in -shared mode, since TLS accesses will be reduced to local exec. The elf sections .init_array and .rela.init_array are added to register the Go runtime entry with cgo at library load time. The "hidden" attribute is added to Cgo functions called from Go, since Go does not generate call through the GOT table, and adding non-GOT relocations for a global function is not supported by gcc. Cgo symbols don't need to be global and avoiding the GOT table is also faster. The changes to 8l are only removes code relevant to the old -shared mode where internal linking was used. This CL only address the low level linker work. It can be submitted by itself, but to be useful, the runtime changes in CL 9738047 is also needed. Design discussion at https://groups.google.com/forum/?fromgroups#!topic/golang-nuts/zmjXkGrEx6Q Fixes #5590. R=rsc CC=golang-dev https://golang.org/cl/12871044
2013-08-14 09:38:54 -06:00
TEXT runtime·read_tls_fallback(SB),NOSPLIT,$-4
WORD $0xee1d0f70 // mrc p15, 0, r0, c13, c0, 3
RET