Add files to repository

This commit is contained in:
Alec Murphy 2025-06-09 20:06:04 -04:00
parent 9f200c9084
commit 23d704d496
542 changed files with 75775 additions and 0 deletions

44
System/MakeSystem.HC Normal file
View file

@ -0,0 +1,44 @@
/* clang-format off */
WinMax;
AutoComplete(0);
U0 @patch_call_rel32(U32 from, U32 to)
{
*(from(U8*)) = 0xE8;
*((from + 1)(I32*)) = to - from - 5;
}
U0 @patch_jmp_rel32(U32 from, U32 to)
{
*(from(U8*)) = 0xE9;
*((from + 1)(I32*)) = to - from - 5;
}
U0 @sse_enable()
{
/* clang-format off */
asm
{
MOV_EAX_CR0
AND AX, 0xFFFB // clear coprocessor emulation CR0.EM
OR AX, 0x2 // set coprocessor monitoring CR0.MP
MOV_CR0_EAX
MOV_EAX_CR4
OR AX, 3 << 9 // set CR4.OSFXSR and CR4.OSXMMEXCPT at the same time
MOV_CR4_EAX
}
/* clang-format on */
}
@sse_enable;
// FFI support files
#include "FFI/Base";
#include "FFI/LibC";
#include "FFI/ELF64";
// LibTemple support files
#include "LibTemple/OS";
/* clang-format on */