VirtualBox

Changeset 104212 in vbox


Ignore:
Timestamp:
Apr 7, 2024 4:27:42 PM (8 months ago)
Author:
vboxsync
Message:

include/iprt,VMM/IEMAllN8veHlpA-arm64.S: Introduce a new asmdefs-arm.mac which contains macros for assembly code hiding differences between gcc and llvm, make use of it in IEMAllN8veHlpA-arm64.S to make it build with gcc on linux.arm64. Also, gcc doesn't like ; style comments, bugref:10391

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/.scm-settings

    r103790 r104212  
    112112/iprt/sanitized/*: --guard-relative-to-dir iprt --guard-prefix IPRT_INCLUDED_ --treat-as h
    113113
     114# /iprt/asmdefs-arm.mac needs to be treated as an C/C++ header file
     115/iprt/asmdefs-arm.mac: --guard-relative-to-dir iprt --guard-prefix IPRT_INCLUDED_ --treat-as h
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veHlpA-arm64.S

    r103636 r104212  
    3030*       Header Files                                                                                                             *
    3131*********************************************************************************************************************************/
    32 #include <iprt/asmdefs-arm.h>
    33 #include <iprt/x86.h>
     32#include <iprt/asmdefs-arm.mac>
    3433
    3534
     
    5453 *       it ourselves, I think.
    5554 */
    56         .p2align        2
    57         .private_extern NAME(iemNativeTbLongJmp)
    58         .globl          NAME(iemNativeTbLongJmp)
    59 NAME(iemNativeTbLongJmp):
    60 
    61         ;
    62         ; This must exactly match what iemNativeEmitEpilog does.
    63         ;
     55BEGINPROC_HIDDEN iemNativeTbLongJmp
     56        /*
     57         * This must exactly match what iemNativeEmitEpilog does.
     58         */
    6459        sub     sp, x0, #0x50
    6560        ldp     x19, x20, [sp, #0x00]
     
    8277#define IEMNATIVE_HLP_FRAME_SIZE (11 * 16)
    8378
    84 ;;
    85 ; This is wrapper function that saves and restores all volatile registers
    86 ; so the impact of inserting LogCpuState is minimal to the other TB code.
    87 ;
    88         .p2align        2
    89         .private_extern NAME(iemNativeHlpAsmSafeWrapLogCpuState)
    90         .globl          NAME(iemNativeHlpAsmSafeWrapLogCpuState)
    91 NAME(iemNativeHlpAsmSafeWrapLogCpuState):
     79/**
     80 * This is wrapper function that saves and restores all volatile registers
     81 * so the impact of inserting LogCpuState is minimal to the other TB code.
     82 */
     83BEGINPROC_HIDDEN iemNativeHlpAsmSafeWrapLogCpuState
    9284#ifdef RT_OS_DARWIN
    9385        pacibsp
    9486#endif
    9587
    96         ;
    97         ; Save all volatile registers.
    98         ;
     88        /*
     89         * Save all volatile registers.
     90         */
    9991        stp     x29, x30, [sp, #-IEMNATIVE_HLP_FRAME_SIZE]!
    10092        stp      x0,  x1, [sp, #( 1 * 16)]
     
    109101        stp     x17, x18, [sp, #(10 * 16)]
    110102
    111         ;
    112         ; Move the pVCpu pointer from the fixed register to the first argument.
    113         ; @todo This needs syncing with what we use in IEMN8veRecompiler.h
    114         ;       but we can't include that header right now, would need some #ifndef IN_ASM_CODE...
    115         ;       in the header or splitting up the header into a asm safe one and a one included from C/C++.
    116         ;
     103        /*
     104         * Move the pVCpu pointer from the fixed register to the first argument.
     105         * @todo This needs syncing with what we use in IEMN8veRecompiler.h
     106         *       but we can't include that header right now, would need some #ifndef IN_ASM_CODE...
     107         *       in the header or splitting up the header into a asm safe one and a one included from C/C++.
     108         */
    117109        mov      x0, x28
    118110
    119         ;
    120         ; Call C function to do the actual work.
    121         ;
     111        /*
     112         * Call C function to do the actual work.
     113         */
    122114        bl      NAME(iemThreadedFunc_BltIn_LogCpuStateWorker)
    123115
    124         ;
    125         ; Restore volatile registers and return to the TB code.
    126         ;
     116        /*
     117         * Restore volatile registers and return to the TB code.
     118         */
    127119        ldp    x29, x30, [sp, #( 0 * 16)]
    128120        ldp     x0,  x1, [sp, #( 1 * 16)]
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