]> git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/alphacpuid.pl
Replace alphacpuid.s with alphacpuid.pl to ensure it makes to release tar-balls.
[thirdparty/openssl.git] / crypto / alphacpuid.pl
1 #!/usr/bin/env perl
2 print <<___;
3 .text
4
5 .set noat
6
7 .globl OPENSSL_cpuid_setup
8 .ent OPENSSL_cpuid_setup
9 OPENSSL_cpuid_setup:
10 .frame $30,0,$26
11 .prologue 0
12 ret ($26)
13 .end OPENSSL_cpuid_setup
14
15 .globl OPENSSL_wipe_cpu
16 .ent OPENSSL_wipe_cpu
17 OPENSSL_wipe_cpu:
18 .frame $30,0,$26
19 .prologue 0
20 clr $1
21 clr $2
22 clr $3
23 clr $4
24 clr $5
25 clr $6
26 clr $7
27 clr $8
28 clr $16
29 clr $17
30 clr $18
31 clr $19
32 clr $20
33 clr $21
34 clr $22
35 clr $23
36 clr $24
37 clr $25
38 clr $27
39 clr $at
40 clr $29
41 fclr $f0
42 fclr $f1
43 fclr $f10
44 fclr $f11
45 fclr $f12
46 fclr $f13
47 fclr $f14
48 fclr $f15
49 fclr $f16
50 fclr $f17
51 fclr $f18
52 fclr $f19
53 fclr $f20
54 fclr $f21
55 fclr $f22
56 fclr $f23
57 fclr $f24
58 fclr $f25
59 fclr $f26
60 fclr $f27
61 fclr $f28
62 fclr $f29
63 fclr $f30
64 mov $sp,$0
65 ret ($26)
66 .end OPENSSL_wipe_cpu
67
68 .globl OPENSSL_atomic_add
69 .ent OPENSSL_atomic_add
70 OPENSSL_atomic_add:
71 .frame $30,0,$26
72 .prologue 0
73 1: ldl_l $0,($16)
74 addl $0,$17,$1
75 stl_c $1,($16)
76 beq $1,1b
77 addl $0,$17,$0
78 ret ($26)
79 .end OPENSSL_atomic_add
80
81 .globl OPENSSL_rdtsc
82 .ent OPENSSL_rdtsc
83 OPENSSL_rdtsc:
84 .frame $30,0,$26
85 .prologue 0
86 rpcc $0
87 ret ($26)
88 .end OPENSSL_rdtsc
89
90 .globl OPENSSL_cleanse
91 .ent OPENSSL_cleanse
92 OPENSSL_cleanse:
93 .frame $30,0,$26
94 .prologue 0
95 beq $17,.Ldone
96 and $16,7,$0
97 bic $17,7,$at
98 beq $at,.Little
99 beq $0,.Laligned
100
101 .Little:
102 ldq_u $1,0($16)
103 mov $16,$2
104 .Lalign:
105 mskbl $1,$16,$1
106 lda $16,1($16)
107 subq $17,1,$17
108 subq $0,1,$0
109 beq $17,.Lout
110 bne $0,.Lalign
111 .Lout: stq_u $1,0($2)
112 beq $17,.Ldone
113 bic $17,7,$at
114 mov $17,$0
115 beq $at,.Little
116
117 .Laligned:
118 stq $31,0($16)
119 subq $17,8,$17
120 lda $16,8($16)
121 bic $17,7,$at
122 bne $at,.Laligned
123 beq $17,.Ldone
124 mov $17,$0
125 br .Little
126 .Ldone: ret ($26)
127 .end OPENSSL_cleanse
128 ___