mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2025-02-01 14:11:28 +00:00
1568196e27
Updated to latest recommended build settings, increased deployment target to 10.7 Further tweaks to Xcode project Now works as well as possible in Xcode 11 Figured out method of referencing GLSL generated C files outside of code directory Update README.md Add C syntax highlighting to readme Simplify glsl -> C stringification Make LCC path resolution more robust GitHub Actions setup Remove old CI system configurations Add status badge to README Fix shader stringify Run apt-get update before installing deps Avoid platform sed differences Run actions on pull request too Use `r_texturemode GL_LINEAR_MIPMAP_LINEAR` by default [sdl] Turn tentative definition into actual definition. Add TOOLS_CFLAGS to build preamble Fix use of TOOLS_CC being reported as CC Use the correct compiler for tools when cross building under cygwin Allow using pulseaudio for SDL audio capture Restore bots crushing unseen player on q3tourney6 in non-CTF Fix the number of weights in the IQM model calculation Fixes a crash when compiling the project on windows in 64 bit mode.
69 lines
2.1 KiB
NASM
69 lines
2.1 KiB
NASM
; ===========================================================================
|
|
; Copyright (C) 2011 Thilo Schulz <thilo@tjps.eu>
|
|
;
|
|
; This file is part of Quake III Arena source code.
|
|
;
|
|
; Quake III Arena source code is free software; you can redistribute it
|
|
; and/or modify it under the terms of the GNU General Public License as
|
|
; published by the Free Software Foundation; either version 2 of the License,
|
|
; or (at your option) any later version.
|
|
;
|
|
; Quake III Arena source code is distributed in the hope that it will be
|
|
; useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
; GNU General Public License for more details.
|
|
;
|
|
; You should have received a copy of the GNU General Public License
|
|
; along with Quake III Arena source code; if not, write to the Free Software
|
|
; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
; ===========================================================================
|
|
|
|
; Call wrapper for vm_x86 when built with MSVC in 64 bit mode,
|
|
; since MSVC does not support inline x64 assembler code anymore.
|
|
;
|
|
; assumes __fastcall calling convention
|
|
|
|
.code
|
|
|
|
; Call to compiled code after setting up the register environment for the VM
|
|
; prototype:
|
|
; uint8_t qvmcall64(int *programStack, int *opStack, intptr_t *instructionPointers, byte *dataBase);
|
|
|
|
qvmcall64 PROC
|
|
push r12 ; push all non-volatile registers to stack
|
|
push r13
|
|
push r14
|
|
push r15
|
|
push rdi
|
|
push rsi
|
|
push rbx
|
|
push rbp
|
|
|
|
; need to save pointer in rcx so we can write back the programData value to caller
|
|
push rcx
|
|
|
|
; registers r8 and r9 have correct value already thanx to __fastcall
|
|
xor rbx, rbx ; opStackOfs starts out being 0
|
|
mov rdi, rdx ; opStack
|
|
mov esi, dword ptr [rcx] ; programStack
|
|
|
|
call qword ptr [r8] ; instructionPointers[0] is also the entry point
|
|
|
|
pop rcx
|
|
|
|
mov dword ptr [rcx], esi ; write back the programStack value
|
|
mov al, bl ; return opStack offset
|
|
|
|
pop rbp ; restore all non-volatile registers after the call
|
|
pop rbx
|
|
pop rsi
|
|
pop rdi
|
|
pop r15
|
|
pop r14
|
|
pop r13
|
|
pop r12
|
|
|
|
ret
|
|
qvmcall64 ENDP
|
|
|
|
end
|