i386

How do programs support i386 and ppc at the same time?

I would like to know how you can support i386 and ppc architectures for programs at /bin. I run for instance bin $ file amber I get amber: setgid Mach-O universal binary with 2 architectures amber (for architecture i386): Mach-O executable i386 amber (for architecture ppc): Mach-O executable ppc How do programs support i386 an...

How to translate "pushl 2000" from AT&T asm to Intel syntax on i386

I'm trying to translate the following from AT&T assembly to Intel assembly: pushl 2000 Now this compiles down to: ff 35 d0 07 00 00 pushl 0x7d0 But no matter what I try, I cannot get the same in Intel synax, I've tried: intel asm disassembly after compiling to at&t push 2000 68 d0 07 00 00 push $0x7d0 push [200...

Register allocation and spilling, the easy way?

I'm looking for a way to allocate local variables to registers. I'm aware of a couple of serious methods for doing it (namely, those mentioned on Wikipedia), but I'm stuck on how "spilling" is accomplished. Also, the relevant literature is quite intimidating. I'm hoping there's something simpler that will satisfy my priorities: Corr...

i386 different from x86?

Hello, Quickly can someone let me know if i386 is diff from x86 Thanks ...

Autoconf ignores compiler flags

I'm trying to build a C library with a non-native architecture. I'm running OSX 10.6 (which is x86_64) but I need the library compiled for i386. Normally, you can just add the compiler flag: -arch i386. But I'm using Autoconf and it ignores this in the configure file and it also ignores it if I try running: ./configure CC="gcc -arch i386...

lcov in cross-compile environment

Hello, I have some problems in using gcov/ lcov in a cross-compiler setting. What I have: I took the example main()-Program from the gcov documentation page and successfully compiled, linked and run it. I also was able to run lcov against it to produce the analysis in html pages. All this was in a native i.e. (NON cross-)compiling env...

Implementing traceback on i386

Hi, I am currently porting our code from an alpha (Tru64) to an i386 processor (Linux) in C. Everything has gone pretty smoothly up until I looked into porting our exception handling routine. Currently we have a parent process which spawns lots of sub processes, and when one of these sub-processes fatal's (unfielded) I have routines to ...

App crashes on i386, works on x86_64

Hi, I tried switching architectures in my Xcode project today, because I was about to use low level QuickTime stuff that's not yet ported to 64 bit yet. When i compiled before on x86_64 my app ran just fine. Then i switched the arch to i386 and boom, my app keeps crashing on startup. The weird thing is, the stack tracke has nothing to ...

How do I build Universal binaries (ppc/i386) using Xcode 3.2.2 for OSX?

I am trying to build a universal binary for a project at work, but I can't seem to get Xcode set up properly to do so. I am familiar with the Apple Documentation regarding this, but apparently I am not reading it correctly. The Xcode build options in question seem to be: Architectures Base SDK C/C++ Compiler Version Mac OS X Deployme...

Can a process running a 32bit compiled binary use more than 4gb of memory?

Is it possible for a single process running a 32bit compiled version of python in Snow Leopard (64bit machine) to appear to consume > 4gb (say 5.4gb) of virtual memory as seen by the top command? I did a file ...python to see that the binary was not x86, yet it appeared to be consuming over 5gb of memory. My guess is that the librari...

Extend the witdh of base address in 386 segment selector to excess the 4GB RAM limit in 32-bit OS?

As the memory requirement grows fast, today more and more system requires 64-bit machines to access even larger RAM. FWIK in 386 protected mode, a memory pointer consists of two part: the base address (32-bit) specified by a segment selector, and the offset address (32-bit) added to the base address. To re-compile all programs in 64-...

How can I force qtcreator to create non-universal binaries

When I use qtcreator on mac, it creates universal binaries. Does anyone know how to set it so it just creates a 'native' binary? (So i386' in my case?) Qtcreator uses qmake as a buildsystem. Google hasn't been my friend so far, I hope stackoverflow will. EDIT: my config file so far: TARGET = mongowriter CONFIG += console CONFIG ...

Whats the difference between armv6 and i386?

I am trying to link libssh2.dylib (a 3rd party library compiled by Matthew Wilkinson using libssh2 library from http://www.libssh2.org) to my xcode project but when I try the following code: const char * libssh2_version(int required_version); printf("libssh2 version: %s", libssh2_version(0) ); Heres the error I get: ld: warning: in...

Xcode Only Gives Me Desktop Architectures for iOS App

I have an iOS project that I've put in Dropbox to work with a few friends. The issue is that it seems to get "corrupted", so that after some time (after someone else has accessed the Xcode project file), when I try to go and open it again I get a Base SDK Missing error. In the Project Settings, I discover that I'm missing the valid ARM6/...