Add architecture guards to VMs

This commit is contained in:
Tim Angus 2025-08-07 14:21:29 +01:00
parent 2c91b38899
commit 858ccc928c
4 changed files with 17 additions and 1 deletions

View File

@ -30,6 +30,8 @@ http://www.heyrick.co.uk/armwiki/Category:Opcodes
ARMv7-A_ARMv7-R_DDI0406_2007.pdf
*/
#ifdef __arm__
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/time.h>
@ -1220,3 +1222,5 @@ int VM_CallCompiled(vm_t *vm, int *args)
return retVal;
}
#endif // __arm__

View File

@ -20,6 +20,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
#if defined(powerc) || defined(powerpc) || defined(__powerpc__) || \
defined(ppc) || defined(__ppc) || defined(__ppc__) || \
defined(__powerpc64__) || defined(__ppc64__)
#include <sys/types.h> /* needed by sys/mman.h on OSX */
#include <sys/mman.h>
#include <sys/time.h>
@ -3233,3 +3238,5 @@ VM_CallCompiled( vm_t *vm, int *args )
return retVal;
}
#endif // powerpc

View File

@ -20,6 +20,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
#if defined(__sparc) || defined(__sparc__)
/* This code is based almost entirely upon the vm_powerpc.c code by
* Przemyslaw Iskra. All I did was make it work on Sparc :-) -DaveM
*/
@ -1741,3 +1743,5 @@ int VM_CallCompiled(vm_t *vm, int *args)
return retVal;
}
#endif // sparc

View File

@ -21,6 +21,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// vm_x86.c -- load time compiler and execution environment for x86
#if defined (__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)
#include "vm_local.h"
#ifdef _WIN32
@ -42,7 +44,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#endif
#if defined (__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)
static void VM_Destroy_Compiled(vm_t* self);
/*