32 bit -> 64 bit Move

32 bit -> 64 bit Move

Post by Sandeep Bhaler » Sat, 23 Nov 1996 04:00:00



What are the general precautions to move a 32 bit code to a 64 bit code ?
I am moving stuff from 32 bit unix to 64 bit unix.
Are there any general guidelines/papers or articles I can refer ?
Thanks,
Sandeep

 
 
 

32 bit -> 64 bit Move

Post by Bennett To » Tue, 26 Nov 1996 04:00:00



Quote:>What are the general precautions to move a 32 bit code to a 64 bit code ?
>I am moving stuff from 32 bit unix to 64 bit unix.
>Are there any general guidelines/papers or articles I can refer ?

Depends on the programming language. If you use Perl, the changes are unlikely
to break anything (not impossible, just unlikely). Even more so if you use
Python. On the other hand, if you are porting C, there are lots of ways things
could break. Most of them will be caught if you compile with gcc -Wall, with
optimization cranked up (I use -O6, which is as far as I know big enough to
ensure that all the optimizations are turned on, plus a couple:-). Make sure
you are using the proper system header files for system interfaces; this will
make sure your calls are passing in and expecting back the right types for
syscalls. Take care to use the symbolic type defines --- time_t, off_t, and so
on.

Most well-written code ports with no effort. Badly-written code can be so much
trouble that it's better to toss it and rewrite from scratch.

-Bennett

 
 
 

32 bit -> 64 bit Move

Post by Matt Houseman x440 » Tue, 26 Nov 1996 04:00:00



> What are the general precautions to move a 32 bit code to a 64 bit code ?
> I am moving stuff from 32 bit unix to 64 bit unix.
> Are there any general guidelines/papers or articles I can refer ?
> Thanks,
> Sandeep


Bit fields/manipulation, indexing directly to a member in
a struct...
--
==================================================
Matt Houseman                   Arbor Software

Senior Software Engineer        Data Storage Group

"...honest to the point of recklessness,
    self-centered to the extreme..."
==================================================

 
 
 

32 bit -> 64 bit Move

Post by Drazen Kac » Wed, 27 Nov 1996 04:00:00




>Bit fields/manipulation, indexing directly to a member in
>a struct...

What do you mean by indexing directly struct member? The only way that comes
to my mind is something like this:

*((char *)base + (int)(&((struct foo *)0)->member)) = value;

That should work, provided that chars still take one byte.

--
Life is a *ly transmitted disease.



 
 
 

32 bit -> 64 bit Move

Post by Andrew Gabri » Thu, 28 Nov 1996 04:00:00




>What are the general precautions to move a 32 bit code to a 64 bit code ?
>I am moving stuff from 32 bit unix to 64 bit unix.
>Are there any general guidelines/papers or articles I can refer ?
>Thanks,
>Sandeep


Something I have come across a few times building free software on
DEC Alpha is where someone mallocs space for an array of items,
and the items contain 64 bit datatypes but due to shorter datatypes
at the end, are not a multiple of 64 bits long. The alignment of
some intermediate items is then inappropriate for accessing their
64 bit datatypes.

--


 
 
 

1. Solaris 9 installed with 32 & 64 bit supports but boots in 32 bit mode

Hi every one,

I have installed Solaris 9 on a Sun Sparc E220R. When I installed, it asked
me whether you want 32 bit or 64/32 bit support. I select 32/64 bit support
and I was assuming that it will boot in 64 bit, but when system booted after
the installation, it was in 32 bit mode.

Can I force the system to boot in 64 bit mode or there is any other way ...

Please advise.

Regards and thanks in advance for the advise.

Abdul Majid

2. too many mails everyday

3. performance of runing 32/64 bit program in 64 bit kernel.

4. how do I change the format of data?

5. How 32 bit driver can be ported to 64 bit driver?

6. Looking for souce code to drive an AMD940 chip mace (or equivalent) .

7. 32 bits vs. 64 bits Oracle

8. Line to long for sed?

9. 32 bit or 64 bit

10. Best Build machine: KT333 w/ 32 bit PCI or KT266 w/ 64 bit pci

11. Starting a 64 bit Sol8 Machine in 32 bit mode

12. 32-bit Core files on 64-bit Sysetm

13. 64-bit Solaris 7: wasn't Solaris 2.6 also 32-bit?