Skip to content

Commit a09be03

Browse files
ebiggersherbertx
authored andcommitted
crypto: x86/aegis128 - remove unneeded FRAME_BEGIN and FRAME_END
Stop using FRAME_BEGIN and FRAME_END in the AEGIS assembly functions, since all these functions are now leaf functions. This eliminates some unnecessary instructions. Reviewed-by: Ondrej Mosnacek <[email protected]> Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent a0927a0 commit a09be03

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

arch/x86/crypto/aegis128-aesni-asm.S

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*/
99

1010
#include <linux/linkage.h>
11-
#include <asm/frame.h>
1211

1312
#define STATE0 %xmm0
1413
#define STATE1 %xmm1
@@ -146,7 +145,6 @@ SYM_FUNC_START(aegis128_aesni_init)
146145
.set STATEP, %rdi
147146
.set KEYP, %rsi
148147
.set IVP, %rdx
149-
FRAME_BEGIN
150148

151149
/* load IV: */
152150
movdqu (IVP), T1
@@ -182,8 +180,6 @@ SYM_FUNC_START(aegis128_aesni_init)
182180
movdqu STATE2, 0x20(STATEP)
183181
movdqu STATE3, 0x30(STATEP)
184182
movdqu STATE4, 0x40(STATEP)
185-
186-
FRAME_END
187183
RET
188184
SYM_FUNC_END(aegis128_aesni_init)
189185

@@ -197,7 +193,6 @@ SYM_FUNC_START(aegis128_aesni_ad)
197193
.set STATEP, %rdi
198194
.set SRC, %rsi
199195
.set LEN, %edx
200-
FRAME_BEGIN
201196

202197
test LEN, LEN
203198
jz .Lad_out
@@ -251,7 +246,6 @@ SYM_FUNC_START(aegis128_aesni_ad)
251246
movdqu STATE2, 0x20(STATEP)
252247
movdqu STATE3, 0x30(STATEP)
253248
movdqu STATE4, 0x40(STATEP)
254-
FRAME_END
255249
RET
256250

257251
.Lad_out_1:
@@ -260,7 +254,6 @@ SYM_FUNC_START(aegis128_aesni_ad)
260254
movdqu STATE1, 0x20(STATEP)
261255
movdqu STATE2, 0x30(STATEP)
262256
movdqu STATE3, 0x40(STATEP)
263-
FRAME_END
264257
RET
265258

266259
.Lad_out_2:
@@ -269,7 +262,6 @@ SYM_FUNC_START(aegis128_aesni_ad)
269262
movdqu STATE0, 0x20(STATEP)
270263
movdqu STATE1, 0x30(STATEP)
271264
movdqu STATE2, 0x40(STATEP)
272-
FRAME_END
273265
RET
274266

275267
.Lad_out_3:
@@ -278,7 +270,6 @@ SYM_FUNC_START(aegis128_aesni_ad)
278270
movdqu STATE4, 0x20(STATEP)
279271
movdqu STATE0, 0x30(STATEP)
280272
movdqu STATE1, 0x40(STATEP)
281-
FRAME_END
282273
RET
283274

284275
.Lad_out_4:
@@ -287,11 +278,9 @@ SYM_FUNC_START(aegis128_aesni_ad)
287278
movdqu STATE3, 0x20(STATEP)
288279
movdqu STATE4, 0x30(STATEP)
289280
movdqu STATE0, 0x40(STATEP)
290-
FRAME_END
291281
RET
292282

293283
.Lad_out:
294-
FRAME_END
295284
RET
296285
SYM_FUNC_END(aegis128_aesni_ad)
297286

@@ -323,7 +312,6 @@ SYM_FUNC_START(aegis128_aesni_enc)
323312
.set SRC, %rsi
324313
.set DST, %rdx
325314
.set LEN, %ecx
326-
FRAME_BEGIN
327315

328316
/* load the state: */
329317
movdqu 0x00(STATEP), STATE0
@@ -351,7 +339,6 @@ SYM_FUNC_START(aegis128_aesni_enc)
351339
movdqu STATE1, 0x20(STATEP)
352340
movdqu STATE2, 0x30(STATEP)
353341
movdqu STATE3, 0x40(STATEP)
354-
FRAME_END
355342
RET
356343

357344
.Lenc_out_1:
@@ -360,7 +347,6 @@ SYM_FUNC_START(aegis128_aesni_enc)
360347
movdqu STATE0, 0x20(STATEP)
361348
movdqu STATE1, 0x30(STATEP)
362349
movdqu STATE2, 0x40(STATEP)
363-
FRAME_END
364350
RET
365351

366352
.Lenc_out_2:
@@ -369,7 +355,6 @@ SYM_FUNC_START(aegis128_aesni_enc)
369355
movdqu STATE4, 0x20(STATEP)
370356
movdqu STATE0, 0x30(STATEP)
371357
movdqu STATE1, 0x40(STATEP)
372-
FRAME_END
373358
RET
374359

375360
.Lenc_out_3:
@@ -378,7 +363,6 @@ SYM_FUNC_START(aegis128_aesni_enc)
378363
movdqu STATE3, 0x20(STATEP)
379364
movdqu STATE4, 0x30(STATEP)
380365
movdqu STATE0, 0x40(STATEP)
381-
FRAME_END
382366
RET
383367

