Skip to content

Commit c378a2e

Browse files
committed
Use the GFp_ prefix for nistz256 externs.
1 parent dd0865a commit c378a2e

10 files changed

+220
-222
lines changed

crypto/ec/asm/ecp_nistz256-armv4.pl

+29-31
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@
9292
b .Lreduce_by_sub
9393
.size __ecp_nistz256_mul_by_2,.-__ecp_nistz256_mul_by_2
9494
95-
@ void ecp_nistz256_add(BN_ULONG r0[8],const BN_ULONG r1[8],
95+
@ void GFp_nistz256_add(BN_ULONG r0[8],const BN_ULONG r1[8],
9696
@ const BN_ULONG r2[8]);
97-
.globl ecp_nistz256_add
98-
.type ecp_nistz256_add,%function
97+
.globl GFp_nistz256_add
98+
.type GFp_nistz256_add,%function
9999
.align 4
100-
ecp_nistz256_add:
100+
GFp_nistz256_add:
101101
stmdb sp!,{r4-r12,lr}
102102
bl __ecp_nistz256_add
103103
#if __ARM_ARCH__>=5 || !defined(__thumb__)
@@ -106,7 +106,7 @@
106106
ldmia sp!,{r4-r12,lr}
107107
bx lr @ interoperable with Thumb ISA:-)
108108
#endif
109-
.size ecp_nistz256_add,.-ecp_nistz256_add
109+
.size GFp_nistz256_add,.-GFp_nistz256_add
110110
111111
.type __ecp_nistz256_add,%function
112112
.align 4
@@ -363,11 +363,11 @@
363363
mov pc,lr
364364
.size __ecp_nistz256_sub,.-__ecp_nistz256_sub
365365
366-
@ void ecp_nistz256_neg(BN_ULONG r0[8],const BN_ULONG r1[8]);
367-
.globl ecp_nistz256_neg
368-
.type ecp_nistz256_neg,%function
366+
@ void GFp_nistz256_neg(BN_ULONG r0[8],const BN_ULONG r1[8]);
367+
.globl GFp_nistz256_neg
368+
.type GFp_nistz256_neg,%function
369369
.align 4
370-
ecp_nistz256_neg:
370+
GFp_nistz256_neg:
371371
stmdb sp!,{r4-r12,lr}
372372
bl __ecp_nistz256_neg
373373
#if __ARM_ARCH__>=5 || !defined(__thumb__)
@@ -376,7 +376,7 @@
376376
ldmia sp!,{r4-r12,lr}
377377
bx lr @ interoperable with Thumb ISA:-)
378378
#endif
379-
.size ecp_nistz256_neg,.-ecp_nistz256_neg
379+
.size GFp_nistz256_neg,.-GFp_nistz256_neg
380380
381381
.type __ecp_nistz256_neg,%function
382382
.align 4
@@ -408,13 +408,12 @@
408408
my ($t0,$t1,$bj,$t2,$t3)=map("r$_",(0,1,2,12,14));
409409

410410
$code.=<<___;
411-
@ void ecp_nistz256_mul_mont(BN_ULONG r0[8],const BN_ULONG r1[8],
411+
@ void GFp_nistz256_mul_mont(BN_ULONG r0[8],const BN_ULONG r1[8],
412412
@ const BN_ULONG r2[8]);
413-
.globl ecp_nistz256_mul_mont
414-
.type ecp_nistz256_mul_mont,%function
413+
.globl GFp_nistz256_mul_mont
414+
.type GFp_nistz256_mul_mont,%function
415415
.align 4
416-
ecp_nistz256_mul_mont:
417-
.Lecp_nistz256_mul_mont:
416+
GFp_nistz256_mul_mont:
418417
stmdb sp!,{r4-r12,lr}
419418
bl __ecp_nistz256_mul_mont
420419
#if __ARM_ARCH__>=5 || !defined(__thumb__)
@@ -423,7 +422,7 @@
423422
ldmia sp!,{r4-r12,lr}
424423
bx lr @ interoperable with Thumb ISA:-)
425424
#endif
426-
.size ecp_nistz256_mul_mont,.-ecp_nistz256_mul_mont
425+
.size GFp_nistz256_mul_mont,.-GFp_nistz256_mul_mont
427426
428427
.type __ecp_nistz256_mul_mont,%function
429428
.align 4
@@ -618,7 +617,6 @@
618617
#if __ARM_ARCH__>=7
619618
.fpu neon
620619
621-
.globl ecp_nistz256_mul_mont_neon
622620
.type ecp_nistz256_mul_mont_neon,%function
623621
.align 5
624622
ecp_nistz256_mul_mont_neon:
@@ -904,10 +902,10 @@
904902
# input arguments just below these temporary vectors.
905903

