2 // Copyright 2009-2016 The OpenSSL Project Authors. All Rights Reserved.
4 // Licensed under the OpenSSL license (the "License"). You may not use
5 // this file except in compliance with the License. You can obtain a copy
6 // in the file LICENSE in the source distribution or at
7 // https://www.openssl.org/source/license.html
9 .globl OPENSSL_s390x_facilities
10 .type OPENSSL_s390x_facilities,@function
12 OPENSSL_s390x_facilities:
14 larl %r4,OPENSSL_s390xcap_P
15 stg %r0,8(%r4) # wipe capability vectors
25 .long 0xb2b04000 # stfle 0(%r4)
28 .long 0xb2b04000 # stfle 0(%r4)
31 tmhl %r2,0x4000 # check for message-security-assist
34 lghi %r0,0 # query kimd capabilities
36 .long 0xb93e0002 # kimd %r0,%r2
38 lghi %r0,0 # query km capability vector
40 .long 0xb92e0042 # km %r4,%r2
42 lghi %r0,0 # query kmc capability vector
44 .long 0xb92f0042 # kmc %r4,%r2
46 tmhh %r3,0x0004 # check for message-security-assist-4
49 lghi %r0,0 # query kmctr capability vector
51 .long 0xb92d2042 # kmctr %r4,%r2,%r2
55 .size OPENSSL_s390x_facilities,.-OPENSSL_s390x_facilities
58 .type OPENSSL_rdtsc,@function
64 .size OPENSSL_rdtsc,.-OPENSSL_rdtsc
66 .globl OPENSSL_atomic_add
67 .type OPENSSL_atomic_add,@function
75 lgfr %r2,%r0 # OpenSSL expects the new value
77 .size OPENSSL_atomic_add,.-OPENSSL_atomic_add
79 .globl OPENSSL_wipe_cpu
80 .type OPENSSL_wipe_cpu,@function
97 .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
99 .globl OPENSSL_cleanse
100 .type OPENSSL_cleanse,@function
103 #if !defined(__s390x__) && !defined(__s390x)
125 .Loop: stg %r0,0(%r2)
132 .size OPENSSL_cleanse,.-OPENSSL_cleanse
135 .type CRYPTO_memcmp,@function
138 #if !defined(__s390x__) && !defined(__s390x)
159 .size CRYPTO_memcmp,.-CRYPTO_memcmp
161 .globl OPENSSL_instrument_bus
162 .type OPENSSL_instrument_bus,@function
164 OPENSSL_instrument_bus:
167 .size OPENSSL_instrument_bus,.-OPENSSL_instrument_bus
169 .globl OPENSSL_instrument_bus2
170 .type OPENSSL_instrument_bus2,@function
172 OPENSSL_instrument_bus2:
175 .size OPENSSL_instrument_bus2,.-OPENSSL_instrument_bus2
178 brasl %r14,OPENSSL_cpuid_setup
180 .comm OPENSSL_s390xcap_P,80,8