diff --git a/externals/xbyak b/externals/xbyak index d62f6fb2..b633c68b 160000 --- a/externals/xbyak +++ b/externals/xbyak @@ -1 +1 @@ -Subproject commit d62f6fb28f3c7b3fafb201b2ce65b653b547659c +Subproject commit b633c68b53654154699e2780449c47d3049c4420 diff --git a/src/backend_x64/block_of_code.cpp b/src/backend_x64/block_of_code.cpp index 333bc3dc..73a381b7 100644 --- a/src/backend_x64/block_of_code.cpp +++ b/src/backend_x64/block_of_code.cpp @@ -207,45 +207,6 @@ void BlockOfCode::SwitchToNearCode() { SetCodePtr(near_code_ptr); } -void BlockOfCode::nop(size_t size) { - switch (size) { - case 0: - return; - case 1: - db(0x90); - return; - case 2: - db(0x66); db(0x90); - return; - case 3: - db(0x0f); db(0x1f); db(0x00); - return; - case 4: - db(0x0f); db(0x1f); db(0x40); db(0x00); - return; - case 5: - db(0x0f); db(0x1f); db(0x44); db(0x00); db(0x00); - return; - case 6: - db(0x66); db(0x0f); db(0x1f); db(0x44); db(0x00); db(0x00); - return; - case 7: - db(0x0f); db(0x1f); db(0x80); db(0x00); db(0x00); db(0x00); db(0x00); - return; - case 8: - db(0x0f); db(0x1f); db(0x84); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); - return; - case 9: - db(0x66); db(0x0f); db(0x1f); db(0x84); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); - return; - case 10: - default: - db(0x66); db(0x2e); db(0x0f); db(0x1f); db(0x84); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); - nop(size - 10); - return; - } -} - void* BlockOfCode::AllocateFromCodeSpace(size_t alloc_size) { if (size_ + alloc_size >= maxSize_) { throw Xbyak::Error(Xbyak::ERR_CODE_IS_TOO_BIG); diff --git a/src/backend_x64/block_of_code.h b/src/backend_x64/block_of_code.h index e802b56c..f0b16f64 100644 --- a/src/backend_x64/block_of_code.h +++ b/src/backend_x64/block_of_code.h @@ -103,7 +103,6 @@ public: } void int3() { db(0xCC); } - void nop(size_t size = 1); /// Allocate memory of `size` bytes from the same block of memory the code is in. /// This is useful for objects that need to be placed close to or within code.