906904
$code.=<<___;
907-
.globl ecp_nistz256_point_double
908-
.type ecp_nistz256_point_double,%function
905+
.globl GFp_nistz256_point_double
906+
.type GFp_nistz256_point_double,%function
909907
.align 5
910-
ecp_nistz256_point_double:
908+
GFp_nistz256_point_double:
911909
stmdb sp!,{r0-r12,lr} @ push from r0, unusual, but intentional
912910
sub sp,sp,#32*5
913911
@@ -1004,12 +1002,12 @@
10041002
ldmia sp!,{r4-r12,lr}
10051003
bx lr @ interoperable with Thumb ISA:-)
10061004
#endif
1007-
.size ecp_nistz256_point_double,.-ecp_nistz256_point_double
1005+
.size GFp_nistz256_point_double,.-GFp_nistz256_point_double
10081006
___
10091007
}
10101008

10111009
########################################################################
1012-
# void ecp_nistz256_point_add(P256_POINT *out,const P256_POINT *in1,
1010+
# void GFp_nistz256_point_add(P256_POINT *out,const P256_POINT *in1,
10131011
# const P256_POINT *in2);
10141012
{
10151013
my ($res_x,$res_y,$res_z,
@@ -1026,10 +1024,10 @@
10261024
# result of check for zero.
10271025

10281026
$code.=<<___;
1029-
.globl ecp_nistz256_point_add
1030-
.type ecp_nistz256_point_add,%function
1027+
.globl GFp_nistz256_point_add
1028+
.type GFp_nistz256_point_add,%function
10311029
.align 5
1032-
ecp_nistz256_point_add:
1030+
GFp_nistz256_point_add:
10331031
stmdb sp!,{r0-r12,lr} @ push from r0, unusual, but intentional
10341032
sub sp,sp,#32*18+16
10351033
@@ -1283,12 +1281,12 @@
12831281
ldmia sp!,{r4-r12,lr}
12841282
bx lr @ interoperable with Thumb ISA:-)
12851283
#endif
1286-
.size ecp_nistz256_point_add,.-ecp_nistz256_point_add
1284+
.size GFp_nistz256_point_add,.-GFp_nistz256_point_add
12871285
___
12881286
}
12891287

12901288
########################################################################
1291-
# void ecp_nistz256_point_add_affine(P256_POINT *out,const P256_POINT *in1,
1289+
# void GFp_nistz256_point_add_affine(P256_POINT *out,const P256_POINT *in1,
12921290
# const P256_POINT_AFFINE *in2);
12931291
{
12941292
my ($res_x,$res_y,$res_z,
@@ -1305,10 +1303,10 @@
13051303
my @ONE_mont=(1,0,0,-1,-1,-1,-2,0);
13061304

13071305
$code.=<<___;
1308-
.globl ecp_nistz256_point_add_affine
1309-
.type ecp_nistz256_point_add_affine,%function
1306+
.globl GFp_nistz256_point_add_affine
1307+
.type GFp_nistz256_point_add_affine,%function
13101308
.align 5
1311-
ecp_nistz256_point_add_affine:
1309+
GFp_nistz256_point_add_affine:
13121310
stmdb sp!,{r0-r12,lr} @ push from r0, unusual, but intentional
13131311
sub sp,sp,#32*15
13141312
@@ -1503,7 +1501,7 @@
15031501
ldmia sp!,{r4-r12,lr}
15041502
bx lr @ interoperable with Thumb ISA:-)
15051503
#endif
1506-
.size ecp_nistz256_point_add_affine,.-ecp_nistz256_point_add_affine
1504+
.size GFp_nistz256_point_add_affine,.-GFp_nistz256_point_add_affine
15071505
___
15081506
} }}}
15091507

crypto/ec/asm/ecp_nistz256-armv8.pl

