From: Florian Weimer <fw@deneb.enyo.de>
To: Ulf Magnusson <ulfalizer@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Option to make unsigned->signed conversion always well-defined?
Date: Fri, 07 Oct 2011 23:36:00 -0000 [thread overview]
Message-ID: <87botsh9vm.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <CAFkk2KT-Qtr7EuPOqRbK=FsFxTTWTzoQZPHMjN4Hpe7z+gsbxA@mail.gmail.com> (Ulf Magnusson's message of "Fri, 7 Oct 2011 20:14:01 +0200")
* Ulf Magnusson:
> Good machine code would be fun to see, though I might need to brush up
> on my ARM.
It turns out that ARM doesn't seem to have 8-bit overflow detection,
so something like this has to be used (with the arguments in R1 and
R2, result in the lower bit of R3):
MOV R3, R1, LSL #24
ADDS R3, R2, R3, LSL #24
ADDVS R3, R3, #1
Not sure if this is correct, I don't really know ARM assembly.
next prev parent reply other threads:[~2011-10-07 19:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 22:56 Ulf Magnusson
2011-10-06 8:25 ` Ulf Magnusson
2011-10-06 9:04 ` Pedro Pedruzzi
2011-10-06 10:52 ` Ulf Magnusson
2011-10-06 14:42 ` Ulf Magnusson
2011-10-06 14:45 ` Miles Bader
2011-10-06 14:48 ` Ulf Magnusson
2011-10-06 21:31 ` Pedro Pedruzzi
2011-10-07 11:52 ` Miles Bader
2011-10-07 17:20 ` Pedro Pedruzzi
2011-10-07 17:35 ` Miles Bader
[not found] ` <4E8DBF3C.1020700@redhat.com>
2011-10-06 22:08 ` Ulf Magnusson
2011-10-06 22:46 ` Florian Weimer
2011-10-07 19:36 ` Ulf Magnusson
2011-10-07 22:24 ` Florian Weimer
2011-10-07 22:48 ` Ulf Magnusson
2011-10-07 23:36 ` Florian Weimer [this message]
2011-10-06 18:24 Jeremy Hall
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=87botsh9vm.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=gcc@gcc.gnu.org \
--cc=ulfalizer@gmail.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).