VirtualBox

Changeset 14808 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Nov 29, 2008 11:06:52 PM (16 years ago)
Author:
vboxsync
Message:

iprt/asm.h: GNU C/C++ defined PIC to indicate whether -fPIC behaviour is active. Replaced the RT_OS_DARWIN check with PIC to fix incorrect complication when targetting ring-0, RC and static.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asm.h

    r14246 r14808  
    746746             : "0" (uOperator)
    747747             : "rbx", "rcx");
    748 #  elif (defined(PIC) || defined(RT_OS_DARWIN)) && defined(__i386__) /* darwin: PIC by default. */
     748#  elif (defined(PIC) || defined(__PIC__)) && defined(__i386__)
    749749    __asm__ ("push  %%ebx\n\t"
    750750             "cpuid\n\t"
     
    802802             : "0" (uOperator)
    803803             : "rbx", "rdx");
    804 #  elif (defined(PIC) || defined(RT_OS_DARWIN)) && defined(__i386__) /* darwin: 4.0.1 compiler option / bug? */
     804#  elif (defined(PIC) || defined(__PIC__)) && defined(__i386__)
    805805    __asm__ ("push  %%ebx\n\t"
    806806             "cpuid\n\t"
     
    907907             : "0" (1)
    908908             : "rcx", "rdx");
    909 #  elif (defined(PIC) || defined(RT_OS_DARWIN)) && defined(__i386__)
     909#  elif (defined(PIC) || defined(__PIC__)) && defined(__i386__)
    910910    RTCCUINTREG uSpill;
    911911    __asm__ ("mov   %%ebx,%1\n\t"
     
    25152515# else /* !RT_ARCH_AMD64 */
    25162516#  if RT_INLINE_ASM_GNU_STYLE
    2517 #   if defined(PIC) || defined(RT_OS_DARWIN) /* darwin: 4.0.1 compiler option / bug? */
     2517#   if defined(PIC) || defined(__PIC__)
    25182518    uint32_t u32EBX = (uint32_t)u64;
    25192519    __asm__ __volatile__(/*"xchgl %%esi, %5\n\t"*/
     
    28792879    uint32_t u32Ret;
    28802880#  if RT_INLINE_ASM_GNU_STYLE
    2881 #   if defined(PIC) || defined(RT_OS_DARWIN) /* darwin: 4.0.1 compiler option / bug? */
     2881#   if defined(PIC) || defined(__PIC__)
    28822882    uint32_t u32EBX = (uint32_t)u64New;
    28832883    uint32_t u32Spill;
     
    31393139#  if RT_INLINE_ASM_GNU_STYLE
    31403140    uint64_t u64Ret;
    3141 #   if defined(PIC) || defined(RT_OS_DARWIN) /* darwin: 4.0.1 compiler option / bug? */
     3141#   if defined(PIC) || defined(__PIC__)
    31423142    /* NB: this code uses a memory clobber description, because the clean
    31433143     * solution with an output value for *pu64 makes gcc run out of registers.
     
    37943794# else /* !RT_ARCH_AMD64 */
    37953795#  if RT_INLINE_ASM_GNU_STYLE
    3796 #   if defined(PIC) || defined(RT_OS_DARWIN) /* darwin: 4.0.1 compiler option / bug? */
     3796#   if defined(PIC) || defined(__PIC__)
    37973797    uint32_t u32EBX = 0;
    37983798    Assert(!((uintptr_t)pu64 & 7));
     
    38703870# else /* !RT_ARCH_AMD64 */
    38713871#  if RT_INLINE_ASM_GNU_STYLE
    3872 #   if defined(PIC) || defined(RT_OS_DARWIN) /* darwin: 4.0.1 compiler option / bug? */
     3872#   if defined(PIC) || defined(__PIC__)
    38733873    uint32_t u32EBX = 0;
    38743874    uint32_t u32Spill;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette