[M3devel] subrange or enum, with cvshead
Tony Hosking
hosking at cs.purdue.edu
Tue Aug 21 01:04:49 CEST 2007
I've figured out the cure, but don't know why the problem exists. It
seems that the gcc-based backend builds incorrect FLOAT/DOUBLE
constants when built on AMD64, unless it is configured as:
CC="gcc -m32" ../gcc/configure --enable-languages=m3cg --disable-nls
--enable-targets=x86-linux
If you omit CC="gcc -m32" then the problem arises. I have put my
AMD64 bootstrap executables for LINUXLIBC6 on my ftp site in the
directory LINUXLIBC6-AMD64. Note, these are for a 32-bit target, and
do not represent a complete 64-bit port to AMD64. See cm3.cfg,
cm3.gz, cm3cg.gz in ftp://ftp.cs.purdue.edu/pub/hosking/m3/LINUXLIBC6-
AMD64.
On Aug 20, 2007, at 2:49 PM, Dragiša Durić wrote:
> I've bootstrapped it same way as on ix86, first m3cc...cm3, then
> setting
> CM3 env var, then std build...
>
> When I just rsynced my INSTALL_ROOT and built binaries... it works, of
> course.
>
> As for Time.Now()... I have few other problems happening... Do you
> have
> some kind of test code for LONGINT I can run on this AMD64 box?
>
> dd
>
> On Mon, 2007-08-20 at 11:46 -0400, Tony Hosking wrote:
>> Hmmm. Are you using the most recent cm3cg, and a compiler
>> bootstrapped with it?
>>
>> Also, I have not tested the LONGINT stuff extensively on AMD64 yet.
>> Any chance you can diagnose the problem?
>>
>> On Aug 20, 2007, at 8:01 AM, Dragiša Durić wrote:
>>
>>> After I've compiled CM3 from cvshead for LINUXLIBC6 on x86_64
>>> (skipping
>>> m3gdb, which I've reported earlier would not compile for me) I am
>>> getting this error when I try to rn one of programs that worked
>>> flawlessy few checkouts ago.
>>>
>>> ***
>>> *** runtime error:
>>> *** An enumeration or subrange value was out of range.
>>> *** file "../src/uid/Common/TimeStamp.m3", line 63
>>> ***
>>>
>>> This is corresponding code:
>>>
>>> now := Time.Now() - epoch;
>>>>>> time := TRUNC(now);
>>> fineTime := ROUND(LongFloat.Scalb(now - FLOAT(time,
>>> LONGREAL), 8));
>>>
>>> I've identified few other problems, but I suppose ther are all
>>> variations...
>>>
>>> --
>>> Dragiša Durić <dragisha at m3w.org>
>>
> --
> Dragiša Durić <dragisha at m3w.org>
More information about the M3devel
mailing list