Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

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

Fixes #25301.
  • Loading branch information
AndyAyersMS committed Jun 21, 2019
1 parent d1e7ef0 commit e31c78b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 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 e31c78b

Please sign in to comment.