From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Florian Weimer <fw@deneb.enyo.de>,
"zhuyan34@huawei.com" <zhuyan34@huawei.com>
Cc: 'GNU C Library' <libc-alpha@sourceware.org>
Subject: Re: [PATCH v2] memcpy: use bhs/bls instead of bge/blt [BZ #25620]
Date: Fri, 1 May 2020 12:58:12 +0000 [thread overview]
Message-ID: <DB8PR08MB503606FF1918ECB55E579ADB83AB0@DB8PR08MB5036.eurprd08.prod.outlook.com> (raw)
Hi Florian,
>> - blt .Ltail63aligned
>> + bls .Ltail63aligned
>
> Is bls really the unsigned variant of blt? Why not blo?
Well spotted! Indeed bls is incorrect here since the tail code cannot handle 64 bytes.
Note there are several uses of PL/MI that need to be changed too:
subs count, count, #64
ldrmi tmp2, [sp], #FRAME_SIZE
bmi .Ltail63unaligned
subs count, count, #64
bpl 1b
Basically the initial test protects all the others, but when that one is changed to
unsigned, all the other signed checks fail, and we're basically left with the exact
same problem. Hence the need to change all signed condition codes and add
tests that catch all possible cases.
Note a very quick grep shows memcpy.S, armv7/multiarch/memcpy_impl.S,
memmove.S, strlen.S and armv6t2.memchr.S using signed conditions.
Cheers,
Wilco
next reply other threads:[~2020-05-01 12:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 12:58 Wilco Dijkstra [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-05-06 12:40 zhuyan (M)
2020-04-15 11:59 Wilco Dijkstra
2020-04-13 14:16 zhuyan (M)
2020-04-14 22:26 ` Joseph Myers
2020-04-21 14:36 ` Florian Weimer
2020-04-21 21:27 ` Joseph Myers
2020-04-28 21:14 ` Florian Weimer
2020-04-30 20:33 ` Florian Weimer
2020-04-30 20:22 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB8PR08MB503606FF1918ECB55E579ADB83AB0@DB8PR08MB5036.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=fw@deneb.enyo.de \
--cc=libc-alpha@sourceware.org \
--cc=zhuyan34@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).