Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 687841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:10:07+00:00 2026-05-14T02:10:07+00:00

I initially thought that 64 bit instructions would not work on OS-X 10.5. I

  • 0

I initially thought that 64 bit instructions would not work on OS-X 10.5.

I wrote a little test program and compiled it with GCC -m64.
I used long long for my 64 bit integers.

The assembly instructions used look like they are 64 bit. eg. imultq and movq 8(%rbp),%rax.

I seems to work.

I am only using printf to display the 64 bit values using %lld.

  1. Is this the expected behaviour?
  2. Are there any gotcha's that would cause this to fail?
  3. Am I allowed to ask multiple questions in a question?
  4. Does this work on other OS’s?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:10:07+00:00Added an answer on May 14, 2026 at 2:10 am

    Just to make this completely clear, here is the situation for 32- and 64-bit executables on OS X:

    • Both 32- and 64-bit user space executables can be run on both 32- and 64-bit kernels in OS X 10.6, without emulation. On 10.4 and 10.5, both 32- and 64-bit executables can run on the 32-bit kernel. (This is not true on Windows)

    • The user space system libraries and frameworks are built 32/64-bit fat on 10.5 and 10.6. You can link against them normally, whether you’re building for 32-bit, 64-bit, or both. A few libraries (basically the POSIX layer) are also built 32/64-bit fat on 10.4, but many of them are not.

    • On 10.6, the build tools produce 64-bit executables by default. On 10.5 and earlier, the default is 32-bit.

    • On 10.6, executables that are built fat will run the 64-bit side by default. On 10.5 and earlier, the 32-bit side is executed by default.

    • You can always manually specify which slice of a fat executable to use by using the arch command. eg. arch -arch i386 someCommandToRunThatIWantToRunIn32BitMode. For application bundles, you can either launch them from the command line, or there is a preference if you “get info” on the application.

    • OS X and Linux use the LP64 model for 64-bit executables. Pointers and long are 64 bits wide, int is still 32 bits, and long long is still 64 bits. (Windows uses the LLP64 model instead — long is 32 bits wide in 64 bit Windows).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I initially thought that how to pass class attribute and value to markdown syntax
Initially I thought this was going to work, but now I understand it won't
My animationDidStop method is not being called for some reason, initially I thought it
For example: a) int [x][y][z] vs b) int[x*y*z] Initially thought I'd go with a)
Initially I deployed packages on SQL server but since my machine is not having
Initially I thought the code presented below was working, the inBuffer seems to be
I thought I understood ViewState, but this is a bit of a weird one.
After a bit of investigation, I found that C++0x stores the elements in a
I have a program that sorts big files by splitting them into chunks, sort
I am building a web application that will have a fair bit of forms.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.