summaryrefslogtreecommitdiff
path: root/libc/string/sh64
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/sh64')
-rw-r--r--libc/string/sh64/memcpy.S2
-rw-r--r--libc/string/sh64/memset.S29
-rw-r--r--libc/string/sh64/strcpy.S28
3 files changed, 30 insertions, 29 deletions
diff --git a/libc/string/sh64/memcpy.S b/libc/string/sh64/memcpy.S
index 3c0ea0c0d..470784ecd 100644
--- a/libc/string/sh64/memcpy.S
+++ b/libc/string/sh64/memcpy.S
@@ -151,7 +151,7 @@ Large:
add r2, r4, r5
ldlo.q r3, 0, r0
addi r5, -16, r5
- movi 64+8, r27 // could subtract r7 from that.
+ movi 64+8, r27 /* could subtract r7 from that. */
stlo.q r2, 0, r0
sthi.q r2, 7, r0
ldx.q r22, r6, r0
diff --git a/libc/string/sh64/memset.S b/libc/string/sh64/memset.S
index f588323f0..1b8812cd6 100644
--- a/libc/string/sh64/memset.S
+++ b/libc/string/sh64/memset.S
@@ -32,12 +32,12 @@ memset:
ptabs r18, tr2
mshflo.b r3,r3,r3
add r4, r22, r23
- mperm.w r3, r63, r3 // Fill pattern now in every byte of r3
+ mperm.w r3, r63, r3 /* Fill pattern now in every byte of r3 */
movi 8, r9
- bgtu/u r23, r9, tr0 // multiquad
+ bgtu/u r23, r9, tr0 /* multiquad */
- beqi/u r4, 0, tr2 // Return with size 0 - ensures no mem accesses
+ beqi/u r4, 0, tr2 /* Return with size 0 - ensures no mem accesses */
ldlo.q r2, 0, r7
shlli r4, 2, r4
movi -1, r8
@@ -52,20 +52,21 @@ multiquad:
stlo.q r2, 0, r3
shlri r23, 3, r24
add r2, r4, r5
- beqi/u r24, 1, tr0 // lastquad
+ beqi/u r24, 1, tr0 /* lastquad */
pta/l loop, tr1
sub r2, r22, r25
- andi r5, -8, r20 // calculate end address and
- addi r20, -7*8, r8 // loop end address; This might overflow, so we need
- // to use a different test before we start the loop
- bge/u r24, r9, tr1 // loop
+ andi r5, -8, r20 /* calculate end address and */
+ addi r20, -7*8, r8 /* loop end address; This might overflow, so we need
+ to use a different test before we start the loop
+ */
+ bge/u r24, r9, tr1 /* loop */
st.q r25, 8, r3
st.q r20, -8, r3
shlri r24, 1, r24
- beqi/u r24, 1, tr0 // lastquad
+ beqi/u r24, 1, tr0 /* lastquad */
st.q r25, 16, r3
st.q r20, -16, r3
- beqi/u r24, 2, tr0 // lastquad
+ beqi/u r24, 2, tr0 /* lastquad */
st.q r25, 24, r3
st.q r20, -24, r3
lastquad:
@@ -73,15 +74,15 @@ lastquad:
blink tr2,r63
loop:
-!!! alloco r25, 32 // QQQ comment out for short-term fix to SHUK #3895.
- // QQQ commenting out is locically correct, but sub-optimal
- // QQQ Sean McGoogan - 4th April 2003.
+!!! alloco r25, 32 /* QQQ comment out for short-term fix to SHUK #3895.
+ QQQ commenting out is locically correct, but sub-optimal
+ QQQ Sean McGoogan - 4th April 2003. */
st.q r25, 8, r3
st.q r25, 16, r3
st.q r25, 24, r3
st.q r25, 32, r3
addi r25, 32, r25
- bgeu/l r8, r25, tr1 // loop
+ bgeu/l r8, r25, tr1 /* loop */
st.q r20, -40, r3
st.q r20, -32, r3
diff --git a/libc/string/sh64/strcpy.S b/libc/string/sh64/strcpy.S
index da79d5143..f317707b7 100644
--- a/libc/string/sh64/strcpy.S
+++ b/libc/string/sh64/strcpy.S
@@ -31,7 +31,7 @@ strcpy:
addi r2, 8, r0
mcmpeq.b r4,r63,r6
SHHI r6,r7,r6
- bnei/u r6,0,tr1 // shortstring
+ bnei/u r6,0,tr1 /* shortstring */
pta/l no_lddst, tr2
ori r3,-8,r23
sub r2, r23, r0
@@ -41,28 +41,28 @@ strcpy:
pta/l loop, tr0
ori r2,-8,r22
mcmpeq.b r5, r63, r6
- bgt/u r22, r23, tr2 // no_lddst
+ bgt/u r22, r23, tr2 /* no_lddst */
- // r22 < r23 : Need to do a load from the destination.
- // r22 == r23 : Doesn't actually need to load from destination,
- // but still can be handled here.
+ /* r22 < r23 : Need to do a load from the destination. */
+ /* r22 == r23 : Doesn't actually need to load from destination, */
+ /* but still can be handled here. */
ldlo.q r2, 0, r9
movi -1, r8
SHLO r8, r7, r8
mcmv r4, r8, r9
stlo.q r2, 0, r9
- beqi/l r6, 0, tr0 // loop
+ beqi/l r6, 0, tr0 /* loop */
add r5, r63, r4
addi r0, 8, r0
- blink tr1, r63 // shortstring
+ blink tr1, r63 /* shortstring */
no_lddst:
- // r22 > r23: note that for r22 == r23 the sthi.q would clobber
- // bytes before the destination region.
+ /* r22 > r23: note that for r22 == r23 the sthi.q would clobber */
+ /* bytes before the destination region. */
stlo.q r2, 0, r4
SHHI r4, r7, r4
sthi.q r0, -1, r4
- beqi/l r6, 0, tr0 // loop
+ beqi/l r6, 0, tr0 /* loop */
add r5, r63, r4
addi r0, 8, r0
@@ -77,7 +77,7 @@ shortstring2:
shlri r4,8,r4
addi r0,1,r0
bnei/l r5,0,tr1
- blink tr4,r63 // return
+ blink tr4,r63 /* return */
.balign 8
loop:
@@ -86,16 +86,16 @@ loop:
addi r0, 16, r0
sthi.q r0, -9, r5
mcmpeq.b r4, r63, r6
- bnei/u r6, 0, tr1 // shortstring
+ bnei/u r6, 0, tr1 /* shortstring */
ldx.q r0, r21, r5
stlo.q r0, -8, r4
sthi.q r0, -1, r4
mcmpeq.b r5, r63, r6
- beqi/l r6, 0, tr0 // loop
+ beqi/l r6, 0, tr0 /* loop */
add r5, r63, r4
addi r0, 8, r0
- blink tr1, r63 // shortstring
+ blink tr1, r63 /* shortstring */
.size strcpy,.-strcpy