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 7package codegen 8 9// A uint16 or sint16 constant shifted left. 10func shifted16BitConstants(out [64]uint64) { 11 // ppc64x: "MOVD\t[$]8193,", "SLD\t[$]27," 12 out[0] = 0x0000010008000000 13 // ppc64x: "MOVD\t[$]-32767", "SLD\t[$]26," 14 out[1] = 0xFFFFFE0004000000 15 // ppc64x: "MOVD\t[$]-1", "SLD\t[$]48," 16 out[2] = 0xFFFF000000000000 17 // ppc64x: "MOVD\t[$]65535", "SLD\t[$]44," 18 out[3] = 0x0FFFF00000000000 19} 20 21// A contiguous set of 1 bits, potentially wrapping. 22func contiguousMaskConstants(out [64]uint64) { 23 // ppc64x: "MOVD\t[$]-1", "RLDC\tR[0-9]+, [$]44, [$]63," 24 out[0] = 0xFFFFF00000000001 25 // ppc64x: "MOVD\t[$]-1", "RLDC\tR[0-9]+, [$]43, [$]63," 26 out[1] = 0xFFFFF80000000001 27 // ppc64x: "MOVD\t[$]-1", "RLDC\tR[0-9]+, [$]43, [$]4," 28 out[2] = 0x0FFFF80000000000 29 // ppc64x/power8: "MOVD\t[$]-1", "RLDC\tR[0-9]+, [$]33, [$]63," 30 // ppc64x/power9: "MOVD\t[$]-1", "RLDC\tR[0-9]+, [$]33, [$]63," 31 // ppc64x/power10: "MOVD\t[$]-8589934591," 32 out[3] = 0xFFFFFFFE00000001 33} 34