* [PATCH roland/arm-strlen] Use sfi_* macros in armv6t2 strlen.
@ 2013-08-30 18:29 Roland McGrath
2013-08-30 20:37 ` Joseph S. Myers
0 siblings, 1 reply; 2+ messages in thread
From: Roland McGrath @ 2013-08-30 18:29 UTC (permalink / raw)
To: libc-ports
This assumes the earlier patch for NO_THUMB support. I've verified that
this has no effect on the assembled code for arm-linux-gnueabihf, and
I've verified that the code actually works (just a trivial test, not
the suite) on arm-nacl.
OK for trunk?
Thanks,
Roland
ports/ChangeLog.arm
* sysdeps/arm/armv6t2/strlen.S: Use sfi_pld and sfi_breg macros.
--- a/ports/sysdeps/arm/armv6t2/strlen.S
+++ b/ports/sysdeps/arm/armv6t2/strlen.S
@@ -67,7 +67,7 @@
.text
.p2align 6
ENTRY(strlen)
- pld [srcin, #0]
+ sfi_pld srcin, #0
strd r4, r5, [sp, #-8]!
cfi_adjust_cfa_offset (8)
cfi_rel_offset (r4, 0)
@@ -76,14 +76,15 @@ ENTRY(strlen)
bic src, srcin, #7
mvn const_m1, #0
ands tmp1, srcin, #7 /* (8 - bytes) to alignment. */
- pld [src, #32]
+ sfi_pld src, #32
bne.w .Lmisaligned8
mov const_0, #0
mov result, #-8
.Lloop_aligned:
/* Bytes 0-7. */
- ldrd data1a, data1b, [src]
- pld [src, #64]
+ sfi_breg src, \
+ ldrd data1a, data1b, [\B]
+ sfi_pld src, #64
add result, result, #8
.Lstart_realigned:
uadd8 data1a, data1a, const_m1 /* Saturating GE<0:3> set. */
@@ -93,7 +94,8 @@ ENTRY(strlen)
cbnz data1b, .Lnull_found
/* Bytes 8-15. */
- ldrd data1a, data1b, [src, #8]
+ sfi_breg src, \
+ ldrd data1a, data1b, [\B, #8]
uadd8 data1a, data1a, const_m1 /* Saturating GE<0:3> set. */
add result, result, #8
sel data1a, const_0, const_m1 /* Select based on GE<0:3>. */
@@ -102,7 +104,8 @@ ENTRY(strlen)
cbnz data1b, .Lnull_found
/* Bytes 16-23. */
- ldrd data1a, data1b, [src, #16]
+ sfi_breg src, \
+ ldrd data1a, data1b, [\B, #16]
uadd8 data1a, data1a, const_m1 /* Saturating GE<0:3> set. */
add result, result, #8
sel data1a, const_0, const_m1 /* Select based on GE<0:3>. */
@@ -111,7 +114,8 @@ ENTRY(strlen)
cbnz data1b, .Lnull_found
/* Bytes 24-31. */
- ldrd data1a, data1b, [src, #24]
+ sfi_breg src, \
+ ldrd data1a, data1b, [\B, #24]
add src, src, #32
uadd8 data1a, data1a, const_m1 /* Saturating GE<0:3> set. */
add result, result, #8
@@ -139,12 +143,13 @@ ENTRY(strlen)
.Lmisaligned8:
cfi_restore_state
- ldrd data1a, data1b, [src]
+ sfi_breg src, \
+ ldrd data1a, data1b, [\B]
and tmp2, tmp1, #3
rsb result, tmp1, #0
lsl tmp2, tmp2, #3 /* Bytes -> bits. */
tst tmp1, #4
- pld [src, #64]
+ sfi_pld src, #64
S2HI tmp2, const_m1, tmp2
#ifdef NO_THUMB
mvn tmp1, tmp2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH roland/arm-strlen] Use sfi_* macros in armv6t2 strlen.
2013-08-30 18:29 [PATCH roland/arm-strlen] Use sfi_* macros in armv6t2 strlen Roland McGrath
@ 2013-08-30 20:37 ` Joseph S. Myers
0 siblings, 0 replies; 2+ messages in thread
From: Joseph S. Myers @ 2013-08-30 20:37 UTC (permalink / raw)
To: Roland McGrath; +Cc: libc-ports
On Fri, 30 Aug 2013, Roland McGrath wrote:
> This assumes the earlier patch for NO_THUMB support. I've verified that
> this has no effect on the assembled code for arm-linux-gnueabihf, and
> I've verified that the code actually works (just a trivial test, not
> the suite) on arm-nacl.
>
> OK for trunk?
OK.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-30 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-30 18:29 [PATCH roland/arm-strlen] Use sfi_* macros in armv6t2 strlen Roland McGrath
2013-08-30 20:37 ` Joseph S. Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).