Micro-optimize spitfire_block_{copy,zero}():
- Predict the loop as taken as it's more likely that there's still data to copy and memory to zero respectively. - Don't waste the delay slot.
This commit is contained in:
parent
77a5f1bddf
commit
31a0d89119
@ -647,7 +647,7 @@ ENTRY(spitfire_block_copy)
|
||||
stda %f32, [%o1] %asi
|
||||
add %o0, 64, %o0
|
||||
sub %o2, 64, %o2
|
||||
ba %xcc, 2b
|
||||
ba,pt %xcc, 2b
|
||||
add %o1, 64, %o1
|
||||
|
||||
3: membar #Sync
|
||||
@ -655,10 +655,8 @@ ENTRY(spitfire_block_copy)
|
||||
stda %f16, [%o1] %asi
|
||||
membar #Sync
|
||||
|
||||
wr %g0, 0, %fprs
|
||||
|
||||
retl
|
||||
nop
|
||||
wr %g0, 0, %fprs
|
||||
END(spitfire_block_copy)
|
||||
|
||||
/*
|
||||
@ -704,14 +702,12 @@ ENTRY(spitfire_block_zero)
|
||||
stda %f0, [%o0 + 128] %asi
|
||||
stda %f0, [%o0 + 192] %asi
|
||||
sub %o1, 256, %o1
|
||||
brnz %o1, 1b
|
||||
brnz,pt %o1, 1b
|
||||
add %o0, 256, %o0
|
||||
membar #Sync
|
||||
|
||||
wr %g0, 0, %fprs
|
||||
|
||||
retl
|
||||
nop
|
||||
wr %g0, 0, %fprs
|
||||
END(spitfire_block_zero)
|
||||
|
||||
.globl fpu_fault_end
|
||||
@ -806,7 +802,6 @@ ENTRY(bintr)
|
||||
ENTRY(eintr)
|
||||
nop
|
||||
|
||||
|
||||
/*
|
||||
* XXX including sys/gmon.h in genassym.c is not possible due to uintfptr_t
|
||||
* badness.
|
||||
|
Loading…
x
Reference in New Issue
Block a user