mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Add support for aarch64 / apple silicon
This commit is contained in:
parent
ce79101cb3
commit
e981fd2cc3
8 changed files with 20 additions and 5 deletions
|
|
@ -34,21 +34,29 @@ static MRandomLCG sgPlatRandom;
|
|||
|
||||
U32 Platform::getMathControlState()
|
||||
{
|
||||
#ifdef TORQUE_CPU_X86
|
||||
U16 cw;
|
||||
asm("fstcw %0" : "=m" (cw) :);
|
||||
return cw;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Platform::setMathControlState(U32 state)
|
||||
{
|
||||
#ifdef TORQUE_CPU_X86
|
||||
U16 cw = state;
|
||||
asm("fldcw %0" : : "m" (cw));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Platform::setMathControlStateKnown()
|
||||
{
|
||||
#ifdef TORQUE_CPU_X86
|
||||
U16 cw = 0x27F;
|
||||
asm("fldcw %0" : : "m" (cw));
|
||||
#endif
|
||||
}
|
||||
|
||||
//--------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue