Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-24-2006, 05:43 AM   #1
LQ Newbie
Registered: Jan 2006
Posts: 3

Rep: Reputation: 0
Question Porting 32 bit application

I have one application, written in C & assembly and it is running on Linux and Solaris. It is written for 32 bit platform . I have to port it to 64 bit platform.
From "C" point of view, I am looking for the following trouble spots
Pointer assignments
Bit handling

From assembly point of view: I am thinking of understanding existing assembly instructions and find out its equivalent (or impact on) 64 bit instructions.

Can anyone give me more views?

Old 01-24-2006, 11:39 PM   #2
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
It's best to use int64_t / uint64_t when you really need 64 bits, then use int / unsigned int otherwise, as they are tipically less than or equal the register's size. For pointers you may use uintptr_t. Always use off_t for file offsets. Be careful with the use of explicit casting because they turn off compiler warnings about discrepancies between sizes, ie: when mapping files into memory, mmap() uses size_t but the size of the file is off_t (struct stat st.size). FreeBSD, 64-bit Solaris and 64-bit Linux (native 64-bits or with Largefile Support) use 64-bits off_t and 32-bits size_t, so you must hack a bit to fully map large files.

A few pointers:

Last edited by primo; 01-24-2006 at 11:40 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
porting Window Application to Linux sjcoder Programming 3 12-18-2005 04:48 PM
Porting Solaris Application to Linux CaptainRon Solaris / OpenSolaris 5 10-01-2005 02:29 AM
driver porting to 64-bit-linux yogeshwar_s Programming 0 07-19-2005 09:18 AM
Huge Porting application question el_scrub Programming 5 06-10-2004 06:05 AM
Porting win32 application into Linux sergeyy Linux - Software 1 06-23-2003 08:57 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration