1
0
mirror of https://github.com/golang/go synced 2024-11-23 19:50:06 -07:00

internal/cpu: make all constants for s390x feature detection typed

Only the first constant in the function and facility
constant declaration blocks were typed constants.
Make all other constants used for function codes and
named facilities also typed.

Change-Id: I1814121de3733094da699c78b7311f99ba4772e1
Reviewed-on: https://go-review.googlesource.com/126776
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Martin Möhrmann 2018-07-30 22:57:25 +02:00
parent 0a382e0b7f
commit 21ac811924

View File

@ -18,16 +18,16 @@ type function uint8
const ( const (
// KM{,A,C,CTR} function codes // KM{,A,C,CTR} function codes
aes128 function = 18 // AES-128 aes128 function = 18 // AES-128
aes192 = 19 // AES-192 aes192 function = 19 // AES-192
aes256 = 20 // AES-256 aes256 function = 20 // AES-256
// K{I,L}MD function codes // K{I,L}MD function codes
sha1 = 1 // SHA-1 sha1 function = 1 // SHA-1
sha256 = 2 // SHA-256 sha256 function = 2 // SHA-256
sha512 = 3 // SHA-512 sha512 function = 3 // SHA-512
// KLMD function codes // KLMD function codes
ghash = 65 // GHASH ghash function = 65 // GHASH
) )
// queryResult contains the result of a Query function // queryResult contains the result of a Query function
@ -56,20 +56,20 @@ type facility uint8
const ( const (
// mandatory facilities // mandatory facilities
zarch facility = 1 // z architecture mode is active zarch facility = 1 // z architecture mode is active
stflef = 7 // store-facility-list-extended stflef facility = 7 // store-facility-list-extended
ldisp = 18 // long-displacement ldisp facility = 18 // long-displacement
eimm = 21 // extended-immediate eimm facility = 21 // extended-immediate
// miscellaneous facilities // miscellaneous facilities
dfp = 42 // decimal-floating-point dfp facility = 42 // decimal-floating-point
etf3eh = 30 // extended-translation 3 enhancement etf3eh facility = 30 // extended-translation 3 enhancement
// cryptography facilities // cryptography facilities
msa = 17 // message-security-assist msa facility = 17 // message-security-assist
msa3 = 76 // message-security-assist extension 3 msa3 facility = 76 // message-security-assist extension 3
msa4 = 77 // message-security-assist extension 4 msa4 facility = 77 // message-security-assist extension 4
msa5 = 57 // message-security-assist extension 5 msa5 facility = 57 // message-security-assist extension 5
msa8 = 146 // message-security-assist extension 8 msa8 facility = 146 // message-security-assist extension 8
// Note: vx and highgprs are excluded because they require // Note: vx and highgprs are excluded because they require
// kernel support and so must be fetched from HWCAP. // kernel support and so must be fetched from HWCAP.