[comp.lang.perl] Perl 4.003 on Xenix 286 - no go; help!

slootman@dri.nl (Paul Slootman) (04/26/91)

OK, I give up.

I've ported perl 4.003 to an ICL DRS6000 running SysV.4 on a SPARC
processor. No problem. On the ICL DRS400 running SysV.2.1 on a
68020. There I needed to prevent bcopy being called with a length of
zero. The ICL DRS400E (oops, sorry, this is officially called
DRS400 level 70) running SysV.3.2 on a 68030: no problem. On SCO
Unix 3.2 and SCO Xenix 386 2.3.3 I didn't have (too) much trouble.
The last thing I've tried is to cross-develop perl 4.003 for Xenix
286 (using Xenix 386 2.3 with -M2l compiler flag). It compiles ok,
but 'make test' barfs quite soon (i.e. before anything happens). A
post-mortem shows me it has a floating exception in toke.c, line
1964:
	str_numset(str,(double)i);

Going into machine instruction single-step, it goes wrong where the
integer "i" is converted into a double:

	fild	QWord Ptr [bp-34]	(bp=D892,ss:D85E=0000)

I tried using a tmp double, and assigning the value of "i" to it.
It then crashes at that point... In my desperation, I tried:

	char	tmpstr[64];
	double	tmpdub,atof();
	.
	.
	sprintf(tmpbuf,"%d",i);
	tmpdub=atof(tmpbuf);
	str_numset(str,tmpdub);
and...
It worked... [insert picture of me staring dumbfounded at the screen
until the screensaver intervenes]

It passed all but 7 of the tests; those also were floating exceptions
(at least most of them). However, I'm not going to hack the code all
over the place. What am I doing wrong? (besides wanting to use perl
on a 286 system -- don't ask). Development system is 2.3.0d according
to perms/soft. I've tried combinations of optimizing, not optimizing,
CRIPPLED_CC, SMALLSWITCH , etc.

Am I the only one wanting to use perl on a 286? Help!

Paul.
-- 
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
: slootman@dri.nl           : You are wise, witty and wonderful, but you      :
: ...!hp4nl!dri500!slootman : spend too much time reading this sort of trash. :
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=