diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-14 00:05:42 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-14 00:05:42 +0000 |
commit | ccea2b367771831e9877ec31e0656d153818bf3f (patch) | |
tree | e183ae81a1f48a02945cb6de463a70c5be1b06f6 /libgo/go/runtime/internal/sys | |
parent | fd961cec64a5807cd6375d5c4042bca4256c5fda (diff) | |
download | gcc-ccea2b367771831e9877ec31e0656d153818bf3f.tar.gz |
libgo: update to Go 1.8 release candidate 1
Compiler changes:
* Change map assignment to use mapassign and assign value directly.
* Change string iteration to use decoderune, faster for ASCII strings.
* Change makeslice to take int, and use makeslice64 for larger values.
* Add new noverflow field to hmap struct used for maps.
Unresolved problems, to be fixed later:
* Commented out test in go/types/sizes_test.go that doesn't compile.
* Commented out reflect.TestStructOf test for padding after zero-sized field.
Reviewed-on: https://go-review.googlesource.com/35231
gotools/:
Updates for Go 1.8rc1.
* Makefile.am (go_cmd_go_files): Add bug.go.
(s-zdefaultcc): Write defaultPkgConfig.
* Makefile.in: Rebuild.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244456 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/runtime/internal/sys')
-rw-r--r-- | libgo/go/runtime/internal/sys/intrinsics.go | 22 | ||||
-rw-r--r-- | libgo/go/runtime/internal/sys/intrinsics_test.go | 16 |
2 files changed, 0 insertions, 38 deletions
diff --git a/libgo/go/runtime/internal/sys/intrinsics.go b/libgo/go/runtime/internal/sys/intrinsics.go index f33209a8878..43acf34b801 100644 --- a/libgo/go/runtime/internal/sys/intrinsics.go +++ b/libgo/go/runtime/internal/sys/intrinsics.go @@ -32,28 +32,6 @@ func Ctz32(x uint32) uint32 { return uint32(builtinCtz32(x)) } -//go:nosplit - -// Ctz16 counts trailing (low-order) zeroes, -// and if all are zero, then 16. -func Ctz16(x uint16) uint16 { - if x == 0 { - return 16 - } - return uint16(builtinCtz32(uint32(x))) -} - -//go:nosplit - -// Ctz8 counts trailing (low-order) zeroes, -// and if all are zero, then 8. -func Ctz8(x uint8) uint8 { - if x == 0 { - return 8 - } - return uint8(builtinCtz32(uint32(x))) -} - //extern __builtin_bswap64 func bswap64(uint64) uint64 diff --git a/libgo/go/runtime/internal/sys/intrinsics_test.go b/libgo/go/runtime/internal/sys/intrinsics_test.go index 097631bc1e5..1f2c8daa962 100644 --- a/libgo/go/runtime/internal/sys/intrinsics_test.go +++ b/libgo/go/runtime/internal/sys/intrinsics_test.go @@ -21,22 +21,6 @@ func TestCtz32(t *testing.T) { } } } -func TestCtz16(t *testing.T) { - for i := uint(0); i <= 16; i++ { - x := uint16(5) << i - if got := sys.Ctz16(x); got != uint16(i) { - t.Errorf("Ctz16(%d)=%d, want %d", x, got, i) - } - } -} -func TestCtz8(t *testing.T) { - for i := uint(0); i <= 8; i++ { - x := uint8(5) << i - if got := sys.Ctz8(x); got != uint8(i) { - t.Errorf("Ctz8(%d)=%d, want %d", x, got, i) - } - } -} func TestBswap64(t *testing.T) { x := uint64(0x1122334455667788) |