arm-linux nrv2b works: conditon code bug, cache flush, cache lookahead
This commit is contained in:
+1119
-1117
File diff suppressed because it is too large
Load Diff
@@ -69,6 +69,20 @@ eof_n2b:
|
|||||||
SUB2(src,r1) // 0 if actual src length equals expected length
|
SUB2(src,r1) // 0 if actual src length equals expected length
|
||||||
SUB2(dst,r3) // actual dst length
|
SUB2(dst,r3) // actual dst length
|
||||||
str dst,[r4]
|
str dst,[r4]
|
||||||
|
|
||||||
|
#if defined(LINUX_ARM_CACHEFLUSH) /*{*/
|
||||||
|
/* linux/include/asm-arm/unistd.h */
|
||||||
|
#define __NR_SYSCALL_BASE 0x900000
|
||||||
|
#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000)
|
||||||
|
#define __ARM_NR_cacheflush (__ARM_NR_BASE+2)
|
||||||
|
mov r4,r0 // save result value
|
||||||
|
mov r0,r3 // orig_dst
|
||||||
|
add r1,r3,dst // orig_dst + dst_len
|
||||||
|
mov r2,#0
|
||||||
|
swi __ARM_NR_cacheflush // decompressed region
|
||||||
|
mov r0,r4 // result value
|
||||||
|
#endif /*}*/
|
||||||
|
|
||||||
POP {r4,r5, pc} // return
|
POP {r4,r5, pc} // return
|
||||||
|
|
||||||
get8_n2b: // In: Carry set [from adding 0x80000000 (1<<31) to itself]
|
get8_n2b: // In: Carry set [from adding 0x80000000 (1<<31) to itself]
|
||||||
@@ -88,7 +102,7 @@ getoff_n2b: // ss11 len= [2..)
|
|||||||
getnextb(len)
|
getnextb(len)
|
||||||
jnextb0 getoff_n2b
|
jnextb0 getoff_n2b
|
||||||
|
|
||||||
sub tmp,len,#3 // set Carry
|
subs tmp,len,#3 // set Carry
|
||||||
mov len,#0 // Carry unaffected
|
mov len,#0 // Carry unaffected
|
||||||
blo offprev_n2b // ss11 returned 2
|
blo offprev_n2b // ss11 returned 2
|
||||||
LDRB3(off,[src],#1) // low 8 bits
|
LDRB3(off,[src],#1) // low 8 bits
|
||||||
@@ -107,7 +121,10 @@ plus1_n2b:
|
|||||||
/* 'cmn': add the inputs, set condition codes, discard the sum */
|
/* 'cmn': add the inputs, set condition codes, discard the sum */
|
||||||
cmn off,#0xd<<8 // within M2_MAX_OFFSET
|
cmn off,#0xd<<8 // within M2_MAX_OFFSET
|
||||||
addcc len,len,#1 // too far away, so minimum match length is 3
|
addcc len,len,#1 // too far away, so minimum match length is 3
|
||||||
ldrb tmp,[dst] // force cacheline allocate
|
|
||||||
|
add tmp,dst,len
|
||||||
|
ldrb tmp,[tmp,#-1] // force cacheline allocate
|
||||||
|
|
||||||
copy_n2b:
|
copy_n2b:
|
||||||
ldrb tmp,[dst,off]
|
ldrb tmp,[dst,off]
|
||||||
STRB3(tmp,[dst],#1)
|
STRB3(tmp,[dst],#1)
|
||||||
|
|||||||
@@ -179,7 +179,8 @@ near_n2e:
|
|||||||
add tmp,dst,cnt
|
add tmp,dst,cnt
|
||||||
cmp tmp,dstlim; bhi bad_dst_n2e // too much output
|
cmp tmp,dstlim; bhi bad_dst_n2e // too much output
|
||||||
#endif /*}*/
|
#endif /*}*/
|
||||||
ldrb tmp,[dst] // force cacheline allocate
|
add tmp,dst,len
|
||||||
|
ldrb tmp,[tmp,#-1] // force cacheline allocate
|
||||||
copy_n2e:
|
copy_n2e:
|
||||||
ldrb tmp,[dst,off]
|
ldrb tmp,[dst,off]
|
||||||
CHECK_BYTE
|
CHECK_BYTE
|
||||||
|
|||||||
Reference in New Issue
Block a user