public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Stefan Kanthak" <stefan.kanthak@nexgo.de>
To: <gcc@gnu.org>, "LIU Hao" <lh_mouse@126.com>
Subject: Re: Widening multiplication, but no narrowing division [i386/AMD64]
Date: Mon, 9 Jan 2023 14:19:45 +0100	[thread overview]
Message-ID: <BEABAAE8508A4A27A5B9AB961CB2821C@H270> (raw)
In-Reply-To: <dd434f54-975d-7cd3-5609-3bd22509ae14@126.com>

LIU Hao wrote:

>在 2023/1/9 20:20, Stefan Kanthak 写道:
>> Hi,
>>
>> GCC (and other C compilers too) support the widening multiplication
>> of i386/AMD64 processors, but DON'T support their narrowing division:
>>
>>
>
> QWORD-DWORD division would change the behavior of your program.
[...]
> If DIV was used, it would effect an exception:

Guess why I use "schoolbook" division?
Please read the end of my post until you understand the code.

regards
Stefan


  reply	other threads:[~2023-01-09 13:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 12:20 Stefan Kanthak
2023-01-09 13:10 ` LIU Hao
2023-01-09 13:19   ` Stefan Kanthak [this message]
2023-01-09 14:23 ` Paul Koning
2023-01-09 15:20   ` Stefan Kanthak
2023-01-09 15:30     ` Paul Koning
2023-01-09 16:27       ` Stefan Kanthak
2023-01-10 16:49         ` Paul Koning

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=BEABAAE8508A4A27A5B9AB961CB2821C@H270 \
    --to=stefan.kanthak@nexgo.de \
    --cc=gcc@gnu.org \
    --cc=lh_mouse@126.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).