Add support for aarch64 / apple silicon

This commit is contained in:
Jeff Hutchinson 2021-05-08 22:18:45 -04:00
parent ce79101cb3
commit e981fd2cc3
8 changed files with 20 additions and 5 deletions

View file

@ -447,7 +447,7 @@ bool CodeBlock::read(StringTableEntry fileName, Stream &st)
{
U32 ip;
st.read(&ip);
#ifdef TORQUE_CPU_X64
#if defined(TORQUE_CPU_X64) || defined(TORQUE_CPU_ARM64)
*(U64*)(code + ip) = (U64)ste;
#else
code[ip] = *((U32 *)&ste);

View file

@ -65,7 +65,7 @@ namespace Compiler
void evalSTEtoCode(StringTableEntry ste, U32 ip, U32 *ptr)
{
#ifdef TORQUE_CPU_X64
#if defined(TORQUE_CPU_X64) || defined(TORQUE_CPU_ARM64)
*(U64*)(ptr) = (U64)ste;
#else
*ptr = (U32)ste;

View file

@ -254,7 +254,7 @@ namespace Compiler
inline StringTableEntry CodeToSTE(U32 *code, U32 ip)
{
#ifdef TORQUE_CPU_X64
#if defined(TORQUE_CPU_X64) || defined(TORQUE_CPU_ARM64)
return (StringTableEntry)(*((U64*)(code + ip)));
#else
return (StringTableEntry)(*(code + ip));