]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: hg revert -r 6ec0a5c12d75
authorRuss Cox <rsc@golang.org>
Fri, 16 Dec 2011 23:50:40 +0000 (18:50 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 16 Dec 2011 23:50:40 +0000 (18:50 -0500)
That was the last build that was close to working.
I will try that change again next week.
Make is being very subtle today.

At the reverted-to CL, the ARM traceback appears
to be broken.  I'll look into that next week too.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5492063

39 files changed:
src/Make.pkg
src/cmd/Makefile
src/make.bash
src/pkg/runtime/Makefile
src/pkg/runtime/Makefile.auto [deleted file]
src/pkg/runtime/asm_386.s
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/asm_arm.s
src/pkg/runtime/defs1_linux.go
src/pkg/runtime/defs2_linux.go
src/pkg/runtime/defs_arm_linux.go
src/pkg/runtime/defs_darwin.go
src/pkg/runtime/defs_freebsd.go
src/pkg/runtime/defs_linux.go
src/pkg/runtime/defs_netbsd.go
src/pkg/runtime/defs_openbsd.go
src/pkg/runtime/defs_windows.go
src/pkg/runtime/goc2c.c
src/pkg/runtime/lock_futex.c
src/pkg/runtime/lock_sema.c
src/pkg/runtime/mkasmh.sh
src/pkg/runtime/mkgodefs.sh
src/pkg/runtime/mkversion.c
src/pkg/runtime/rt0_windows_amd64.s
src/pkg/runtime/signal_darwin_amd64.c
src/pkg/runtime/sys_darwin_386.s
src/pkg/runtime/sys_darwin_amd64.s
src/pkg/runtime/sys_freebsd_386.s
src/pkg/runtime/sys_freebsd_amd64.s
src/pkg/runtime/sys_linux_386.s
src/pkg/runtime/sys_linux_amd64.s
src/pkg/runtime/sys_linux_arm.s
src/pkg/runtime/sys_netbsd_386.s
src/pkg/runtime/sys_netbsd_amd64.s
src/pkg/runtime/sys_openbsd_386.s
src/pkg/runtime/sys_openbsd_amd64.s
src/pkg/runtime/sys_plan9_386.s
src/pkg/runtime/sys_windows_386.s
src/pkg/runtime/sys_windows_amd64.s

index 91562af92ab8cd4b2a18d9bb64ab87a549183aef..c6c47ffd0a41039100569acf4b3de0c53001eeec 100644 (file)
@@ -246,4 +246,4 @@ endif
        $(CC) $(CFLAGS) -I . -o "$@" _obj/$*.c
 
 %.$O: %.s $(HFILES)
-       $(AS) $(AFLAGS) $*.s
+       $(AS) $*.s
index c2f817a916a9b9f58665434dd26cc4341644e0ff..0b83e48312e0e715302711985220e3ee3f69e0c2 100644 (file)
@@ -8,12 +8,9 @@ all: install
 
 # Only build tools for current architecture, and only tools written in C.
 # The tools written in Go are managed by ../pkg/Makefile.
-# We need all the C compilers for rebuilding generated files in runtime.
 DIRS=\
        $(O)a\
-       5c\
-       6c\
-       8c\
+       $(O)c\
        $(O)g\
        $(O)l\
        cc\
@@ -58,7 +55,7 @@ nuke: $(patsubst %,%.nuke,$(CLEANDIRS))
        @echo
        $(MAKE) -C $* install
 
-gc.install 5c.install 6c.install 8c.install: cc.install
+gc.install $(O)c.install: cc.install
 $(O)g.install: gc.install
 $(O)a.install $(O)c.install $(O)g.install: $(O)l.install
 
index 21189fe0e6885415f65df37109d84daa62e15eef..3580d2a0bdeef5e35164cd454a48ac655e79d1e8 100755 (executable)
@@ -78,18 +78,12 @@ done
 bash "$GOROOT"/src/clean.bash
 
 # pkg builds libcgo and the Go programs in cmd.
-for i in lib9 libbio libmach cmd
+for i in lib9 libbio libmach cmd pkg
 do
        echo; echo; echo %%%% making $i %%%%; echo
        gomake -C $i install
 done
 
-echo; echo; echo %%%% making runtime generated files %%%%; echo
-gomake -C pkg/runtime -f Makefile.auto
-
-echo; echo; echo %%%% making pkg%%%%; echo
-gomake -C pkg install
-
 # Print post-install messages.
 # Implemented as a function so that all.bash can repeat the output
 # after run.bash finishes running all the tests.
index 4d81def5a837f2671d11ac6e265b977faea22607..651fa02d0b495fb1ba008393665869dade40b590 100644 (file)
@@ -4,7 +4,8 @@
 
 include ../../Make.inc
 
-x:=$(shell gomake -f Makefile.auto)
+# Go tool will do this for package runtime.
+CFLAGS+=-DGOOS_$(GOOS) -DGOARCH_$(GOARCH)
 
 TARG=runtime
 
@@ -13,13 +14,15 @@ GOFILES=\
        error.go\
        extern.go\
        mem.go\
+       runtime_defs.go\
        sig.go\
        softfloat64.go\
        type.go\
-       zgoarch_$(GOARCH).go\
-       zgoos_$(GOOS).go\
-       zruntime_defs_$(GOOS)_$(GOARCH).go\
-       zversion.go\
+       version.go\
+       version_$(GOOS).go\
+       version_$(GOARCH).go\
+
+CLEANFILES+=version.go version_*.go
 
 OFILES_darwin=\
        lock_sema.$O\
@@ -42,7 +45,7 @@ OFILES_plan9=\
 OFILES_windows=\
        callback_windows_$(GOARCH).$O\
        lock_sema.$O\
-       zsyscall_windows_$(GOARCH).$O\
+       syscall_windows.$O\
 
 # 386-specific object files
 OFILES_386=\
@@ -63,8 +66,6 @@ OFILES_arm=\
        traceback_x86.$O\
 
 OFILES=\
-       $(OFILES_$(GOARCH))\
-       $(OFILES_$(GOOS))\
        alg.$O\
        asm_$(GOARCH).$O\
        atomic_$(GOARCH).$O\
@@ -76,6 +77,7 @@ OFILES=\
        float.$O\
        hashmap.$O\
        iface.$O\
+       malloc.$O\
        mcache.$O\
        mcentral.$O\
        mem_$(GOOS).$O\
@@ -84,24 +86,25 @@ OFILES=\
        mfixalloc.$O\
        mgc0.$O\
        mheap.$O\
+       mprof.$O\
        msize.$O\
        print.$O\
        proc.$O\
        rt0_$(GOOS)_$(GOARCH).$O\
        rune.$O\
        runtime.$O\
+       runtime1.$O\
+       sema.$O\
        signal_$(GOOS)_$(GOARCH).$O\
+       sigqueue.$O\
        slice.$O\
+       string.$O\
        symtab.$O\
        sys_$(GOOS)_$(GOARCH).$O\
        thread_$(GOOS).$O\
-       zmalloc_$(GOARCH).$O\
-       zmprof_$(GOARCH).$O\
-       zruntime1_$(GOARCH).$O\
-       zsema_$(GOARCH).$O\
-       zsigqueue_$(GOARCH).$O\
-       zstring_$(GOARCH).$O\
-       ztime_$(GOARCH).$O\
+       time.$O\
+       $(OFILES_$(GOARCH))\
+       $(OFILES_$(GOOS))\
 
 AUTOHFILES=\
        arch_GOARCH.h\
@@ -115,6 +118,7 @@ HFILES=\
        hashmap.h\
        malloc.h\
        stack.h\
+       asm_$(GOARCH).h\
        $(AUTOHFILES)\
 
 GOFILES+=$(GOFILES_$(GOOS))
@@ -122,10 +126,6 @@ GOFILES+=$(GOFILES_$(GOOS))
 # For use by cgo.
 INSTALLFILES=$(pkgdir)/runtime.h $(pkgdir)/cgocall.h
 
-# Go tool will do this for package runtime.
-AFLAGS+=-DGOOS_$(GOOS) -DGOARCH_$(GOARCH)
-CFLAGS+=-DGOOS_$(GOOS) -DGOARCH_$(GOARCH)
-
 # special, out of the way compiler flag that means "add runtime metadata to output"
 GC+= -+
 
@@ -138,8 +138,44 @@ $(pkgdir)/%.h: %.h
 clean: clean-local
 
 clean-local:
-       rm -f $(AUTOHFILES)
-       make -f Makefile.auto clean
+       rm -f goc2c mkversion version.go runtime.acid.* runtime_defs.go $$(ls *.goc | sed 's/goc$$/c/') $(AUTOHFILES)
+
+asm_$(GOARCH).h: mkasmh.sh runtime.acid.$(GOARCH)
+       ./mkasmh.sh >$@.x
+       mv -f $@.x $@
+
+goc2c: goc2c.c
+       quietgcc -o $@ -I "$(GOROOT)/include" $< "$(GOROOT)/lib/lib9.a"
+
+mkversion: mkversion.c
+       quietgcc -o $@ -I "$(GOROOT)/include" $< "$(GOROOT)/lib/lib9.a"
+
+version.go: mkversion
+       GOROOT="$(GOROOT_FINAL)" ./mkversion >version.go
+
+version_$(GOARCH).go:
+       (echo 'package runtime'; echo 'const theGoarch = "$(GOARCH)"') >$@
+
+version_$(GOOS).go:
+       (echo 'package runtime'; echo 'const theGoos = "$(GOOS)"') >$@
+
+%.c:   %.goc goc2c
+       ./goc2c "`pwd`/$<" > $@.tmp
+       mv -f $@.tmp $@
+
+# for discovering offsets inside structs when debugging
+runtime.acid.$(GOARCH): runtime.h proc.c $(AUTOHFILES)
+       $(CC) $(CFLAGS) -a proc.c >$@
+
+# 386 traceback is really amd64 traceback
+ifeq ($(GOARCH),386)
+traceback.$O:  amd64/traceback.c
+       $(CC) $(CFLAGS) $<
+endif
+
+runtime_defs.go: proc.c iface.c hashmap.c chan.c $(HFILES)
+       CC="$(CC)" CFLAGS="$(CFLAGS)" ./mkgodefs.sh proc.c iface.c hashmap.c chan.c > $@.x
+       mv -f $@.x $@
 
 arch_GOARCH.h: arch_$(GOARCH).h
        cp $^ $@
@@ -152,8 +188,3 @@ os_GOOS.h: os_$(GOOS).h
 
 signals_GOOS.h: signals_$(GOOS).h
        cp $^ $@
-
-zasm_GOOS_GOARCH.h: zasm_$(GOOS)_$(GOARCH).h
-       cp $^ $@
-
-%.$O: zasm_GOOS_GOARCH.h
diff --git a/src/pkg/runtime/Makefile.auto b/src/pkg/runtime/Makefile.auto
deleted file mode 100644 (file)
index 13db81a..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 2011 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.
-
-include ../../Make.inc
-
-GOARCHES=\
-       386\
-       amd64\
-       arm\
-
-GOOSES=\
-       darwin\
-       freebsd\
-       linux\
-       netbsd\
-       openbsd\
-       plan9\
-       windows\
-
-GOOSARCHES=\
-       darwin_386\
-       darwin_amd64\
-       freebsd_386\
-       freebsd_amd64\
-       linux_386\
-       linux_amd64\
-       linux_arm\
-       netbsd_386\
-       netbsd_amd64\
-       openbsd_386\
-       openbsd_amd64\
-       plan9_386\
-       windows_386\
-       windows_amd64\
-
-AUTO=\
-       $(GOARCHES:%=zmalloc_%.c)\
-       $(GOARCHES:%=zmprof_%.c)\
-       $(GOARCHES:%=zruntime1_%.c)\
-       $(GOARCHES:%=zsema_%.c)\
-       $(GOARCHES:%=zsigqueue_%.c)\
-       $(GOARCHES:%=zstring_%.c)\
-       $(GOARCHES:%=ztime_%.c)\
-       $(GOARCHES:%=zgoarch_%.go)\
-       $(GOOSES:%=zgoos_%.go)\
-       $(GOOSARCHES:%=zruntime_defs_%.go)\
-       $(GOOSARCHES:%=zasm_%.h)\
-       zsyscall_windows_386.c\
-       zsyscall_windows_amd64.c\
-       zversion.go\
-
-all: auto
-auto: $(AUTO)
-
-# .goc -> .c (specific to os/arch combination)
-goc2c: goc2c.c
-       quietgcc -o $@ -I "$(GOROOT)/include" $< "$(GOROOT)/lib/lib9.a"
-
-z%_386.c: %.goc goc2c
-       GOARCH=386 ./goc2c "`pwd`/$<" >$@.tmp
-       mv -f $@.tmp $@
-
-z%_amd64.c: %.goc goc2c
-       GOARCH=amd64 ./goc2c "`pwd`/$<" >$@.tmp
-       mv -f $@.tmp $@
-
-z%_arm.c: %.goc goc2c
-       GOARCH=arm ./goc2c "`pwd`/$<" >$@.tmp
-       mv -f $@.tmp $@
-
-# version files
-mkversion: mkversion.c ../../../lib/lib9.a
-       quietgcc -o $@ -I "$(GOROOT)/include" $< "$(GOROOT)/lib/lib9.a"
-
-zversion.go: mkversion
-       GOROOT="$(GOROOT_FINAL)" ./mkversion >$@
-
-zgoos_%.go:
-       (echo '// AUTO-GENERATED; run make -f Makefile.auto'; echo; echo 'package runtime'; echo; echo 'const theGoos = "$*"') >$@
-
-zgoarch_%.go:
-       (echo '// AUTO-GENERATED; run make -f Makefile.auto'; echo; echo 'package runtime'; echo; echo 'const theGoarch = "$*"') >$@
-
-# definitions of runtime structs, translated from C to Go
-zruntime_defs_%.go: proc.c iface.c hashmap.c chan.c mkgodefs.sh
-       ./mkgodefs.sh $* proc.c iface.c hashmap.c chan.c >$@.tmp
-       mv -f $@.tmp $@
-
-# struct field offsets #defined for assembly
-zasm_%.h: mkasmh.sh proc.c
-       ./mkasmh.sh $* >$@.tmp
-       mv -f $@.tmp $@
-
-clean:
-       rm -f goc2c mkversion $(AUTO)
-
-# This file must not run targets in parallel:
-# mkgodefs.sh and mkasmh.sh scribble on the same files.
-# This is a magic name known to GNU make.
-.NOTPARALLEL:
index 52400637be97941289594c60f0457b15344f804f..c39f365d5959f104c1f1ad299ad10de69d4e0e07 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_386.h"
 
 TEXT _rt0_386(SB),7,$0
        // Linux, Windows start the FPU in extended double precision.
index 9053334993a1b09b64a2bce5bcaa204e6590f13a..d91421e9e364829c27fcccd352b06f8fc28614fd 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_amd64.h"
 
 TEXT _rt0_amd64(SB),7,$-8
        // copy arguments forward on an even stack
index b36bbe30470819de933e42bfcd2cf370c02b0cca..533c0744d7455a27a03ab81bd3bf3963007abf95 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_arm.h"
 
 // using frame size $-4 means do not save LR on stack.
 TEXT _rt0_arm(SB),7,$-4
index 451817a67a3c89fc621731cd848febe50db78cf8..6d84e84d768ea2c06556ce6bd6ddfc9044aafc8b 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build ignore
-
 /*
 Input to cgo -cdefs
 
index 9b07029556dda1df426e04bad9348d1f693c6fd2..1fafb7bfc1cd7fe33c9361231fede4a48ee3adfd 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build ignore
-
 /*
  * Input to cgo -cdefs
 
index 2063efb067d9e9e46e307ac1c12effdf8011add9..35f74e8dbac9c7c5175efd852f6f339685e5e316 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build ignore
-
 /*
 Input to cgo.
 On a Debian Lenny arm linux distribution:
index 3f3e41d86b1e70276a3371acb692671b927dc85c..6cd988def2462c34a994eda0a731bcd37d676e22 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build ignore
-
 /*
 Input to cgo.
 
index 306e32197e4309476b1a146b9ee1a47d349c35ff..ee80bb28558c31d015f86749612bbe22f7e2a290 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build ignore
-
 /*
 Input to cgo.
 
index c0275e1114a19dfa31ff695e35fc5e456c3340ea..bbaab2d33e74d32d898701ae77fef07d0e7cf2a0 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build ignore
-
 /*
 Input to cgo -cdefs
 
index 47c30cf101fdeb78ead6d39eb49c612c19c0b571..4fb3a04634668f511ca937f7b5844baf7b76bed0 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build ignore
-
 /*
 Input to cgo.
 
index 47c30cf101fdeb78ead6d39eb49c612c19c0b571..4fb3a04634668f511ca937f7b5844baf7b76bed0 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build ignore
-
 /*
 Input to cgo.
 
index 0d525b9322f5cb0997d0ce813a29ed384adade0d..e23e4207de88b148ab8da1dc000c317b43a2cfbb 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build ignore
-
 /*
 Input to cgo.
 
index f1d07f61b36cfa444ea551ad7a48166b261d462b..fcac9c0600a7fe34eba11112b33229116b4c7e87 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build ignore
-
 /*
  * Translate a .goc file into a .c file.  A .goc file is a combination
  * of a limited form of Go with C.
@@ -744,7 +742,6 @@ main(int argc, char **argv)
                }
        }
 
-       printf("// AUTO-GENERATED; run make\n\n");
        process_file();
        exits(0);
 }
index c6b64ca6de7e8506826452251dca3802d0d163a2..375b7d7d7c83661d19fdef00c216be5b2a6a341a 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build freebsd linux
-
 #include "runtime.h"
 
 // This implementation depends on OS-specific implementations of
index ae229ec728cd6d85df330710c797aaf4e26c5bc5..8875b17a245603b91f4935aa2dd6d0056bc36d45 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin netbsd openbsd plan9 windows
-
 #include "runtime.h"
 
 // This implementation depends on OS-specific implementations of
index 3f6c2b2d2b88946a7394a232fce9a8e368891382..920e79a0245b926df259ade61b778c37c37fda30 100755 (executable)
@@ -5,28 +5,9 @@
 
 set -e
 
-SYS=$1
-export GOOS=$(echo $SYS | sed 's/_.*//')
-export GOARCH=$(echo $SYS | sed 's/.*_//')
-shift
-
-case "$GOARCH" in
-386) CC=8c;;
-amd64) CC=6c;;
-arm) CC=5c;;
-esac
-export CC
-
-export CFLAGS="-Dos_$GOOS -Darch_$GOARCH"
-
-cp arch_$GOARCH.h arch_GOARCH.h
-cp defs_${GOOS}_$GOARCH.h defs_GOOS_GOARCH.h
-cp os_$GOOS.h os_GOOS.h
-cp signals_$GOOS.h signals_GOOS.h
-
 cat <<'EOF'
 // Assembly constants.
-// AUTO-GENERATED; run make -f Makefile.auto
+// AUTOMATICALLY GENERATED BY mkasmh.sh DURING BUILD
 
 EOF
 
@@ -110,7 +91,6 @@ arm)
 esac
 echo
 
-$CC $CFLAGS -a proc.c |
 awk '
 { gsub(/\r/, ""); }
 /^aggr G$/ { aggr="g" }
@@ -129,6 +109,5 @@ aggr != "" && /^    / {
        offset=$(NF-1);
        printf("#define %s_%s %s\n", aggr, name, offset);
 }
-'
+' runtime.acid.$GOARCH
 
-rm -f arch_GOARCH.h defs_GOOS_GOARCH.h os_GOOS.h signals_GOOS.h
index 87c31f28b6b75e11c949914e5728341d1f0b172d..b6e97213e0ccd09279728762efa5163d33b3ac95 100755 (executable)
@@ -5,28 +5,10 @@
 
 set -e
 
-SYS=$1
-export GOOS=$(echo $SYS | sed 's/_.*//')
-export GOARCH=$(echo $SYS | sed 's/.*_//')
-shift
-
-case "$GOARCH" in
-386) CC=8c;;
-amd64) CC=6c;;
-arm) CC=5c;;
-esac
-export CC
-
-export CFLAGS="-DGOOS_$GOOS -DGOARCH_$GOARCH"
-
-cp arch_$GOARCH.h arch_GOARCH.h
-cp defs_${GOOS}_$GOARCH.h defs_GOOS_GOARCH.h
-cp os_$GOOS.h os_GOOS.h
-cp signals_$GOOS.h signals_GOOS.h
-
 cat <<EOF
 // Go definitions for C variables and types.
