Re: incorrect use of 0L constant in LDIV, LREM?
David Bélanger <[email protected]> Sun, 6 Feb 2005 12:09:16 -0500
| Newsgroups | gmane.comp.java.vm.sablevm.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Feb 05, 2005 at 05:06:10PM -0500, Chris Pickett wrote:
> Hi,
>
> Wouldn't the code for LDIV, LREM in instructions.m4.mc be correct if the
> test was for 0LL and not 0L? Furthermore, since LL constants aren't
> allowed in ANSI C, shouldn't there be a test for both halves of the
> 64-bit value?
>
What about something like:
if (value == (_svmt_s64) 0) {
...
}
?
If you look in constants.h (SVM_JLONG_{MIN,MAX}), the LL constants have
been removed at some point in time and replaced by constant expression
using explicit casts.
What's the difference between L and LL, is it that:
L -> long (32-bit on 32-bit arch)
LL -> long long (64-bit)
David
---
David Bélanger
Web page: http://www.cs.mcgill.ca/~dbelan2/
Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt