mirror of
https://git.code.sf.net/p/openocd/code
synced 2024-11-22 09:36:27 +00:00
a126229dff
Replace the GPLv2-or-later boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I380d552940f1c405309a3346454251c0e80b5a45 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7159 Tested-by: jenkins
46 lines
813 B
ArmAsm
46 lines
813 B
ArmAsm
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/***************************************************************************
|
|
* Copyright (C) 2010 by Spencer Oliver *
|
|
* spen@spen-soft.co.uk *
|
|
***************************************************************************/
|
|
|
|
/*
|
|
r0 - address in - crc out
|
|
r1 - char count
|
|
*/
|
|
|
|
.text
|
|
.arm
|
|
|
|
_start:
|
|
main:
|
|
mov r2, r0
|
|
mov r0, #0xffffffff /* crc */
|
|
mov r3, r1
|
|
mov r4, #0
|
|
b ncomp
|
|
nbyte:
|
|
ldrb r1, [r2, r4]
|
|
ldr r7, CRC32XOR
|
|
eor r0, r0, r1, asl #24
|
|
mov r5, #0
|
|
loop:
|
|
cmp r0, #0
|
|
mov r6, r0, asl #1
|
|
add r5, r5, #1
|
|
mov r0, r6
|
|
eorlt r0, r6, r7
|
|
cmp r5, #8
|
|
bne loop
|
|
add r4, r4, #1
|
|
ncomp:
|
|
cmp r4, r3
|
|
bne nbyte
|
|
end:
|
|
bkpt #0
|
|
|
|
CRC32XOR: .word 0x04c11db7
|
|
|
|
.end
|