rind 0.1.2

Pure-Rust cryptography for MoQ, forked from graviola
Documentation
@ Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
@ SPDX-License-Identifier: Apache-2.0
@
@ Generated by admin/import-aws-lc from aws-lc 91c93a8eb860e51482a871a8772cb9b1b310baea:
@ generated-src/linux-arm/crypto/fipsmodule/sha256-armv4.S, which aws-lc generates from crypto/fipsmodule/sha/asm/sha256-armv4.pl.
@ Do not edit by hand.
.align	5
K256:
.word	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
.word	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
.word	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
.word	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
.word	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
.word	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
.word	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
.word	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
.word	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
.word	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
.word	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
.word	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
.word	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
.word	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
.word	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
.word	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
.Lsha256_K256_shortcut_hw:
@ PC is 8 bytes ahead in Arm mode and 4 bytes ahead in Thumb mode.
.word	K256-(.Lsha256_K256_add_hw+8)
.globl	{sha256_block_data_order_hw}
.hidden	{sha256_block_data_order_hw}
.type	{sha256_block_data_order_hw},%function
.align	5
{sha256_block_data_order_hw}:
	@ K256 is too far to reference from one ADR command in Thumb mode. In
	@ Arm mode, we could make it fit by aligning the ADR offset to a 64-byte
	@ boundary. For simplicity, just load the offset from .Lsha256_K256_shortcut_hw.
	ldr	r3,.Lsha256_K256_shortcut_hw
.Lsha256_K256_add_hw:
	add	r3,pc,r3

	vld1.32	{{q0,q1}},[r0]
	add	r2,r1,r2,lsl#6	@ len to point at the end of inp
	b	.Lsha256_oop_v8