384368
.Lenc_out_4:
@@ -387,11 +371,9 @@ SYM_FUNC_START(aegis128_aesni_enc)
387371
movdqu STATE2, 0x20(STATEP)
388372
movdqu STATE3, 0x30(STATEP)
389373
movdqu STATE4, 0x40(STATEP)
390-
FRAME_END
391374
RET
392375

393376
.Lenc_out:
394-
FRAME_END
395377
RET
396378
SYM_FUNC_END(aegis128_aesni_enc)
397379

@@ -404,7 +386,6 @@ SYM_FUNC_START(aegis128_aesni_enc_tail)
404386
.set SRC, %rsi
405387
.set DST, %rdx
406388
.set LEN, %ecx /* {load,store}_partial rely on this being %ecx */
407-
FRAME_BEGIN
408389

409390
/* load the state: */
410391
movdqu 0x00(STATEP), STATE0
@@ -436,8 +417,6 @@ SYM_FUNC_START(aegis128_aesni_enc_tail)
436417
movdqu STATE1, 0x20(STATEP)
437418
movdqu STATE2, 0x30(STATEP)
438419
movdqu STATE3, 0x40(STATEP)
439-
440-
FRAME_END
441420
RET
442421
SYM_FUNC_END(aegis128_aesni_enc_tail)
443422

@@ -468,7 +447,6 @@ SYM_FUNC_START(aegis128_aesni_dec)
468447
.set SRC, %rsi
469448
.set DST, %rdx
470449
.set LEN, %ecx
471-
FRAME_BEGIN
472450

473451
/* load the state: */
474452
movdqu 0x00(STATEP), STATE0
@@ -496,7 +474,6 @@ SYM_FUNC_START(aegis128_aesni_dec)
496474
movdqu STATE1, 0x20(STATEP)
497475
movdqu STATE2, 0x30(STATEP)
498476
movdqu STATE3, 0x40(STATEP)
499-
FRAME_END
500477
RET
501478

502479
.Ldec_out_1:
@@ -505,7 +482,6 @@ SYM_FUNC_START(aegis128_aesni_dec)
505482
movdqu STATE0, 0x20(STATEP)
506483
movdqu STATE1, 0x30(STATEP)
507484
movdqu STATE2, 0x40(STATEP)
508-
FRAME_END
509485
RET
510486

511487
.Ldec_out_2:
@@ -514,7 +490,6 @@ SYM_FUNC_START(aegis128_aesni_dec)
514490
movdqu STATE4, 0x20(STATEP)
515491
movdqu STATE0, 0x30(STATEP)
516492
movdqu STATE1, 0x40(STATEP)
517-
FRAME_END
518493
RET
519494

520495
.Ldec_out_3:
@@ -523,7 +498,6 @@ SYM_FUNC_START(aegis128_aesni_dec)
523498
movdqu STATE3, 0x20(STATEP)
524499
movdqu STATE4, 0x30(STATEP)
525500
movdqu STATE0, 0x40(STATEP)
526-
FRAME_END
527501
RET
528502

529503
.Ldec_out_4:
@@ -532,11 +506,9 @@ SYM_FUNC_START(aegis128_aesni_dec)
532506
movdqu STATE2, 0x20(STATEP)
533507
movdqu STATE3, 0x30(STATEP)
534508
movdqu STATE4, 0x40(STATEP)
535-
FRAME_END
536509
RET
537510

538511
.Ldec_out:
539-
FRAME_END
540512
RET
541513
SYM_FUNC_END(aegis128_aesni_dec)
542514

@@ -549,7 +521,6 @@ SYM_FUNC_START(aegis128_aesni_dec_tail)
549521
.set SRC, %rsi
550522
.set DST, %rdx
551523
.set LEN, %ecx /* {load,store}_partial rely on this being %ecx */
552-
FRAME_BEGIN
553524

554525
/* load the state: */
555526
movdqu 0x00(STATEP), STATE0
@@ -586,8 +557,6 @@ SYM_FUNC_START(aegis128_aesni_dec_tail)
586557
movdqu STATE1, 0x20(STATEP)
587558
movdqu STATE2, 0x30(STATEP)
588559
movdqu STATE3, 0x40(STATEP)
589-
590-
FRAME_END
591560
RET
592561
SYM_FUNC_END(aegis128_aesni_dec_tail)
593562

@@ -601,7 +570,6 @@ SYM_FUNC_START(aegis128_aesni_final)
601570
.set TAG_XOR, %rsi
602571
.set ASSOCLEN, %edx
603572
.set CRYPTLEN, %ecx
604-
FRAME_BEGIN
605573

606574
/* load the state: */
607575
movdqu 0x00(STATEP), STATE0
@@ -636,7 +604,5 @@ SYM_FUNC_START(aegis128_aesni_final)
636604
pxor STATE4, MSG
637605

638606
movdqu MSG, (TAG_XOR)
639-
640-
FRAME_END
641607
RET
642608
SYM_FUNC_END(aegis128_aesni_final)

0 commit comments

Comments
 (0)