VirtualBox

Changeset 1379 in kBuild


Ignore:
Timestamp:
Jan 7, 2008 3:10:11 AM (17 years ago)
Author:
bird
Message:

PARISC and S390 architecture defines with dection. Detect arm, mips and sparc. (Patch from Torsten.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/k/kDefs.h

    r1341 r1379  
    44 * kTypes - Defines and Macros.
    55 *
    6  * Copyright (c) 2007 knut st. osmundsen <[email protected]>
     6 * Copyright (c) 2007-2008 knut st. osmundsen <[email protected]>
    77 *
    88 *
     
    143143/** 64-bit MIPS. */
    144144#define K_ARCH_MIPS_64          (10 | K_ARCH_BIT_64 | K_ARCH_END_BI)
     145/** 32-bit PA-RISC. */
     146#define K_ARCH_PARISC_32        (11 | K_ARCH_BIT_32 | K_ARCH_END_BI)
     147/** 64-bit PA-RISC. */
     148#define K_ARCH_PARISC_64        (12 | K_ARCH_BIT_64 | K_ARCH_END_BI)
    145149/** 32-bit PowerPC. */
    146 #define K_ARCH_POWERPC_32       (11 | K_ARCH_BIT_32 | K_ARCH_END_BI)
     150#define K_ARCH_POWERPC_32       (13 | K_ARCH_BIT_32 | K_ARCH_END_BI)
    147151/** 64-bit PowerPC. */
    148 #define K_ARCH_POWERPC_64       (12 | K_ARCH_BIT_64 | K_ARCH_END_BI)
     152#define K_ARCH_POWERPC_64       (14 | K_ARCH_BIT_64 | K_ARCH_END_BI)
     153/** 32(31)-bit S390. */
     154#define K_ARCH_S390_32          (15 | K_ARCH_BIT_32 | K_ARCH_END_BIG)
     155/** 64-bit S390. */
     156#define K_ARCH_S390_64          (16 | K_ARCH_BIT_64 | K_ARCH_END_BIG)
    149157/** 32-bit SPARC. */
    150 #define K_ARCH_SPARC_32         (13 | K_ARCH_BIT_32 | K_ARCH_END_BIG)
     158#define K_ARCH_SPARC_32         (17 | K_ARCH_BIT_32 | K_ARCH_END_BIG)
    151159/** 64-bit SPARC. */
    152 #define K_ARCH_SPARC_64         (14 | K_ARCH_BIT_64 | K_ARCH_END_BI)
     160#define K_ARCH_SPARC_64         (18 | K_ARCH_BIT_64 | K_ARCH_END_BI)
    153161/** The end of the valid architecture values (exclusive). */
    154 #define K_ARCH_MAX              (15)
     162#define K_ARCH_MAX              (19)
    155163/** @} */
    156164
     
    161169#ifndef K_ARCH
    162170  /* detection based on compiler defines. */
    163 # if defined(__amd64__) || defined(__x86_64__) || defined(__AMD64__) || defined(_M_X64)
     171# if defined(__amd64__) || defined(__x86_64__) || defined(__AMD64__) || defined(_M_X64) || defined(__amd64)
    164172#  define K_ARCH    K_ARCH_AMD64
    165 # elif defined(__i386__) || defined(__x86__) || defined(__X86__) || defined(_M_IX86)
     173# elif defined(__i386__) || defined(__x86__) || defined(__X86__) || defined(_M_IX86) || defined(__i386)
    166174#  define K_ARCH    K_ARCH_X86_32
    167175# elif defined(__ia64__) || defined(__IA64__) || defined(_M_IA64)
    168176#  define K_ARCH    K_ARCH_IA64
     177# elif defined(__alpha__)
     178#  define K_ARCH    K_ARCH_ALPHA
     179# elif defined(__arm__) || defined(__arm32__)
     180#  define K_ARCH    K_ARCH_ARM_32
     181# elif defined(__hppa__) && defined(__LP64__)
     182#  define K_ARCH    K_ARCH_PARISC_64
     183# elif defined(__hppa__)
     184#  define K_ARCH    K_ARCH_PARISC_32
     185# elif defined(__mips64)
     186#  define K_ARCH    K_ARCH_MIPS_64
     187# elif defined(__mips__)
     188#  define K_ARCH    K_ARCH_MIPS_32
     189# elif defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__)
     190#  define K_ARCH    K_ARCH_POWERPC_64
     191# elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)
     192#  define K_ARCH    K_ARCH_POWERPC_32
     193# elif defined(__sparcv9__) || defined(__sparcv9)
     194#  define K_ARCH    K_ARCH_SPARC_64
     195# elif defined(__sparc__) || defined(__sparc)
     196#  define K_ARCH    K_ARCH_SPARC_32
     197# elif defined(__s390x__)
     198#  define K_ARCH    K_ARCH_S390_64
     199# elif defined(__s390__)
     200#  define K_ARCH    K_ARCH_S390_32
    169201# else
    170202#  error "Port Me"
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