| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/go/src/cmd/internal/obj/arm64/ |
Upload File : |
// Copyright 2016 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.
package arm64
import "testing"
func testvmovs() (r1, r2 uint64)
func testvmovd() (r1, r2 uint64)
func testvmovq() (r1, r2 uint64)
func TestVMOV(t *testing.T) {
tests := []struct {
op string
vmovFunc func() (uint64, uint64)
wantA, wantB uint64
}{
{"VMOVS", testvmovs, 0x80402010, 0},
{"VMOVD", testvmovd, 0x7040201008040201, 0},
{"VMOVQ", testvmovq, 0x7040201008040201, 0x3040201008040201},
}
for _, test := range tests {
gotA, gotB := test.vmovFunc()
if gotA != test.wantA || gotB != test.wantB {
t.Errorf("%v: got: a=0x%x, b=0x%x, want: a=0x%x, b=0x%x", test.op, gotA, gotB, test.wantA, test.wantB)
}
}
}
func testmovk() uint64
// TestMOVK makes sure MOVK with a very large constant works. See issue 52261.
func TestMOVK(t *testing.T) {
x := testmovk()
want := uint64(40000 << 48)
if x != want {
t.Errorf("Got %x want %x\n", x, want)
}
}