]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/s390xcpuid.S
GH886: CONNECT should use HTTP/1.1
[thirdparty/openssl.git] / crypto / s390xcpuid.S
CommitLineData
8626230a
AP
1.text
2
3.globl OPENSSL_s390x_facilities
4.type OPENSSL_s390x_facilities,@function
5.align 16
6OPENSSL_s390x_facilities:
7 lghi %r0,0
90ba3a28
AP
8 larl %r2,OPENSSL_s390xcap_P
9 stg %r0,8(%r2)
10 .long 0xb2b02000 # stfle 0(%r2)
11 brc 8,.Ldone
12 lghi %r0,1
13 .long 0xb2b02000 # stfle 0(%r2)
14.Ldone:
15 lg %r2,0(%r2)
8626230a
AP
16 br %r14
17.size OPENSSL_s390x_facilities,.-OPENSSL_s390x_facilities
18
19.globl OPENSSL_rdtsc
20.type OPENSSL_rdtsc,@function
21.align 16
22OPENSSL_rdtsc:
23 stck 16(%r15)
24 lg %r2,16(%r15)
25 br %r14
26.size OPENSSL_rdtsc,.-OPENSSL_rdtsc
27
28.globl OPENSSL_atomic_add
29.type OPENSSL_atomic_add,@function
30.align 16
31OPENSSL_atomic_add:
32 l %r1,0(%r2)
33.Lspin: lr %r0,%r1
34 ar %r0,%r3
35 cs %r1,%r0,0(%r2)
36 brc 4,.Lspin
37 lgfr %r2,%r0 # OpenSSL expects the new value
38 br %r14
39.size OPENSSL_atomic_add,.-OPENSSL_atomic_add
40
41.globl OPENSSL_wipe_cpu
42.type OPENSSL_wipe_cpu,@function
43.align 16
44OPENSSL_wipe_cpu:
45 xgr %r0,%r0
46 xgr %r1,%r1
47 lgr %r2,%r15
48 xgr %r3,%r3
49 xgr %r4,%r4
50 lzdr %f0
51 lzdr %f1
52 lzdr %f2
53 lzdr %f3
54 lzdr %f4
55 lzdr %f5
56 lzdr %f6
57 lzdr %f7
58 br %r14
59.size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
60
61.globl OPENSSL_cleanse
62.type OPENSSL_cleanse,@function
63.align 16
64OPENSSL_cleanse:
e822c756
AP
65#if !defined(__s390x__) && !defined(__s390x)
66 llgfr %r3,%r3
67#endif
8626230a
AP
68 lghi %r4,15
69 lghi %r0,0
70 clgr %r3,%r4
71 jh .Lot
7676eebf
AP
72 clgr %r3,%r0
73 bcr 8,%r14
8626230a
AP
74.Little:
75 stc %r0,0(%r2)
76 la %r2,1(%r2)
77 brctg %r3,.Little
78 br %r14
79.align 4
80.Lot: tmll %r2,7
81 jz .Laligned
82 stc %r0,0(%r2)
83 la %r2,1(%r2)
84 brctg %r3,.Lot
85.Laligned:
86 srlg %r4,%r3,3
87.Loop: stg %r0,0(%r2)
88 la %r2,8(%r2)
89 brctg %r4,.Loop
90 lghi %r4,7
91 ngr %r3,%r4
92 jnz .Little
93 br %r14
94.size OPENSSL_cleanse,.-OPENSSL_cleanse
91fdacb2 95
5fabb88a
AP
96.globl OPENSSL_instrument_bus
97.type OPENSSL_instrument_bus,@function
98.align 16
99OPENSSL_instrument_bus:
100 lghi %r2,0
101 br %r14
102.size OPENSSL_instrument_bus,.-OPENSSL_instrument_bus
103
104.globl OPENSSL_instrument_bus2
105.type OPENSSL_instrument_bus2,@function
106.align 16
107OPENSSL_instrument_bus2:
108 lghi %r2,0
109 br %r14
110.size OPENSSL_instrument_bus2,.-OPENSSL_instrument_bus2
111
91fdacb2
AP
112.section .init
113 brasl %r14,OPENSSL_cpuid_setup
114
90ba3a28 115.comm OPENSSL_s390xcap_P,16,8