]> Cypherpunks repositories - gostls13.git/commitdiff
internal/cpu: make all constants for s390x feature detection typed
authorMartin Möhrmann <moehrmann@google.com>
Mon, 30 Jul 2018 20:57:25 +0000 (22:57 +0200)
committerMartin Möhrmann <moehrmann@google.com>
Mon, 20 Aug 2018 15:13:39 +0000 (15:13 +0000)
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>
src/internal/cpu/cpu_s390x.go

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