diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-11-24 23:06:55 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-11-24 23:06:55 -0800 |
commit | 732cf4e7cc05f00473663855271ec9b6a07d0196 (patch) | |
tree | 103cc5913d7b482342a1ec28e251523378ddddc8 /subx/018jump_disp16.cc | |
parent | a8f47b4a640375af3c949b0347edadf12a8ff579 (diff) | |
download | mu-732cf4e7cc05f00473663855271ec9b6a07d0196.tar.gz |
4773 - done with crenshaw chapter 2-1
In the process I had to fix a couple more bugs in support for disp16 instructions.
Diffstat (limited to 'subx/018jump_disp16.cc')
-rw-r--r-- | subx/018jump_disp16.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/subx/018jump_disp16.cc b/subx/018jump_disp16.cc index c22fbce4..38ac82ac 100644 --- a/subx/018jump_disp16.cc +++ b/subx/018jump_disp16.cc @@ -49,7 +49,7 @@ put_new(Name_0f, "84", "jump disp16 bytes away if equal, if ZF is set (jcc/jz/je :(before "End Two-Byte Opcodes Starting With 0f") case 0x84: { // jump rel16 if ZF - const int8_t offset = imm16(); + const int16_t offset = imm16(); if (ZF) { trace(90, "run") << "jump " << NUM(offset) << end(); EIP += offset; @@ -88,7 +88,7 @@ put_new(Name_0f, "85", "jump disp16 bytes away if not equal, if ZF is not set (j :(before "End Two-Byte Opcodes Starting With 0f") case 0x85: { // jump rel16 unless ZF - const int8_t offset = imm16(); + const int16_t offset = imm16(); if (!ZF) { trace(90, "run") << "jump " << NUM(offset) << end(); EIP += offset; @@ -129,7 +129,7 @@ put_new(Name_0f, "8f", "jump disp16 bytes away if greater, if ZF is unset and SF :(before "End Two-Byte Opcodes Starting With 0f") case 0x8f: { // jump rel16 if !SF and !ZF - const int8_t offset = imm16(); + const int16_t offset = imm16(); if (!ZF && SF == OF) { trace(90, "run") << "jump " << NUM(offset) << end(); EIP += offset; @@ -171,7 +171,7 @@ put_new(Name_0f, "8d", "jump disp16 bytes away if greater or equal, if SF == OF :(before "End Two-Byte Opcodes Starting With 0f") case 0x8d: { // jump rel16 if !SF - const int8_t offset = imm16(); + const int16_t offset = imm16(); if (SF == OF) { trace(90, "run") << "jump " << NUM(offset) << end(); EIP += offset; @@ -213,7 +213,7 @@ put_new(Name_0f, "8c", "jump disp16 bytes away if lesser, if SF != OF (jcc/jl/jn :(before "End Two-Byte Opcodes Starting With 0f") case 0x8c: { // jump rel16 if SF and !ZF - const int8_t offset = imm16(); + const int16_t offset = imm16(); if (SF != OF) { trace(90, "run") << "jump " << NUM(offset) << end(); EIP += offset; @@ -270,7 +270,7 @@ put_new(Name_0f, "8e", "jump disp16 bytes away if lesser or equal, if ZF is set :(before "End Two-Byte Opcodes Starting With 0f") case 0x8e: { // jump rel16 if SF or ZF - const int8_t offset = imm16(); + const int16_t offset = imm16(); if (ZF || SF != OF) { trace(90, "run") << "jump " << NUM(offset) << end(); EIP += offset; |