summaryrefslogtreecommitdiff
path: root/libc/string/ia64/strcpy.S
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-10-03 13:59:52 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-10-03 13:59:52 +0000
commit2ba017a2d5af01cc3ef0dc554252a521e8d7c4f8 (patch)
tree0e0db7e3fbb4fbe1be3c56ad6c80bb7d63effb93 /libc/string/ia64/strcpy.S
parent94bbeb72728193288f2bf071cf0e40293499045b (diff)
- use c89-style comments
Closes issue #5194
Diffstat (limited to 'libc/string/ia64/strcpy.S')
-rw-r--r--libc/string/ia64/strcpy.S66
1 files changed, 33 insertions, 33 deletions
diff --git a/libc/string/ia64/strcpy.S b/libc/string/ia64/strcpy.S
index e4a9915ca..7b002f661 100644
--- a/libc/string/ia64/strcpy.S
+++ b/libc/string/ia64/strcpy.S
@@ -27,8 +27,8 @@
In this form, it assumes little endian mode. For big endian mode, the
the two shifts in .l2 must be inverted:
- shl value = r[1], sh1 // value = w0 << sh1
- shr.u tmp = r[0], sh2 // tmp = w1 >> sh2
+ shl value = r[1], sh1 // value = w0 << sh1
+ shr.u tmp = r[0], sh2 // tmp = w1 >> sh2
*/
#include "sysdep.h"
@@ -53,62 +53,62 @@
ENTRY(strcpy)
.prologue
- alloc r2 = ar.pfs, 2, 0, 30, 32
+ alloc r2 = ar.pfs, 2, 0, 30, 32
#define MEMLAT 2
.rotr r[MEMLAT + 2]
.rotp p[MEMLAT + 1]
- mov ret0 = in0 // return value = dest
+ mov ret0 = in0 /* return value = dest */
.save pr, saved_pr
- mov saved_pr = pr // save the predicate registers
+ mov saved_pr = pr /* save the predicate registers */
.save ar.lc, saved_lc
- mov saved_lc = ar.lc // save the loop counter
+ mov saved_lc = ar.lc /* save the loop counter */
.body
- sub tmp = r0, in0 ;; // tmp = -dest
- mov dest = in0 // dest
- mov src = in1 // src
- and loopcnt = 7, tmp ;; // loopcnt = -dest % 8
+ sub tmp = r0, in0 ;; /* tmp = -dest */
+ mov dest = in0 /* dest */
+ mov src = in1 /* src */
+ and loopcnt = 7, tmp ;; /* loopcnt = -dest % 8 */
cmp.eq p6, p0 = loopcnt, r0
- adds loopcnt = -1, loopcnt // --loopcnt
+ adds loopcnt = -1, loopcnt /* --loopcnt */
(p6) br.cond.sptk .dest_aligned ;;
mov ar.lc = loopcnt
-.l1: // copy -dest % 8 bytes
- ld1 c = [src], 1 // c = *src++
+.l1: /* copy -dest % 8 bytes */
+ ld1 c = [src], 1 /* c = *src++ */
;;
- st1 [dest] = c, 1 // *dest++ = c
+ st1 [dest] = c, 1 /* *dest++ = c */
cmp.eq p6, p0 = c, r0
(p6) br.cond.dpnt .restore_and_exit
br.cloop.dptk .l1 ;;
.dest_aligned:
- and sh1 = 7, src // sh1 = src % 8
- mov ar.lc = -1 // "infinite" loop
- and asrc = -8, src ;; // asrc = src & -OPSIZ -- align src
+ and sh1 = 7, src /* sh1 = src % 8 */
+ mov ar.lc = -1 /* "infinite" loop */
+ and asrc = -8, src ;; /* asrc = src & -OPSIZ -- align src */
sub thresh = 8, sh1
- mov pr.rot = 1 << 16 // set rotating predicates
- cmp.ne p7, p0 = r0, r0 // clear p7
- shl sh1 = sh1, 3 ;; // sh1 = 8 * (src % 8)
- sub sh2 = 64, sh1 // sh2 = 64 - sh1
- cmp.eq p6, p0 = sh1, r0 // is the src aligned?
+ mov pr.rot = 1 << 16 /* set rotating predicates */
+ cmp.ne p7, p0 = r0, r0 /* clear p7 */
+ shl sh1 = sh1, 3 ;; /* sh1 = 8 * (src % 8) */
+ sub sh2 = 64, sh1 /* sh2 = 64 - sh1 */
+ cmp.eq p6, p0 = sh1, r0 /* is the src aligned? */
(p6) br.cond.sptk .src_aligned ;;
ld8 r[1] = [asrc],8 ;;
.align 32
.l2:
ld8.s r[0] = [asrc], 8
- shr.u value = r[1], sh1 ;; // value = w0 >> sh1
- czx1.r pos = value ;; // do we have an "early" zero
- cmp.lt p7, p0 = pos, thresh // in w0 >> sh1?
+ shr.u value = r[1], sh1 ;; /* value = w0 >> sh1 */
+ czx1.r pos = value ;; /* do we have an "early" zero */
+ cmp.lt p7, p0 = pos, thresh /* in w0 >> sh1? */
(p7) br.cond.dpnt .found0
- chk.s r[0], .recovery2 // it is safe to do that only
-.back2: // after the previous test
- shl tmp = r[0], sh2 // tmp = w1 << sh2
+ chk.s r[0], .recovery2 /* it is safe to do that only */
+.back2: /* after the previous test */
+ shl tmp = r[0], sh2 /* tmp = w1 << sh2 */
;;
- or value = value, tmp ;; // value |= tmp
+ or value = value, tmp ;; /* value |= tmp */
czx1.r pos = value ;;
cmp.ne p7, p0 = 8, pos
(p7) br.cond.dpnt .found0
- st8 [dest] = value, 8 // store val to dest
+ st8 [dest] = value, 8 /* store val to dest */
br.ctop.dptk .l2 ;;
.src_aligned:
.l3:
@@ -124,14 +124,14 @@ ENTRY(strcpy)
.found0:
mov ar.lc = pos
.l4:
- extr.u c = value, 0, 8 // c = value & 0xff
+ extr.u c = value, 0, 8 /* c = value & 0xff */
shr.u value = value, 8
;;
st1 [dest] = c, 1
br.cloop.dptk .l4 ;;
.restore_and_exit:
- mov ar.lc = saved_lc // restore the loop counter
- mov pr = saved_pr, -1 // restore the predicate registers
+ mov ar.lc = saved_lc /* restore the loop counter */
+ mov pr = saved_pr, -1 /* restore the predicate registers */
br.ret.sptk.many b0
.recovery2:
add tmp = -8, asrc ;;