* 32 bit to 64 bit porting
@ 1997-04-02 5:00 Yao-Lu Tsai
1997-04-02 5:00 ` Gerald A. Feldman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yao-Lu Tsai @ 1997-04-02 5:00 UTC (permalink / raw)
Hi,
I am trying to port my C codes from SUNOS/Solaris to DEC UNIX 3.2.
I found DEC UNIX is a 64-bit OS. The long and pointer data type
are 64-bit. Unfortunately, there are MANY MANY type casting between
"int" and pointer in my C codes. This will cause problems in a 64-bit
platform. I also found there is a compiling option : -xtaso_short. This
option is much helpful and can solve most of the problems. However, there
are still some unknown problems that will cause core dumped. For example,
what will happen if I use -xtaso_short and call a C library function or
a system call with a pointer in its parameters or returned a pointer ?
Will my program push the 4-byte parameter into the stack but the function/
system call pops 8 bytes out of the stack ? How to solve such problems ?
Thanks a lot.
Yao-Lu Tsai
ytsai@oodb.syscom.com.tw
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 32 bit to 64 bit porting
1997-04-02 5:00 32 bit to 64 bit porting Yao-Lu Tsai
@ 1997-04-02 5:00 ` Gerald A. Feldman
1997-04-04 5:00 ` Karen Michaels
1997-04-04 5:00 ` Dirk Grunwald
2 siblings, 0 replies; 4+ messages in thread
From: Gerald A. Feldman @ 1997-04-02 5:00 UTC (permalink / raw)
Yao-Lu Tsai wrote:
> I am trying to port my C codes from SUNOS/Solaris to DEC UNIX 3.2.
> I found DEC UNIX is a 64-bit OS. The long and pointer data type
> are 64-bit. Unfortunately, there are MANY MANY type casting between
> "int" and pointer in my C codes.
I won't comment on the coding practice. However, the Digital Unix
calling standard states that the first 6 parameters passed to a function
are passed by register. Likewise, functions return parameters as
registers. (Passing structs and returning structs is a bit different).
There is a 32 bit library that contains libc functions that are 32-64
bit sensitive.
Also, there are some tools that Digital provides that can assist you in
porting. There is the Porting Assistant, which is part of FUSE, and
lint. The lint -Q option was specifically implemented to find 32-64bit
problems.
--
+----------------------------------------------+
| Jerry Feldman <gaf@highway1.com> |
| Boston Computer Solutions and Consulting |
| http://gaf.ne.highway1.com/ |
+----------------------------------------------+
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 32 bit to 64 bit porting
1997-04-02 5:00 32 bit to 64 bit porting Yao-Lu Tsai
1997-04-02 5:00 ` Gerald A. Feldman
@ 1997-04-04 5:00 ` Karen Michaels
1997-04-04 5:00 ` Dirk Grunwald
2 siblings, 0 replies; 4+ messages in thread
From: Karen Michaels @ 1997-04-04 5:00 UTC (permalink / raw)
To: Yao-Lu Tsai
The Digital Porting Assistant may help you here. It is available free
or charge in addition to be being packaged with FUSE. You can get
further information on the Porting Assistant on:
http://fuse.zko.dec.com/info/pa
Karen Michaels
Digital Porting Assistant/DEC FUSE Project Leader
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 32 bit to 64 bit porting
1997-04-02 5:00 32 bit to 64 bit porting Yao-Lu Tsai
1997-04-02 5:00 ` Gerald A. Feldman
1997-04-04 5:00 ` Karen Michaels
@ 1997-04-04 5:00 ` Dirk Grunwald
2 siblings, 0 replies; 4+ messages in thread
From: Dirk Grunwald @ 1997-04-04 5:00 UTC (permalink / raw)
Yao-Lu Tsai <ytsai@oodb.syscom.com.tw> writes:
> platform. I also found there is a compiling option : -xtaso_short. This
--
You don't want the -xtaso_short option -- you want "-taso".
-taso will cause the program to be linked into the lower 32-bit
address space. If you do int/ptr things, it won't matter.
As others mentioned, you should get Porting Assitant. Depending on
what you're porting, you might also look at FreePort Expression.
This translated SUNOS binaries to Digital binaries. It's free.
--
Dirk Grunwald Assoc. Prof, Univ. of Colorado at Boulder
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1997-04-04 5:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-02 5:00 32 bit to 64 bit porting Yao-Lu Tsai
1997-04-02 5:00 ` Gerald A. Feldman
1997-04-04 5:00 ` Karen Michaels
1997-04-04 5:00 ` Dirk Grunwald
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox