Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

32 bit or 64 bit

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
9 replies to this topic

#1 ms75214   Members   

143
Like
1Likes
Like

Posted 15 July 2012 - 12:04 PM

i'm making a game for the mac app store.


is it smarter to make it 32 bit or 64 bit?

#2 Bacterius   Members   

13164
Like
6Likes
Like

Posted 15 July 2012 - 12:30 PM

*
POPULAR

How about... both?

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”


#3 rnlf   Members   

1860
Like
1Likes
Like

Posted 15 July 2012 - 11:42 PM

Since you can put both versions into the same package, yes: make both.

#4 6677   Members   

1054
Like
0Likes
Like

Posted 17 July 2012 - 04:16 AM

Aren't most macs 64 bit capable anyway. Failing that a 32 bit package will run on 64 bit OSx anyway.

#5 Phlipp   Members   

128
Like
0Likes
Like

Posted 17 July 2012 - 06:04 AM

Does a 32 bit OS process code with 64 bit numbers (long, ulong) properly? I was under the impression that if you use 64bit operators, you need to run it on a 64bit OS.

#6 Hodgman   Moderators   

50626
Like
0Likes
Like

Posted 17 July 2012 - 06:28 AM

Does a 32 bit OS process code with 64 bit numbers (long, ulong) properly? I was under the impression that if you use 64bit operators, you need to run it on a 64bit OS.

Depends on the CPU architecture that your compiler is targeting. Regular, portable x86 code won't have the instructions/registers to do 64-bit ops in a single instruction; the compiler will have to use a few instructions to implement long long operations.

#7 Tribad   Members   

981
Like
0Likes
Like

Posted 17 July 2012 - 07:09 AM

But there is a new ABI coming up that uses the 64-Bit extensions on 32-Bit code.
If you need the 64-Bit data size for a special purpose so you are bound to use them you can use the types from stdint.h
They are fixed in size across different environments. This way you need not to know how long or long long is realized within the used environment.
stdint.h is not part of the MS compilers. But there are some versions around in the net that work with MS.

#8 samoth   Members   

9653
Like
0Likes
Like

Posted 17 July 2012 - 08:53 AM

But there is a new ABI coming up that uses the 64-Bit extensions on 32-Bit code.

That's Linux though, and still experimental / half finished.

As for "32 or 64 bit", my opinion is that if you have to ask, then you can just stick with 32 bit. 64 bit operating systems allow running 32 bit code just fine. A few rare operations might be slightly more expensive, but pointers are only half the size (which makes a big difference).
If you do need 64 bits, then you already know (you've already run out of address space once), you need not ask.

You really only need 64 bit if you have a dataset of considerably more than a gigabyte or two that you wish to keep in memory (mapped or otherwise). Most programs work just fine with a "normal" 2GB address space (which can be 4GB at no extra cost under a 64 bit OS if you only set the appropriate flag in the executable).

Edited by samoth, 17 July 2012 - 08:54 AM.


#9 6677   Members   

1054
Like
1Likes
Like

Posted 18 July 2012 - 04:57 PM

Guys, this is a mac application though, from what I can find there aren't any macs running OSX as 32 bit anymore apart from the old PowerPC models

Edited by 6677, 18 July 2012 - 04:58 PM.


#10 Bacterius   Members   

13164
Like
0Likes
Like

Posted 18 July 2012 - 05:27 PM

Guys, this is a mac application though, from what I can find there aren't any macs running OSX as 32 bit anymore apart from the old PowerPC models

Still, with the proper portability conventions followed, producing both versions should be effortless and would allow the application to run on those old PowerPC models too Posted Image

Of course, if applying those conventions would take a rewrite, it's probably not worth the time Posted Image so good point. +1

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.