Changeset 15160


Ignore:
Timestamp:
Jan 9, 2012, 8:44:53 PM (8 years ago)
Author:
rme
Message:

In the definition of current_stack_pointer(), use
different inline asm for the x86 targets.

This works around a bug in the llvm-gcc that Apple
ships with Xcode 4.2.1 (and maybe earlier versions).
When compiling with -g without -O, the previous inline
asm is miscompiled.

On my 10.7.2 system with Xcode 4.2.1, /usr/bin/cc
is a link to llvm-gcc. cc --verison reports:
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based
on Apple Inc. build 5658) (LLVM build 2336.1.00)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/bits.h

    r14295 r15160  
    126126#endif
    127127#ifdef X8664
    128   register natural _sp __asm__("%rsp");
     128  natural _sp;
     129  __asm__("movq %%rsp,%0" : "=r" (_sp));
    129130#endif
    130131#ifdef X8632
    131   register natural _sp __asm__("%esp");
     132  natural _sp;
     133  __asm__("movl %%esp,%0" : "=r" (_sp));
    132134#endif
    133135#ifdef ARM
Note: See TracChangeset for help on using the changeset viewer.