VirtualBox

Changeset 71916 in vbox for trunk


Ignore:
Timestamp:
Apr 19, 2018 10:05:28 AM (7 years ago)
Author:
vboxsync
Message:

More fixes for SPARC: No ASM for openssl crypto, add simple memrchr() implementation for VBoxRT, cleanup IN_SUP_R3 usage and only enable for x86 and amd64

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r71840 r71916  
    15741574DEFS.x86         = RT_ARCH_X86 __X86__
    15751575DEFS.amd64       = RT_ARCH_AMD64 __AMD64__
     1576DEFS.sparc32     = RT_ARCH_SPARC
     1577DEFS.sparc64     = RT_ARCH_SPARC64
    15761578DEFS.darwin      = RT_OS_DARWIN __DARWIN__
    15771579DEFS.freebsd     = RT_OS_FREEBSD __FREEBSD__
  • trunk/src/VBox/Runtime/Makefile.kmk

    r71492 r71916  
    263263RuntimeR3_DEFS          = \
    264264        IN_RT_R3 \
    265         IN_SUP_R3 \
    266265        LDR_WITH_NATIVE \
    267266        LDR_WITH_ELF32 \
    268267        LDR_WITH_PE \
    269268        RT_WITH_VBOX \
    270         RT_NO_GIP \
     269        RT_NO_GIP \
    271270        RT_WITHOUT_NOCRT_WRAPPERS \
    272        IPRT_WITH_OPENSSL \
    273        NOFILEID
     271        IPRT_WITH_OPENSSL \
     272        NOFILEID
     273if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
     274 RuntimeR3_DEFS         += \
     275        IN_SUP_R3
     276endif
    274277#RuntimeR3_DEFS         += RTMEM_WRAP_TO_EF_APIS
    275278ifdef IPRT_WITH_KSTUFF
     
    13831386        r3/solaris/RTSystemQueryDmiString-solaris.cpp
    13841387RuntimeR3_SOURCES.solaris.sparc32 = \
     1388        common/string/memrchr.cpp \
    13851389        generic/RTSystemQueryDmiString-generic.cpp
    13861390RuntimeR3_SOURCES.solaris.sparc64 = \
     1391        common/string/memrchr.cpp \
    13871392        generic/RTSystemQueryDmiString-generic.cpp
    13881393
     
    16031608endif
    16041609VBoxRT_DEFS                   := $(filter-out RT_NO_GIP, $(RuntimeR3_DEFS)) \
    1605         IN_SUP_R3 IN_SUP_R3 IPRT_WITH_XAR \
     1610        IPRT_WITH_XAR \
    16061611        $(if-expr !defined(VBOX_WITH_ALT_HASH_CODE),IPRT_WITHOUT_SHA512T224 IPRT_WITHOUT_SHA512T256,)
    16071612ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
  • trunk/src/VBox/Runtime/common/asm/asm-fake.cpp

    r71522 r71916  
    55
    66/*
    7  * Copyright (C) 2010-2017 Oracle Corporation
     7 * Copyright (C) 2010-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    139139}
    140140
     141RTDECL(uint32_t) ASMAtomicUoIncU32(uint32_t volatile *pu32)
     142{
     143    return *pu32 += 1;
     144}
     145
    141146RTDECL(uint32_t) ASMAtomicDecU32(uint32_t volatile *pu32)
    142147{
     
    144149}
    145150
     151RTDECL(uint32_t) ASMAtomicUoDecU32(uint32_t volatile *pu32)
     152{
     153    return *pu32 -= 1;
     154}
     155
    146156RTDECL(uint64_t) ASMAtomicIncU64(uint64_t volatile *pu64)
    147157{
     
    159169}
    160170
     171RTDECL(void) ASMAtomicUoOrU32(uint32_t volatile *pu32, uint32_t u32)
     172{
     173    *pu32 |= u32;
     174}
     175
    161176RTDECL(void) ASMAtomicAndU32(uint32_t volatile *pu32, uint32_t u32)
     177{
     178    *pu32 &= u32;
     179}
     180
     181RTDECL(void) ASMAtomicUoAndU32(uint32_t volatile *pu32, uint32_t u32)
    162182{
    163183    *pu32 &= u32;
     
    455475    uint32_t iBit;
    456476    for (iBit = 0; iBit < 64; iBit++)
     477        if (u32 & RT_BIT_64(iBit))
     478            return iBit + 1;
     479    return 0;
     480}
     481
     482RTDECL(unsigned) ASMBitLastSetU64(uint64_t u64)
     483{
     484    int32_t iBit = 64;
     485    while (iBit-- > 0)
    457486        if (u64 & RT_BIT_64(iBit))
    458487            return iBit + 1;
  • trunk/src/VBox/Runtime/testcase/tstRTInlineAsm.cpp

    r71678 r71916  
    18741874    BENCH(ASMAtomicUoAndU32(&s_u32, 0xffffffff), "ASMAtomicUoAndU32");
    18751875    BENCH(ASMAtomicUoOrU32(&s_u32, 0xffffffff),  "ASMAtomicUoOrU32");
     1876#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    18761877    BENCH_TSC(ASMSerializeInstructionCpuId(),    "ASMSerializeInstructionCpuId");
    18771878    BENCH_TSC(ASMSerializeInstructionIRet(),     "ASMSerializeInstructionIRet");
     1879#endif
    18781880
    18791881    /* The Darwin gcc does not like this ... */
  • trunk/src/VBox/Runtime/testcase/tstRTMemSafer.cpp

    r69111 r71916  
    3636#include <iprt/string.h>
    3737#include <iprt/test.h>
    38 #ifdef VBOX
     38#if defined(VBOX) && (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64))
    3939# include <VBox/sup.h>
    4040#endif
     
    149149        return rcExit;
    150150    RTTestBanner(hTest);
    151 #ifdef VBOX
     151#if defined(VBOX) && (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64))
    152152    SUPR3Init(NULL);
    153153#endif
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