Fixing stack size.
This commit is contained in:
parent
20c8eb1561
commit
51ae8299d9
|
@ -60,6 +60,7 @@ void IndirectCallThunk(void* raw_context, uint8_t* membase,
|
||||||
uint64_t target_address) {
|
uint64_t target_address) {
|
||||||
// TODO(benvanik): generate this thunk at runtime? or a shim?
|
// TODO(benvanik): generate this thunk at runtime? or a shim?
|
||||||
auto thread_state = *((ThreadState**)raw_context);
|
auto thread_state = *((ThreadState**)raw_context);
|
||||||
|
XEASSERTALWAYS();
|
||||||
}
|
}
|
||||||
void IssueCallIndirect(X64Emitter& e, Value* target, uint32_t flags) {
|
void IssueCallIndirect(X64Emitter& e, Value* target, uint32_t flags) {
|
||||||
Reg64 r;
|
Reg64 r;
|
||||||
|
|
|
@ -216,7 +216,7 @@ void X64CodeChunk::AddTableEntry(uint8_t* code, size_t code_size) {
|
||||||
// TODO(benvanik): take as parameters?
|
// TODO(benvanik): take as parameters?
|
||||||
bool has_prolog = false;
|
bool has_prolog = false;
|
||||||
uint8_t prolog_size = 4;
|
uint8_t prolog_size = 4;
|
||||||
uint8_t stack_bytes = 16;
|
uint8_t stack_bytes = 64;
|
||||||
|
|
||||||
// http://msdn.microsoft.com/en-us/library/ddssxxy8.aspx
|
// http://msdn.microsoft.com/en-us/library/ddssxxy8.aspx
|
||||||
UNWIND_INFO* unwind_info = (UNWIND_INFO*)(buffer + unwind_info_offset);
|
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];
|
auto& code_0 = unwind_info->UnwindCode[0];
|
||||||
code_0.CodeOffset = 4; // end of instruction + 1 == offset of next instruction
|
code_0.CodeOffset = 4; // end of instruction + 1 == offset of next instruction
|
||||||
code_0.UnwindOp = UWOP_ALLOC_SMALL;
|
code_0.UnwindOp = UWOP_ALLOC_SMALL;
|
||||||
code_0.OpInfo = stack_bytes;
|
code_0.OpInfo = stack_bytes / 8 - 1;
|
||||||
XEASSERT(stack_bytes < 128);
|
XEASSERT(stack_bytes < 128);
|
||||||
|
|
||||||
// Add entry.
|
// Add entry.
|
||||||
|
|
|
@ -120,7 +120,7 @@ int X64Emitter::Emit(HIRBuilder* builder) {
|
||||||
// X64CodeCache, which dynamically generates exception information.
|
// X64CodeCache, which dynamically generates exception information.
|
||||||
// Adding or changing anything here must be matched!
|
// Adding or changing anything here must be matched!
|
||||||
const bool emit_prolog = false;
|
const bool emit_prolog = false;
|
||||||
const size_t stack_size = 16;
|
const size_t stack_size = 64;
|
||||||
if (emit_prolog) {
|
if (emit_prolog) {
|
||||||
sub(rsp, stack_size);
|
sub(rsp, stack_size);
|
||||||
// TODO(benvanik): save registers.
|
// TODO(benvanik): save registers.
|
||||||
|
|
Loading…
Reference in New Issue