From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
To: geoffk@cygnus.com
Cc: gcc@gcc.gnu.org
Subject: Re: byte_from_pos & CEIL_DIV_EXPR
Date: Fri, 07 Apr 2000 19:34:00 -0000 [thread overview]
Message-ID: <10004080245.AA17365@vlsi1.ultra.nyu.edu> (raw)
Is there some reason why byte_from_pos uses CEIL_DIV_EXPR rather than,
say, TRUNC_DIV_EXPR? I would expect that TRUNC_DIV_EXPR or
FLOOR_DIV_EXPR would be more correct, since if something starts at a
bitwise offset of 11, then it starts at a byte offset of 1, not 2.
Sorry, I was away for a week.
There is indeed a problem here, but it's more subtle. The problem is that
byte_from_pos can be used in both contexts: where you want the byte
containing the value and where you want to use it as a length.
My feeling is that we should use it for the former purpose only and thus
TRUNC_DIV is correct.
But I need to look at this more. Sometime over the weekend.
next reply other threads:[~2000-04-07 19:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-07 19:34 Richard Kenner [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-04-01 19:10 Geoff Keating
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=10004080245.AA17365@vlsi1.ultra.nyu.edu \
--to=kenner@vlsi1.ultra.nyu.edu \
--cc=gcc@gcc.gnu.org \
--cc=geoffk@cygnus.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).