Skip to content

Commit

Permalink
JIT: update epilog exit size assert for x86 (dotnet/coreclr#25302)
Browse files Browse the repository at this point in the history
With the advent of dotnet/coreclr#25251 we can now see the epilog exit sequence on x86 vary
by as much as 6 bytes. Update the assert accordingly.

Fixes dotnet/coreclr#25301.

Commit migrated from dotnet/coreclr@e31c78b
  • Loading branch information
AndyAyersMS authored Jun 21, 2019
1 parent 4cf6fb0 commit 430e1b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/coreclr/src/jit/emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2059,9 +2059,10 @@ void emitter::emitEndFnEpilog()
// underestimation of the epilog size is harmless (since the EIP
// can not be between instructions).
assert(emitEpilogCnt == 1 ||
(emitExitSeqSize - newSize) <= 5 // delta between size of various forms of jmp (size is either 6 or 5)
(emitExitSeqSize - newSize) <= 6 // delta between size of various forms of jmp (size is either 6 or 5,
// or a 5 byte mov plus 2 byte jmp)
// and various forms of ret (size is either 1 or 3). The combination can
// be anything been 1 and 5.
// be anything between 1 and 6.
);
emitExitSeqSize = newSize;
}
Expand Down

0 comments on commit 430e1b2

Please sign in to comment.