-// AUTO-GENERATED; run make -f Makefile.auto
+// AUTOMATICALLY GENERATED BY THE FOLLOWING COMMAND. DO NOT EDIT.
+// CC="$CC" CFLAGS="$CFLAGS" ./mkgodefs.sh $@
 
 package runtime
 import "unsafe"
@@ -55,5 +37,3 @@ skip {
 
 {print}
 '
-
-rm -f arch_GOARCH.h defs_GOOS_GOARCH.h os_GOOS.h signals_GOOS.h
index 931302187f9403e3a66c7ad8138ed7a9959aa05d..0d96aa3569e0790aa5110ed4f6ab73de0eaf0389 100644 (file)
@@ -1,14 +1,8 @@
-// Copyright 2009 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.
-
-// +build ignore
-
 #include <u.h>
 #include <libc.h>
 
 char *template =
-       "// AUTO-GENERATED; run make -f Makefile.auto\n\n"
+       "// generated by mkversion.c; do not edit.\n"
        "package runtime\n"
        "const defaultGoroot = `%s`\n"
        "const theVersion = \"%s\"\n";
index dc1408adc352f066806782d72140a130fa079fb1..5dc6b6e51bf01c14906375a882a9f3590ad0991a 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_amd64.h"
 
 TEXT   _rt0_amd64_windows(SB),7,$-8
        MOVQ    $_rt0_amd64(SB), AX
index c7621ddcaf2c4b2b9523141a32d297934394976d..fd75e78454ceec31857c509b233f8dd8525ec117 100644 (file)
@@ -152,7 +152,7 @@ sigaction(int32 i, void (*fn)(int32, Siginfo*, void*, G*), bool restart)
                sa.sa_flags |= SA_RESTART;
        sa.sa_mask = ~0ULL;
        sa.sa_tramp = runtime·sigtramp;        // runtime·sigtramp's job is to call into real handler
-       *(uintptr*)sa.__sigaction_u = (uintptr)fn;
+       *(uintptr*)&sa.__sigaction_u = (uintptr)fn;
        runtime·sigaction(i, &sa, nil);
 }
 
