Debian Codegraph @

test/codegen/constants.go

raw
1 // asmcheck
2
3 // Copyright 2023 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 package codegen
8
9 // A uint16 or sint16 constant shifted left.
10 func shifted16BitConstants() (out [64]uint64) {
11 // ppc64x: "MOVD [$]8193,", "SLD [$]27,"
12 out[0] = 0x0000010008000000
13 // ppc64x: "MOVD [$]-32767", "SLD [$]26,"
14 out[1] = 0xFFFFFE0004000000
15 // ppc64x: "MOVD [$]-1", "SLD [$]48,"
16 out[2] = 0xFFFF000000000000
17 // ppc64x: "MOVD [$]65535", "SLD [$]44,"
18 out[3] = 0x0FFFF00000000000
19 return
20 }
21
22 // A contiguous set of 1 bits, potentially wrapping.
23 func contiguousMaskConstants() (out [64]uint64) {
24 // ppc64x: "MOVD [$]-1", "RLDC R[0-9]+, [$]44, [$]63,"
25 out[0] = 0xFFFFF00000000001
26 // ppc64x: "MOVD [$]-1", "RLDC R[0-9]+, [$]43, [$]63,"
27 out[1] = 0xFFFFF80000000001
28 // ppc64x: "MOVD [$]-1", "RLDC R[0-9]+, [$]43, [$]4,"
29 out[2] = 0x0FFFF80000000000
30 // ppc64x/power8: "MOVD [$]-1", "RLDC R[0-9]+, [$]33, [$]63,"
31 // ppc64x/power9: "MOVD [$]-1", "RLDC R[0-9]+, [$]33, [$]63,"
32 // ppc64x/power10: "MOVD [$]-8589934591,"
33 out[3] = 0xFFFFFFFE00000001
34 return
35 }