Fixing stack size.

This commit is contained in:
Ben Vanik
2014-01-26 03:54:50 -08:00
parent 20c8eb1561
commit 51ae8299d9
3 changed files with 4 additions and 3 deletions

View File

@@ -216,7 +216,7 @@ void X64CodeChunk::AddTableEntry(uint8_t* code, size_t code_size) {
// TODO(benvanik): take as parameters?
bool has_prolog = false;
uint8_t prolog_size = 4;
uint8_t stack_bytes = 16;
uint8_t stack_bytes = 64;
// http://msdn.microsoft.com/en-us/library/ddssxxy8.aspx
UNWIND_INFO* unwind_info = (UNWIND_INFO*)(buffer + unwind_info_offset);
@@ -231,7 +231,7 @@ void X64CodeChunk::AddTableEntry(uint8_t* code, size_t code_size) {
auto& code_0 = unwind_info->UnwindCode[0];
code_0.CodeOffset = 4; // end of instruction + 1 == offset of next instruction
code_0.UnwindOp = UWOP_ALLOC_SMALL;
code_0.OpInfo = stack_bytes;
code_0.OpInfo = stack_bytes / 8 - 1;
XEASSERT(stack_bytes < 128);
// Add entry.