index 6ce1ba5533c4730cd739a2909cb44d449fcc4991..9a513468a0cf2ef043d55aaac6ded0ccb81029b1 100644 (file)
@@ -6,7 +6,7 @@
 // See http://fxr.watson.org/fxr/source/bsd/kern/syscalls.c?v=xnu-1228
 // or /usr/include/sys/syscall.h (on a Mac) for system call numbers.
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_386.h"
 
 TEXT runtime·notok(SB),7,$0
        MOVL    $0xf1, 0xf1
index 86f99366148206b6429576b064b5a60809d17763..ac777656c54e29c207f9ad4d75ce13e9022e90e9 100644 (file)
@@ -11,7 +11,7 @@
 // The high 8 bits specify the kind of system call: 1=Mach, 2=BSD, 3=Machine-Dependent.
 //
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_amd64.h"
 
 // Exit the entire program (like C exit)
 TEXT runtime·exit(SB),7,$0
index cec7a3e8e7a15440a14becd2474a364e648be5f9..9833784efce9417e5b79200590fc61ca3e83dd06 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_386.h"
        
 TEXT runtime·sys_umtx_op(SB),7,$-4
        MOVL    $454, AX
index c96b2f4d6bbc36391b50f01ea64c0c290785047a..991c33c8254f0de05f937246dd3a9c6d86473a15 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_amd64.h"
        
 TEXT runtime·sys_umtx_op(SB),7,$0
        MOVQ 8(SP), DI
index b745bc502e6bd8e5daa3bddeb41377f71b62e486..1763143f9e3486eff5a35a30ff57b7e5e3a49d5f 100644 (file)
@@ -6,7 +6,7 @@
 // System calls and other sys.stuff for 386, Linux
 //
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_386.h"
 
 TEXT runtime·exit(SB),7,$0
        MOVL    $252, AX        // syscall number
index ef7bb2864c0a19799e78483e5e68928ed3c8d0e4..d55518686caf5da0801af624e9aa3f65d676e907 100644 (file)
@@ -6,7 +6,7 @@
 // System calls and other sys.stuff for AMD64, Linux
 //
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_amd64.h"
 
 TEXT runtime·exit(SB),7,$0-8
        MOVL    8(SP), DI
index e0e4135b54cce3a58ae6fd63f2860496b3ac83da..d0b36dedf958f8bbc303d8514d9e48f35e2a6604 100644 (file)
@@ -6,7 +6,7 @@
 // System calls and other sys.stuff for arm, Linux
 //
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_arm.h"
 
 // OABI
 //#define SYS_BASE 0x00900000
index 632286102432cffbc078f39b07a7f7b300527af4..bcb4fc5e719e3078cc4aa9fd2357b2f3befb1462 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_386.h"
 
 // Exit the entire program (like C exit)
 TEXT runtime·exit(SB),7,$-4
