This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/40603] unnecessary conversion from unsigned byte load to signed byte load
- From: "ramana dot radhakrishnan at arm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jul 2009 09:13:21 -0000
- Subject: [Bug target/40603] unnecessary conversion from unsigned byte load to signed byte load
- References: <bug-40603-17659@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from ramana dot radhakrishnan at arm dot com 2009-07-01 09:13 -------
Subject: Re: New: unnecessary conversion from unsigned
byte load to signed byte load
> Unfortunately in thumb mode, loading a signed byte costs more than loading an
> unsigned byte and comparing with 0 has same cost as comparing with 0x7F.
I don't know of any core where loading a signed byte is more expensive
than unsigned byte in thumb mode. What did you have in mind ?
I suspect what you mean is that the sign extension here is not required
and we could get away with ldrb.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40603