1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-22 23:29:29 +08:00

add: migrate source code of luahook

This commit is contained in:
0O0o0oOoO00
2025-11-01 00:23:46 +08:00
parent 753e676152
commit 41505d6e91
520 changed files with 154475 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#include "platform_detect_macro.h"
#if defined(TARGET_ARCH_IA32)
#include "MemoryAllocator/CodeBuffer/code-buffer-x86.h"
void CodeBuffer::Emit32(int32_t data) {
ensureCapacity(GetBufferSize() + sizeof(int32_t));
*reinterpret_cast<int32_t *>(getCursor()) = data;
buffer_cursor += sizeof(int32_t);
return;
}
void CodeBuffer::FixBindLabel(int offset, int32_t disp) {
*reinterpret_cast<uint32_t *>(buffer + offset) = disp;
return;
}
#endif