MASK_REG in EmitMovEDXStack would incorrectly emit asm if 'andit' was 0.
'andit' would never be 0 though so it wasn't causing issues.
Found by Coverity.
When the engine is compiled with Clang it appears that the return value
is being written to the WRONG address, either due to the vm_ variables being
changed (unexpectedly) elsewhere, or as a result of bad assembly assumptions;
having a stack variable pointing to where to write the return value seems
to do the trick.
This fixes the case where, for a trap_Register()-like call, weird numbers
are being returned when, during the process, an error message is printed
(which in Tremulous results in a QVM call and (nested) system call).
Fix passing args[11] to args[15] from vm to engine on ppc64 and sparc64. Some of the args are used by game bot prediction syscalls. May have been causing bugs. Note: This was fixed for x86_64 in r2163.
- Add opStack protection
- Fix dataMask check for OP_BLOCK_COPY
- Add instruction number check for conditional jumps
- Make errors in VM_PrepareInterpreter nonfatal
- Clean up ftol()/snapvector() mess
- Make use of SSE instructions for ftol()/snapvector() if available
- move ftol/snapvector pure assembler to inline assembler, this will add x86_64 and improve support for different calling conventions
- Set FPU control word at program startup to get consistent behaviour on all platforms
- Add a third pass to VM compilation for computation of jump address offsets, removing the need to dereference into vm->instructionPointers[] for every call/jump
- Make use of 0F opcode prefix relative jumps
- Call Com_Memcpy for OP_BLOCK_COPY
- Fix several missing range checks for vm->dataBase memory access
- Replace various malloc() with Z_Malloc
- Fix several memory leaks when VM compilation failed and Com_Error is called
- Make failed mmap/VirtualAlloc/malloc calls fatal
* Updated TODO
* Moved ChangeLog to root
* Updated ChangeLog
* s/Foobar/Quake III Arena Source Code/
* Biggest patch EVAR. I wonder how many mail boxes this will fill...
* Removed HAVE_VM_NATIVE
* Removed DLL_ONLY
* Replace HAVE_VM_COMPILED with NO_VM_COMPILED -- this means the JIT compiler
should be enabled on the OS X and VC builds now
* Remove the remainder of the freetype building stuff