* Porting hints
@ 2001-08-28 7:41 Davies, Huw
2001-08-28 7:59 ` Gregor Maier
2001-08-28 14:07 ` Kenneth Jacker
0 siblings, 2 replies; 6+ messages in thread
From: Davies, Huw @ 2001-08-28 7:41 UTC (permalink / raw)
To: axp-list
Hi,
I'm attempting to port some software (a computer simulator) which runs under
Intel Linux to my Alpha. (The fastest Intel box I have is 166MHz so I
suspect the alpha will be a little quicker :-). I can confirm that the
software runs on Intel but "works" significantly differently on Alpha (works
implies the user interface seems to start but the application loops rather
than runs).
I have done some simple "eye" checks on the code and nothing obvious appears
wrong. I have tried using both gcc and ccc and get more warnings with ccc
(mainly casts). Are there any pointers to information about solving this - I
suspect either an initialisation or possibly a data alignment assumption.
I'm trying to avoid understanding all the code, but if that's the next step
so be it!
Huw Davies
COMPAQ BUSINESS CRITICAL SERVICES
231 Normanby Road, South Melbourne, 3205
E-mail: Huw.Davies@compaq.com
* Personal opinion only *
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Porting hints
2001-08-28 7:41 Porting hints Davies, Huw
@ 2001-08-28 7:59 ` Gregor Maier
2001-08-28 14:07 ` Kenneth Jacker
1 sibling, 0 replies; 6+ messages in thread
From: Gregor Maier @ 2001-08-28 7:59 UTC (permalink / raw)
To: axp-list
On 28-Aug-2001 Davies, Huw wrote:
> Hi,
>
> I'm attempting to port some software (a computer simulator) which runs under
> Intel Linux to my Alpha. (The fastest Intel box I have is 166MHz so I
> suspect the alpha will be a little quicker :-). I can confirm that the
> software runs on Intel but "works" significantly differently on Alpha (works
> implies the user interface seems to start but the application loops rather
> than runs).
>
> I have done some simple "eye" checks on the code and nothing obvious appears
> wrong. I have tried using both gcc and ccc and get more warnings with ccc
> (mainly casts). Are there any pointers to information about solving this - I
> suspect either an initialisation or possibly a data alignment assumption.
> I'm trying to avoid understanding all the code, but if that's the next step
> so be it!
>
Mayb this will help.
the problem could be the int datatype in C. The width of an int (number of
bits) in C is equal to the processor's register width (i.e. 32 on Intel and 64
and alpha)
maybe there's some similiar problem with pointers (i.e. storing pointers in 32
bit integers combined with some fancy typecasts, ...)
Gregor
----------------------------------
E-Mail: Gregor Maier <gregor.maier@newlogic.com>
Date: 28-Aug-2001
Time: 09:51:06
----------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Porting hints
2001-08-28 7:41 Porting hints Davies, Huw
2001-08-28 7:59 ` Gregor Maier
@ 2001-08-28 14:07 ` Kenneth Jacker
1 sibling, 0 replies; 6+ messages in thread
From: Kenneth Jacker @ 2001-08-28 14:07 UTC (permalink / raw)
To: axp-list
huw> I'm attempting to port some software (a computer simulator)
huw> which runs under Intel Linux to my Alpha.
Before switching to AlphaLinux, I used DU/Tru64 for many years on my
AS255/300. I, too, had trouble getting a machine simulator
(spim/xspim) to run correctly. As others have suggested, the problem
was cause by the original authors assuming that ints/ptrs were 32 not
64 bits.
In particular, after many hours of debugging with 'gdb', I found the
problem: they had copied a negative, 32 bit value into a 64 bit
integer without proper (two's compl) sign extension.
The length dependencies are subtle and hard to find. But with
perseverance, you'll eventually succeed!
Good luck,
--
Prof Kenneth H Jacker khj@cs.appstate.edu
Computer Science Dept www.cs.appstate.edu/~khj
Appalachian State Univ
Boone, NC 28608 USA
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Porting hints
@ 2001-08-28 14:11 Donsbach, Jeff
0 siblings, 0 replies; 6+ messages in thread
From: Donsbach, Jeff @ 2001-08-28 14:11 UTC (permalink / raw)
To: 'axp-list@redhat.com'
> -----Original Message-----
> From: Gregor Maier [mailto:gregor.maier@newlogic.com]
> Sent: Tuesday, August 28, 2001 4:00 AM
> To: axp-list@redhat.com
> Subject: RE: Porting hints
>
> >
> Mayb this will help.
>
> the problem could be the int datatype in C. The width of an
> int (number of
> bits) in C is equal to the processor's register width (i.e.
> 32 on Intel and 64
> and alpha)
No, "int" is 32 bits on both x86 and Alpha Linux. "Long" is 64 on Alpha
though.
>
> maybe there's some similiar problem with pointers (i.e.
> storing pointers in 32
> bit integers combined with some fancy typecasts, ...)
That could be part of it. The only way to really know is do some debugging.
Otherwise, you could guess until you are blue in the face.
Jeff Donsbach
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Porting hints
@ 2001-08-29 5:44 Davies, Huw
0 siblings, 0 replies; 6+ messages in thread
From: Davies, Huw @ 2001-08-29 5:44 UTC (permalink / raw)
To: axp-list
> -----Original Message-----
> From: Donsbach, Jeff
> Sent: Wednesday, 29 August 2001 12:12 AM
> To: 'axp-list@redhat.com'
> Subject: RE: Porting hints
>
> That could be part of it. The only way to really know is do
> some debugging.
> Otherwise, you could guess until you are blue in the face.
Well at least I have a working Intel Linux version to debug against.
Hopefully it'll be obvious where the problem lies (famous last words). Looks
like I'm in for a fun weekend....
Huw Davies
COMPAQ BUSINESS CRITICAL SERVICES
231 Normanby Road, South Melbourne, 3205
E-mail: Huw.Davies@compaq.com
* Personal opinion only *
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Porting hints
@ 2001-09-06 15:30 William H. Magill
0 siblings, 0 replies; 6+ messages in thread
From: William H. Magill @ 2001-09-06 15:30 UTC (permalink / raw)
To: Huw.Davies; +Cc: axp-list
> > -----Original Message-----
> > From: Donsbach, Jeff
> > Sent: Wednesday, 29 August 2001 12:12 AM
> > To: 'axp-list@redhat.com'
> > Subject: RE: Porting hints
> >
> > That could be part of it. The only way to really know is do
> > some debugging.
> > Otherwise, you could guess until you are blue in the face.
>
> Well at least I have a working Intel Linux version to debug against.
> Hopefully it'll be obvious where the problem lies (famous last words). Looks
> like I'm in for a fun weekend....
>
The place to start is
www.tru64unix.compaq.com/docs/pub_page/porting.html
and:
www.tru64unix.compaq.com/linux/documentation.htm
While nothing details 32bit Intel Linux based ports, the cover virtually
everything else. The SCO guide might be the closest.
There is also the tool : Porting Assistant:
http://www.tru64unix.compaq.com/portingassistant/
--
www.tru64unix.compaq.com
www.tru64.org
comp.unix.tru64
T.T.F.N.
William H. Magill Senior Systems Administrator
Information Services and Computing (ISC) University of Pennsylvania
Internet: magill@isc.upenn.edu magill@acm.org
http://www.isc-net.upenn.edu/~magill/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-09-06 15:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-28 7:41 Porting hints Davies, Huw
2001-08-28 7:59 ` Gregor Maier
2001-08-28 14:07 ` Kenneth Jacker
-- strict thread matches above, loose matches on Subject: below --
2001-08-28 14:11 Donsbach, Jeff
2001-08-29 5:44 Davies, Huw
2001-09-06 15:30 William H. Magill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox