From cac232a84ec82280d47d24c64709b2565ac94841 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 28 Jan 2011 17:15:57 -0700 Subject: [PATCH] add comments to x86.cpp --- src/x86.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/x86.cpp b/src/x86.cpp index 25d3e85f74..a52fdc5da2 100644 --- a/src/x86.cpp +++ b/src/x86.cpp @@ -2585,13 +2585,12 @@ nextFrame(ArchitectureContext* c UNUSED, uint8_t* start, unsigned size UNUSED, uint8_t* instruction = static_cast(*ip); + // skip stack overflow check, if present: if (BytesPerWord == 4) { if (*start == 0x39) { - // skip stack overflow check start += 11; } } else if (*start == 0x48 and start[1] == 0x39) { - // skip stack overflow check start += 12; } @@ -2611,7 +2610,7 @@ nextFrame(ArchitectureContext* c UNUSED, uint8_t* start, unsigned size UNUSED, } } - if (*instruction == 0xc3) { + if (*instruction == 0xc3) { // return *ip = reinterpret_cast(*stack)[0]; return; } @@ -2625,6 +2624,8 @@ nextFrame(ArchitectureContext* c UNUSED, uint8_t* start, unsigned size UNUSED, - StackAlignmentInWords; } + // check for post-non-tail-call stack adjustment of the form "add + // $offset,%rsp": if (BytesPerWord == 4) { if ((*instruction == 0x83 or *instruction == 0x81) and instruction[1] == 0xec)