+35-35
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@
5656
.quad 1,0,0,0
5757
.asciz "ECP_NISTZ256 for ARMv8, CRYPTOGAMS by <appro\@openssl.org>"
5858
59-
// void ecp_nistz256_mul_mont(BN_ULONG x0[4],const BN_ULONG x1[4],
59+
// void GFp_nistz256_mul_mont(BN_ULONG x0[4],const BN_ULONG x1[4],
6060
// const BN_ULONG x2[4]);
61-
.globl ecp_nistz256_mul_mont
62-
.type ecp_nistz256_mul_mont,%function
61+
.globl GFp_nistz256_mul_mont
62+
.type GFp_nistz256_mul_mont,%function
6363
.align 4
64-
ecp_nistz256_mul_mont:
64+
GFp_nistz256_mul_mont:
6565
stp x29,x30,[sp,#-32]!
6666
add x29,sp,#0
6767
stp x19,x20,[sp,#16]
@@ -77,13 +77,13 @@
7777
ldp x19,x20,[sp,#16]
7878
ldp x29,x30,[sp],#32
7979
ret
80-
.size ecp_nistz256_mul_mont,.-ecp_nistz256_mul_mont
80+
.size GFp_nistz256_mul_mont,.-GFp_nistz256_mul_mont
8181
82-
// void ecp_nistz256_sqr_mont(BN_ULONG x0[4],const BN_ULONG x1[4]);
83-
.globl ecp_nistz256_sqr_mont
84-
.type ecp_nistz256_sqr_mont,%function
82+
// void GFp_nistz256_sqr_mont(BN_ULONG x0[4],const BN_ULONG x1[4]);
83+
.globl GFp_nistz256_sqr_mont
84+
.type GFp_nistz256_sqr_mont,%function
8585
.align 4
86-
ecp_nistz256_sqr_mont:
86+
GFp_nistz256_sqr_mont:
8787
stp x29,x30,[sp,#-32]!
8888
add x29,sp,#0
8989
stp x19,x20,[sp,#16]
@@ -98,14 +98,14 @@
9898
ldp x19,x20,[sp,#16]
9999
ldp x29,x30,[sp],#32
100100
ret
101-
.size ecp_nistz256_sqr_mont,.-ecp_nistz256_sqr_mont
101+
.size GFp_nistz256_sqr_mont,.-GFp_nistz256_sqr_mont
102102
103-
// void ecp_nistz256_add(BN_ULONG x0[4],const BN_ULONG x1[4],
103+
// void GFp_nistz256_add(BN_ULONG x0[4],const BN_ULONG x1[4],
104104
// const BN_ULONG x2[4]);
105-
.globl ecp_nistz256_add
106-
.type ecp_nistz256_add,%function
105+
.globl GFp_nistz256_add
106+
.type GFp_nistz256_add,%function
107107
.align 4
108-
ecp_nistz256_add:
108+
GFp_nistz256_add:
109109
stp x29,x30,[sp,#-16]!
110110
add x29,sp,#0
111111
@@ -120,13 +120,13 @@
120120
121121
ldp x29,x30,[sp],#16
122122
ret
123-
.size ecp_nistz256_add,.-ecp_nistz256_add
123+
.size GFp_nistz256_add,.-GFp_nistz256_add
124124
125-
// void ecp_nistz256_neg(BN_ULONG x0[4],const BN_ULONG x1[4]);
126-
.globl ecp_nistz256_neg
127-
.type ecp_nistz256_neg,%function
125+
// void GFp_nistz256_neg(BN_ULONG x0[4],const BN_ULONG x1[4]);
126+
.globl GFp_nistz256_neg
127+
.type GFp_nistz256_neg,%function
128128
.align 4
129-
ecp_nistz256_neg:
129+
GFp_nistz256_neg:
130130
stp x29,x30,[sp,#-16]!
131131
add x29,sp,#0
132132
@@ -142,7 +142,7 @@
142142
143143
ldp x29,x30,[sp],#16
144144
ret
145-
.size ecp_nistz256_neg,.-ecp_nistz256_neg
145+
.size GFp_nistz256_neg,.-GFp_nistz256_neg
146146
147147
// note that __ecp_nistz256_mul_mont expects a[0-3] input pre-loaded
148148
// to $a0-$a3 and b[0] - to $bi
@@ -488,7 +488,7 @@
488488
# ecp_nistz256.c
489489
#
490490
########################################################################
491-
# void ecp_nistz256_point_double(P256_POINT *out,const P256_POINT *inp);
491+
# void GFp_nistz256_point_double(P256_POINT *out,const P256_POINT *inp);
492492
#
493493
{
494494
my ($S,$M,$Zsqr,$tmp0)=map(32*$_,(0..3));
@@ -497,10 +497,10 @@
497497
my ($rp_real,$ap_real) = map("x$_",(21,22));
498498

499499
$code.=<<___;
500-
.globl ecp_nistz256_point_double
501-
.type ecp_nistz256_point_double,%function
500+
.globl GFp_nistz256_point_double
501+
.type GFp_nistz256_point_double,%function
502502
.align 5
503-
ecp_nistz256_point_double:
503+
GFp_nistz256_point_double:
504504
stp x29,x30,[sp,#-80]!
505505
add x29,sp,#0
506506
stp x19,x20,[sp,#16]
@@ -636,12 +636,12 @@
636636
ldp x21,x22,[x29,#32]
637637
ldp x29,x30,[sp],#80
638638
ret
639-
.size ecp_nistz256_point_double,.-ecp_nistz256_point_double
639+
.size GFp_nistz256_point_double,.-GFp_nistz256_point_double
640640
___
641641
}
642642

643643
########################################################################
644-
# void ecp_nistz256_point_add(P256_POINT *out,const P256_POINT *in1,
644+
# void GFp_nistz256_point_add(P256_POINT *out,const P256_POINT *in1,
645645
# const P256_POINT *in2);
646646
{
647647
my ($res_x,$res_y,$res_z,
@@ -653,10 +653,10 @@
653653
my ($rp_real,$ap_real,$bp_real,$in1infty,$in2infty,$temp)=map("x$_",(21..26));
654654

655655
$code.=<<___;
656-
.globl ecp_nistz256_point_add
657-
.type ecp_nistz256_point_add,%function
656+
.globl GFp_nistz256_point_add
657+
.type GFp_nistz256_point_add,%function
658658
.align 5
659-
ecp_nistz256_point_add:
659+
GFp_nistz256_point_add:
660660
stp x29,x30,[sp,#-80]!
661661
add x29,sp,#0
662662
stp x19,x20,[sp,#16]
@@ -919,12 +919,12 @@
919919
ldp x25,x26,[x29,#64]
920920
ldp x29,x30,[sp],#80
921921
ret
922-
.size ecp_nistz256_point_add,.-ecp_nistz256_point_add
922+
.size GFp_nistz256_point_add,.-GFp_nistz256_point_add
923923
___
924924
}
925925

926926
########################################################################
927-
# void ecp_nistz256_point_add_affine(P256_POINT *out,const P256_POINT *in1,
927+
# void GFp_nistz256_point_add_affine(P256_POINT *out,const P256_POINT *in1,
928928
# const P256_POINT_AFFINE *in2);
929929
{
930930
my ($res_x,$res_y,$res_z,
@@ -935,10 +935,10 @@
935935
my ($rp_real,$ap_real,$bp_real,$in1infty,$in2infty,$temp)=map("x$_",(21..26));
936936

937937
$code.=<<___;
938-
.globl ecp_nistz256_point_add_affine
939-
.type ecp_nistz256_point_add_affine,%function
938+
.globl GFp_nistz256_point_add_affine
939+
.type GFp_nistz256_point_add_affine,%function
940940
.align 5
941-
ecp_nistz256_point_add_affine:
941+
GFp_nistz256_point_add_affine:
942942
stp x29,x30,[sp,#-80]!
943943
add x29,sp,#0
944944
stp x19,x20,[sp,#16]
@@ -1136,7 +1136,7 @@
11361136
ldp x25,x26,[x29,#64]
11371137
ldp x29,x30,[sp],#80
11381138
ret
1139-
.size ecp_nistz256_point_add_affine,.-ecp_nistz256_point_add_affine
1139+
.size GFp_nistz256_point_add_affine,.-GFp_nistz256_point_add_affine
11401140
___
11411141
} }
11421142

0 commit comments

Comments
 (0)