Improvements to code and stack limit checks (still not perfect, but better)

This commit is contained in:
Jeff Parsons 2015-05-21 15:45:26 -07:00 committed by jeffpar
commit cfd02bb4ae
4 changed files with 138 additions and 74 deletions

View file

@ -853,6 +853,9 @@ X86Seg.prototype.switchTSS = function switchTSS(selNew, fNest)
* but the CS base must be set to 0x00FF0000 or 0xFFFF0000, respectively. To simplify life for setBase()
* callers, we allow them to specify 32-bit bases, which we then truncate to 24 bits as needed.
*
* WARNING: Since the CPU must maintain regLIP as the sum of the CS base and the current IP, all calls
* to segCS.setBase() need to go through setCSBase().
*
* @this {X86Seg}
* @param {number} addr
* @return {number} addr, truncated as needed