VirtualBox

Changeset 39455 in vbox


Ignore:
Timestamp:
Nov 29, 2011 1:29:31 PM (13 years ago)
Author:
vboxsync
Message:

A few arm bits from down stairs.

File:
1 edited

Legend:

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

    r39015 r39455  
    110110 * Indicates that we're compiling for the SPARC V9 architecture (64-bit).
    111111 */
    112 #if !defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_SPARC) && !defined(RT_ARCH_SPARC64)
     112#if !defined(RT_ARCH_X86) \
     113 && !defined(RT_ARCH_AMD64) \
     114 && !defined(RT_ARCH_SPARC) \
     115 && !defined(RT_ARCH_SPARC64) \
     116 && !defined(RT_ARCH_ARM)
    113117# if defined(__amd64__) || defined(__x86_64__) || defined(_M_X64) || defined(__AMD64__)
    114118#  define RT_ARCH_AMD64
     
    119123# elif defined(__sparc__)
    120124#  define RT_ARCH_SPARC
     125# elif defined(__arm__) || defined(__arm32__)
     126#  define RT_ARCH_ARM
    121127# else /* PORTME: append test for new archs. */
    122128#  error "Check what predefined macros your compiler uses to indicate architecture."
     
    135141#elif defined(RT_ARCH_SPARC) && defined(RT_ARCH_SPARC64)
    136142# error "Both RT_ARCH_SPARC and RT_ARCH_SPARC64 cannot be defined at the same time!"
     143#elif defined(RT_ARCH_ARM) && defined(RT_ARCH_AMD64)
     144# error "Both RT_ARCH_ARM and RT_ARCH_AMD64 cannot be defined at the same time!"
     145#elif defined(RT_ARCH_ARM) && defined(RT_ARCH_X86)
     146# error "Both RT_ARCH_ARM and RT_ARCH_X86 cannot be defined at the same time!"
     147#elif defined(RT_ARCH_ARM) && defined(RT_ARCH_SPARC64)
     148# error "Both RT_ARCH_ARM and RT_ARCH_SPARC64 cannot be defined at the same time!"
     149#elif defined(RT_ARCH_ARM) && defined(RT_ARCH_SPARC)
     150# error "Both RT_ARCH_ARM and RT_ARCH_SPARC cannot be defined at the same time!"
    137151#endif
    138152
     
    147161 * @deprecated
    148162 */
    149 #if !defined(__X86__) && !defined(__AMD64__) && !defined(RT_ARCH_SPARC) && !defined(RT_ARCH_SPARC64)
     163#if !defined(__X86__) && !defined(__AMD64__) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
    150164# if defined(RT_ARCH_AMD64)
    151165#  define __AMD64__
     
    158172# error "Both __X86__ and __AMD64__ cannot be defined at the same time!"
    159173#elif defined(__X86__) && !defined(RT_ARCH_X86)
    160 # error "Both __X86__ without RT_ARCH_X86!"
     174# error "__X86__ without RT_ARCH_X86!"
    161175#elif defined(__AMD64__) && !defined(RT_ARCH_AMD64)
    162 # error "Both __AMD64__ without RT_ARCH_AMD64!"
     176# error "__AMD64__ without RT_ARCH_AMD64!"
    163177#endif
    164178
     
    167181/** @def RT_LITTLE_ENDIAN
    168182 * Defined if the architecture is little endian.  */
    169 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     183#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) || defined(RT_ARCH_ARM)
    170184# define RT_LITTLE_ENDIAN
    171185#elif defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
     
    21032117# endif /* !IN_RING3 */
    21042118
     2119#elif defined(RT_ARCH_ARM)
     2120/* ASSUMES that at least the last and first 4K are out of bounds. */
     2121# define RT_VALID_PTR(ptr)      ( (uintptr_t)(ptr) + 0x1000U >= 0x2000U )
     2122
    21052123#else
    21062124# error "Architecture identifier missing / not implemented."
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