Source file src/cmd/compile/internal/ssarewrite/rewritearm/arm_helpers.go
1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package rewritearm 6 7 // check if an immediate can be directly encoded into an ARM's instruction. 8 func isARMImmRot(v uint32) bool { 9 for i := 0; i < 16; i++ { 10 if v&^0xff == 0 { 11 return true 12 } 13 v = v<<2 | v>>30 14 } 15 16 return false 17 } 18