index 7abeb159b1e147bf1325ca97d11381421fdaf698..20817711fba7c7bca9542817455fb5749c82ed36 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_amd64.h"
 
 // int64 rfork_thread(int32 flags, void *stack, M *m, G *g, void (*fn)(void));
 TEXT runtime·rfork_thread(SB),7,$0
index d49d32b95a1e1285366f2f8d935d3111da3ac4f2..ae3275c852ff6d841a490c0cce8255a73a786575 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_386.h"
 
 // Exit the entire program (like C exit)
 TEXT runtime·exit(SB),7,$-4
index 5bf2e813e816e41fb443d2cecac7ee7af3c21ca2..f568ba4312c303fbf7a181ef22f945f9d7c61860 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_amd64.h"
 
 // int64 rfork_thread(int32 flags, void *stack, M *m, G *g, void (*fn)(void));
 TEXT runtime·rfork_thread(SB),7,$0
index 94c36aa4100d1f66e4a663d1ae1df3372cd6949c..8c773eee9df6d419cdd76fcad2f50b6893900976 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 #include "defs_GOOS_GOARCH.h"
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_386.h"
 
 // setldt(int entry, int address, int limit)
 TEXT runtime·setldt(SB),7,$0
index c864c7f83c96a3e43db3b1a9b8a73495e5aee9a6..307b93d5c7efa9dd99d47ddd35f94a774f040f2f 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_386.h"
 
 // void runtime·asmstdcall(void *c);
 TEXT runtime·asmstdcall(SB),7,$0
index e2a518884d72bd7f446040968001195dbff74697..508759ff8ff71e34d3519803a6e491ac4d76c296 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "zasm_GOOS_GOARCH.h"
+#include "asm_amd64.h"
 
 // maxargs should be divisible by 2, as Windows stack
 // must be kept 16-byte aligned on syscall entry.