pack(d) packs floats, I think.

2001-09-22 Thread Simon Cozens
I've found the bug on Linux Sparc; This is either a bug in Parrot, or a bug in Perl, and I can't tell which. On this machine, NVs are doubles; their pack_type is 'd', which is as it should be. So, a number (2.0) is inserted into the bytecode stream with pack('d', 2.0) However, when I try

Re: pack(d) packs floats, I think.

2001-09-22 Thread Jarkko Hietaniemi
On this machine, NVs are doubles; their pack_type is 'd', which is as it should be. So, a number (2.0) is inserted into the bytecode stream with pack('d', 2.0) ./perl -Ilib -MDevel::Peek -le 'Dump(pack(d,2))' SV = PV(0x1d9ed4) at 0x1e4568 REFCNT = 1 FLAGS = (PADTMP,POK,pPOK) PV =

Re: pack(d) packs floats, I think.

2001-09-22 Thread Simon Cozens
On Sun, Sep 23, 2001 at 02:17:40AM +0300, Jarkko Hietaniemi wrote: unaligned access Bother. It is as I feared. Dan, we need to do something about this. The choices are: put floats into the constant section, or ensure instructions are assigned on an appropriate boundary. I can see pros and

Re: pack(d) packs floats, I think.

2001-09-22 Thread Bryan C . Warnock
On Saturday 22 September 2001 07:21 pm, Simon Cozens wrote: On Sun, Sep 23, 2001 at 02:17:40AM +0300, Jarkko Hietaniemi wrote: unaligned access Bother. It is as I feared. Dan, we need to do something about this. The choices are: put floats into the constant section, or ensure instructions

Re: pack(d) packs floats, I think.

2001-09-22 Thread Dan Sugalski
On Sun, 23 Sep 2001, Simon Cozens wrote: On Sun, Sep 23, 2001 at 02:17:40AM +0300, Jarkko Hietaniemi wrote: unaligned access Bother. It is as I feared. Dan, we need to do something about this. The choices are: put floats into the constant section, or ensure instructions are assigned

Re: pack(d) packs floats, I think.

2001-09-22 Thread Benjamin Stuhl
--- Simon Cozens [EMAIL PROTECTED] wrote: On Sun, Sep 23, 2001 at 02:17:40AM +0300, Jarkko Hietaniemi wrote: unaligned access Bother. It is as I feared. Dan, we need to do something about this. The choices are: put floats into the constant section, or ensure instructions are assigned

Re: pack(d) packs floats, I think.

2001-09-22 Thread Simon Cozens
On Sat, Sep 22, 2001 at 04:41:28PM -0700, Benjamin Stuhl wrote: at load time. Yes, it's slow and hackish, but strings are the only *portable* format for floating-point numbers I thought (although I might have conveniently forgotten the other side of the argument:) that we weren't that

Re: pack(d) packs floats, I think.

2001-09-22 Thread Dan Sugalski
On Sat, 22 Sep 2001, Benjamin Stuhl wrote: --- Simon Cozens [EMAIL PROTECTED] wrote: On Sun, Sep 23, 2001 at 02:17:40AM +0300, Jarkko Hietaniemi wrote: unaligned access Bother. It is as I feared. Dan, we need to do something about this. The choices are: put floats into the

Re: pack(d) packs floats, I think.

2001-09-22 Thread Bryan C . Warnock
On Saturday 22 September 2001 07:33 pm, Simon Cozens wrote: On Sat, Sep 22, 2001 at 04:41:28PM -0700, Benjamin Stuhl wrote: at load time. Yes, it's slow and hackish, but strings are the only *portable* format for floating-point numbers I thought (although I might have conveniently