.align	4
.Lsha256_oop_v8:
	vld1.8	{{q8,q9}},[r1]!
	vld1.8	{{q10,q11}},[r1]!
	vld1.32	{{q12}},[r3]!
	vrev32.8	q8,q8
	vrev32.8	q9,q9
	vrev32.8	q10,q10
	vrev32.8	q11,q11
	vmov	q14,q0	@ offload
	vmov	q15,q1
	teq	r1,r2
	vld1.32	{{q13}},[r3]!
	vadd.i32	q12,q12,q8
	.byte	0xe2,0x03,0xfa,0xf3	@ sha256su0 q8,q9
	vmov	q2,q0
	.byte	0x68,0x0c,0x02,0xf3	@ sha256h q0,q1,q12
	.byte	0x68,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q12
	.byte	0xe6,0x0c,0x64,0xf3	@ sha256su1 q8,q10,q11
	vld1.32	{{q12}},[r3]!
	vadd.i32	q13,q13,q9
	.byte	0xe4,0x23,0xfa,0xf3	@ sha256su0 q9,q10
	vmov	q2,q0
	.byte	0x6a,0x0c,0x02,0xf3	@ sha256h q0,q1,q13
	.byte	0x6a,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q13
	.byte	0xe0,0x2c,0x66,0xf3	@ sha256su1 q9,q11,q8
	vld1.32	{{q13}},[r3]!
	vadd.i32	q12,q12,q10
	.byte	0xe6,0x43,0xfa,0xf3	@ sha256su0 q10,q11
	vmov	q2,q0
	.byte	0x68,0x0c,0x02,0xf3	@ sha256h q0,q1,q12
	.byte	0x68,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q12
	.byte	0xe2,0x4c,0x60,0xf3	@ sha256su1 q10,q8,q9
	vld1.32	{{q12}},[r3]!
	vadd.i32	q13,q13,q11
	.byte	0xe0,0x63,0xfa,0xf3	@ sha256su0 q11,q8
	vmov	q2,q0
	.byte	0x6a,0x0c,0x02,0xf3	@ sha256h q0,q1,q13
	.byte	0x6a,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q13
	.byte	0xe4,0x6c,0x62,0xf3	@ sha256su1 q11,q9,q10
	vld1.32	{{q13}},[r3]!
	vadd.i32	q12,q12,q8
	.byte	0xe2,0x03,0xfa,0xf3	@ sha256su0 q8,q9
	vmov	q2,q0
	.byte	0x68,0x0c,0x02,0xf3	@ sha256h q0,q1,q12
	.byte	0x68,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q12
	.byte	0xe6,0x0c,0x64,0xf3	@ sha256su1 q8,q10,q11
	vld1.32	{{q12}},[r3]!
	vadd.i32	q13,q13,q9
	.byte	0xe4,0x23,0xfa,0xf3	@ sha256su0 q9,q10
	vmov	q2,q0
	.byte	0x6a,0x0c,0x02,0xf3	@ sha256h q0,q1,q13
	.byte	0x6a,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q13
	.byte	0xe0,0x2c,0x66,0xf3	@ sha256su1 q9,q11,q8
	vld1.32	{{q13}},[r3]!
	vadd.i32	q12,q12,q10
	.byte	0xe6,0x43,0xfa,0xf3	@ sha256su0 q10,q11
	vmov	q2,q0
	.byte	0x68,0x0c,0x02,0xf3	@ sha256h q0,q1,q12
	.byte	0x68,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q12
	.byte	0xe2,0x4c,0x60,0xf3	@ sha256su1 q10,q8,q9
	vld1.32	{{q12}},[r3]!
	vadd.i32	q13,q13,q11
	.byte	0xe0,0x63,0xfa,0xf3	@ sha256su0 q11,q8
	vmov	q2,q0
	.byte	0x6a,0x0c,0x02,0xf3	@ sha256h q0,q1,q13
	.byte	0x6a,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q13
	.byte	0xe4,0x6c,0x62,0xf3	@ sha256su1 q11,q9,q10
	vld1.32	{{q13}},[r3]!
	vadd.i32	q12,q12,q8
	.byte	0xe2,0x03,0xfa,0xf3	@ sha256su0 q8,q9
	vmov	q2,q0
	.byte	0x68,0x0c,0x02,0xf3	@ sha256h q0,q1,q12
	.byte	0x68,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q12
	.byte	0xe6,0x0c,0x64,0xf3	@ sha256su1 q8,q10,q11
	vld1.32	{{q12}},[r3]!
	vadd.i32	q13,q13,q9
	.byte	0xe4,0x23,0xfa,0xf3	@ sha256su0 q9,q10
	vmov	q2,q0
	.byte	0x6a,0x0c,0x02,0xf3	@ sha256h q0,q1,q13
	.byte	0x6a,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q13
	.byte	0xe0,0x2c,0x66,0xf3	@ sha256su1 q9,q11,q8
	vld1.32	{{q13}},[r3]!
	vadd.i32	q12,q12,q10
	.byte	0xe6,0x43,0xfa,0xf3	@ sha256su0 q10,q11
	vmov	q2,q0
	.byte	0x68,0x0c,0x02,0xf3	@ sha256h q0,q1,q12
	.byte	0x68,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q12
	.byte	0xe2,0x4c,0x60,0xf3	@ sha256su1 q10,q8,q9
	vld1.32	{{q12}},[r3]!
	vadd.i32	q13,q13,q11
	.byte	0xe0,0x63,0xfa,0xf3	@ sha256su0 q11,q8
	vmov	q2,q0
	.byte	0x6a,0x0c,0x02,0xf3	@ sha256h q0,q1,q13
	.byte	0x6a,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q13
	.byte	0xe4,0x6c,0x62,0xf3	@ sha256su1 q11,q9,q10
	vld1.32	{{q13}},[r3]!
	vadd.i32	q12,q12,q8
	vmov	q2,q0
	.byte	0x68,0x0c,0x02,0xf3	@ sha256h q0,q1,q12
	.byte	0x68,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q12

	vld1.32	{{q12}},[r3]!
	vadd.i32	q13,q13,q9
	vmov	q2,q0
	.byte	0x6a,0x0c,0x02,0xf3	@ sha256h q0,q1,q13
	.byte	0x6a,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q13

	vld1.32	{{q13}},[r3]
	vadd.i32	q12,q12,q10
	sub	r3,r3,#256-16	@ rewind
	vmov	q2,q0
	.byte	0x68,0x0c,0x02,0xf3	@ sha256h q0,q1,q12
	.byte	0x68,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q12

	vadd.i32	q13,q13,q11
	vmov	q2,q0
	.byte	0x6a,0x0c,0x02,0xf3	@ sha256h q0,q1,q13
	.byte	0x6a,0x2c,0x14,0xf3	@ sha256h2 q1,q2,q13

	vadd.i32	q0,q0,q14
	vadd.i32	q1,q1,q15
	it	ne
	bne	.Lsha256_oop_v8

	vst1.32	{{q0,q1}},[r0]

	bx	lr		@ bx lr
.size	{sha256_block_data_order_hw},.-{sha256_block_data_order_hw}