Debian Codegraph @

internal/regmask/regmask_386.go

raw
1 //go:build 386
2
3 package regmask
4
5 // A 64 bit shift on 386 is synthesized from 32 bit instructions, and masking its
6 // count makes the compiler emit more code rather than less, so those masks are
7 // no-ops here: each is the largest value its count type can hold, which the
8 // compiler folds away. Shifts of narrower values behave as elsewhere.
9 const (
10 // ShiftNByUint8 - shifting an N bit value by a uint8
11 Shift8ByUint8 = 7
12 Shift16ByUint8 = 15
13 Shift32ByUint8 = 31
14 Shift64ByUint8 = 0xff
15
16 // ShiftNByUint16 - shifting an N bit value by a uint16
17 Shift8ByUint16 = Shift8ByUint8
18 Shift16ByUint16 = Shift16ByUint8
19 Shift32ByUint16 = Shift32ByUint8
20 Shift64ByUint16 = 0xffff
21
22 // ShiftNByUint32 - shifting an N bit value by a uint32
23 Shift8ByUint32 = Shift8ByUint8
24 Shift16ByUint32 = Shift16ByUint8
25 Shift32ByUint32 = Shift32ByUint8
26 Shift64ByUint32 = 0xffffffff
27
28 // ShiftNByUint64 - shifting an N bit value by a uint64
29 Shift8ByUint64 = Shift8ByUint8
30 Shift16ByUint64 = Shift16ByUint8
31 Shift32ByUint64 = Shift32ByUint8
32 Shift64ByUint64 = 0xffffffffffffffff
33
34 // ShiftNByUint - shifting an N bit value by a uint
35 Shift8ByUint = Shift8ByUint8
36 Shift16ByUint = Shift16ByUint8
37 Shift32ByUint = Shift32ByUint8
38 Shift64ByUint = ^uint(0)
39 )