Commit e24a1f24 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

[ARM PATCH] 2203/1: trivial asm optimization for csum code

Patch from Nicolas Pitre

Signed-off-by: Nicolas Pitre 
Signed-off-by: Russell King
parent 0e662fc2
...@@ -73,8 +73,7 @@ td3 .req lr ...@@ -73,8 +73,7 @@ td3 .req lr
.done: adc r0, sum, #0 @ collect up the last carry .done: adc r0, sum, #0 @ collect up the last carry
ldr td0, [sp], #4 ldr td0, [sp], #4
tst td0, #1 @ check buffer alignment tst td0, #1 @ check buffer alignment
movne td0, r0, lsl #8 @ rotate checksum by 8 bits movne r0, r0, ror #8 @ rotate checksum by 8 bits
orrne r0, td0, r0, lsr #24
ldr pc, [sp], #4 @ return ldr pc, [sp], #4 @ return
.not_aligned: tst buf, #1 @ odd address .not_aligned: tst buf, #1 @ odd address
......
...@@ -160,8 +160,7 @@ FN_ENTRY ...@@ -160,8 +160,7 @@ FN_ENTRY
.done: adc r0, sum, #0 .done: adc r0, sum, #0
ldr sum, [sp, #0] @ dst ldr sum, [sp, #0] @ dst
tst sum, #1 tst sum, #1
movne sum, r0, lsl #8 movne r0, r0, ror #8
orrne r0, sum, r0, lsr #24
load_regs ea load_regs ea
.src_not_aligned: .src_not_aligned:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment