2014-06-11 15:14:44 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 Freie Universität Berlin
|
|
|
|
*
|
2014-07-31 19:45:27 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2014-06-11 15:14:44 +02:00
|
|
|
*/
|
2014-05-20 14:22:24 +02:00
|
|
|
|
2017-03-10 16:09:26 +01:00
|
|
|
/*
|
2013-08-15 10:17:15 +02:00
|
|
|
@-----------------------------------------------------------@
|
|
|
|
@ Fast Block Copy (declared in diskio.h)
|
|
|
|
@-----------------------------------------------------------@
|
2017-03-10 16:09:26 +01:00
|
|
|
*/
|
2013-08-15 10:17:15 +02:00
|
|
|
|
2016-03-23 18:31:03 +01:00
|
|
|
.global copy_un2al
|
2013-08-15 10:17:15 +02:00
|
|
|
.arm
|
2016-03-23 18:31:03 +01:00
|
|
|
copy_un2al:
|
2014-08-02 12:21:55 +02:00
|
|
|
STMFD SP!, {R4-R8}
|
|
|
|
ANDS IP, R1, #3
|
|
|
|
BEQ lb_align
|
2013-08-15 10:17:15 +02:00
|
|
|
|
2014-08-02 12:21:55 +02:00
|
|
|
BIC R1, #3
|
|
|
|
MOV IP, IP, LSL #3
|
|
|
|
RSB R8, IP, #32
|
|
|
|
LDMIA R1!, {R7}
|
|
|
|
lb_l1: MOV R3, R7
|
|
|
|
LDMIA R1!, {R4-R7}
|
|
|
|
MOV R3, R3, LSR IP
|
|
|
|
ORR R3, R3, R4, LSL R8
|
|
|
|
MOV R4, R4, LSR IP
|
|
|
|
ORR R4, R4, R5, LSL R8
|
|
|
|
MOV R5, R5, LSR IP
|
|
|
|
ORR R5, R5, R6, LSL R8
|
|
|
|
MOV R6, R6, LSR IP
|
|
|
|
ORR R6, R6, R7, LSL R8
|
|
|
|
SUBS R2, R2, #16
|
|
|
|
STMIA R0!, {R3-R6}
|
|
|
|
BNE lb_l1
|
|
|
|
LDMFD SP!, {R4-R8}
|
|
|
|
BX LR
|
2013-08-15 10:17:15 +02:00
|
|
|
|
|
|
|
lb_align:
|
2014-08-02 12:21:55 +02:00
|
|
|
LDMIA R1!, {R3-R6}
|
|
|
|
SUBS R2, R2, #16
|
|
|
|
STMIA R0!, {R3-R6}
|
|
|
|
BNE lb_align
|
|
|
|
LDMFD SP!, {R4-R8}
|
|
|
|
BX LR
|
2013-08-15 10:17:15 +02:00
|
|
|
|
|
|
|
|
2016-03-23 18:31:03 +01:00
|
|
|
.global copy_al2un
|
2013-08-15 10:17:15 +02:00
|
|
|
.arm
|
2016-03-23 18:31:03 +01:00
|
|
|
copy_al2un:
|
2014-08-02 12:21:55 +02:00
|
|
|
STMFD SP!, {R4-R8}
|
|
|
|
ANDS IP, R0, #3
|
|
|
|
BEQ sb_align
|
2013-08-15 10:17:15 +02:00
|
|
|
|
2014-08-02 12:21:55 +02:00
|
|
|
MOV IP, IP, LSL #3
|
|
|
|
RSB R8, IP, #32
|
2013-08-15 10:17:15 +02:00
|
|
|
|
2014-08-02 12:21:55 +02:00
|
|
|
LDMIA R1!, {R4-R7}
|
|
|
|
sb_p1: STRB R4, [R0], #1
|
|
|
|
MOV R4, R4, LSR #8
|
|
|
|
TST R0, #3
|
|
|
|
BNE sb_p1
|
|
|
|
ORR R4, R4, R5, LSL IP
|
|
|
|
MOV R5, R5, LSR R8
|
|
|
|
ORR R5, R5, R6, LSL IP
|
|
|
|
MOV R6, R6, LSR R8
|
|
|
|
ORR R6, R6, R7, LSL IP
|
|
|
|
SUBS R2, R2, #16
|
|
|
|
STMIA R0!, {R4-R6}
|
2013-08-15 10:17:15 +02:00
|
|
|
|
2014-08-02 12:21:55 +02:00
|
|
|
sb_l1: MOV R3, R7
|
|
|
|
LDMIA R1!, {R4-R7}
|
|
|
|
MOV R3, R3, LSR R8
|
|
|
|
ORR R3, R3, R4, LSL IP
|
|
|
|
MOV R4, R4, LSR R8
|
|
|
|
ORR R4, R4, R5, LSL IP
|
|
|
|
MOV R5, R5, LSR R8
|
|
|
|
ORR R5, R5, R6, LSL IP
|
|
|
|
MOV R6, R6, LSR R8
|
|
|
|
ORR R6, R6, R7, LSL IP
|
|
|
|
SUBS R2, R2, #16
|
|
|
|
STMIA R0!, {R3-R6}
|
|
|
|
BNE sb_l1
|
2013-08-15 10:17:15 +02:00
|
|
|
|
2014-08-02 12:21:55 +02:00
|
|
|
MOV R7, R7, LSR R8
|
|
|
|
sb_p2: SUBS IP, IP, #8
|
|
|
|
STRB R7, [R0], #1
|
|
|
|
MOV R7, R7, LSR #8
|
|
|
|
BNE sb_p2
|
2013-08-15 10:17:15 +02:00
|
|
|
|
2014-08-02 12:21:55 +02:00
|
|
|
LDMFD SP!, {R4-R8}
|
|
|
|
BX LR
|
2013-08-15 10:17:15 +02:00
|
|
|
|
|
|
|
sb_align:
|
2014-08-02 12:21:55 +02:00
|
|
|
LDMIA R1!, {R3-R6}
|
|
|
|
SUBS R2, #16
|
|
|
|
STMIA R0!, {R3-R6}
|
|
|
|
BNE sb_align
|
|
|
|
LDMFD SP!, {R4-R8}
|
|
|
|
BX LR
|
2013-08-15 10:17:15 +02:00
|
|
|
|
|
|
|
.end
|