* Re: byte_from_pos & CEIL_DIV_EXPR
@ 2000-04-07 19:34 Richard Kenner
0 siblings, 0 replies; 2+ messages in thread
From: Richard Kenner @ 2000-04-07 19:34 UTC (permalink / raw)
To: geoffk; +Cc: gcc
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* byte_from_pos & CEIL_DIV_EXPR
@ 2000-04-01 19:10 Geoff Keating
0 siblings, 0 replies; 2+ messages in thread
From: Geoff Keating @ 2000-04-01 19:10 UTC (permalink / raw)
To: kenner; +Cc: law, gcc
Hi Richard,
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.
I suspect this is causing the objc failures, but I haven't checked.
I'm just trying to understand the code.
--
- Geoffrey Keating <geoffk@cygnus.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-04-07 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-07 19:34 byte_from_pos & CEIL_DIV_EXPR Richard Kenner
-- strict thread matches above, loose matches on Subject: below --
2000-04-01 19:10 Geoff Keating
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).