VirtualBox

Changeset 4477 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 1, 2007 7:53:46 AM (17 years ago)
Author:
vboxsync
Message:

Added missing 20h spill area for register arguments. Changed it to use a rbp frame to simplify things. (Hope this doesn't break 64-bit linux...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/VMMR0A.asm

    r4071 r4477  
    66;
    77;  Copyright (C) 2006-2007 innotek GmbH
    8 ; 
     8;
    99;  This file is part of VirtualBox Open Source Edition (OSE), as
    1010;  available from http://www.virtualbox.org. This file is free software;
     
    127127    ; Save the registers.
    128128    ;
    129  %ifdef ASM_CALL64_MSC
     129    push    rbp
     130    mov     rbp, rsp
     131 %ifdef ASM_CALL64_MSC
     132    sub     rsp, 30h
    130133    mov     r11, rdx                    ; pfn
    131134    mov     rdx, rcx                    ; pJmpBuf;
    132135 %else
     136    sub     rsp, 10h
    133137    mov     r8, rdx                     ; pVM (save it like MSC)
    134138    mov     r11, rsi                    ; pfn
     
    140144    mov     [rdx + VMMR0JMPBUF.rdi], rdi
    141145 %endif
    142     mov     [rdx + VMMR0JMPBUF.rbp], rbp
     146    mov     r10, [rbp]
     147    mov     [rdx + VMMR0JMPBUF.rbp], r10
    143148    mov     [rdx + VMMR0JMPBUF.r12], r12
    144149    mov     [rdx + VMMR0JMPBUF.r13], r13
    145150    mov     [rdx + VMMR0JMPBUF.r14], r14
    146151    mov     [rdx + VMMR0JMPBUF.r15], r15
    147     mov     rax, [rsp]
     152    mov     rax, [rbp + 8]
    148153    mov     [rdx + VMMR0JMPBUF.rip], rax
    149     lea     r10, [rsp + 8]              ; (used in resume)
     154    lea     r10, [rbp + 10h]            ; (used in resume)
    150155    mov     [rdx + VMMR0JMPBUF.rsp], r10
    151156
     
    156161    jnz     .resume
    157162
    158     push    rdx                         ; Save it and fix stack alignment (16).
     163    mov     [rbp - 8], rdx              ; Save it and fix stack alignment (16).
    159164 %ifdef ASM_CALL64_MSC
    160165    mov     rcx, r8                     ; pVM -> arg0
     
    163168 %endif
    164169    call    r11
    165     pop     rdx                         ; pJmpBuf
     170    mov     rdx, [rbp - 8]              ; pJmpBuf
    166171    and     qword [rdx + VMMR0JMPBUF.rip], byte 0 ; used for valid check.
     172    leave
    167173    ret
    168174
     
    186192    mov     r15, [rdx + VMMR0JMPBUF.r15]
    187193    mov     eax, VERR_INTERNAL_ERROR    ; todo better return code!
     194    leave
    188195    ret
    189196
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