about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-02-22 11:15:02 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-02-22 11:15:02 +0100
commitbbaa01af79cda0f08e723873500805a16b8c6fa5 (patch)
treebbc613d2bdf2ecd0796bfc5c5c4a157d84a14443 /src
parentd033f34a456edefaac3dfe0e53802ca8c0241706 (diff)
downloadbox64-bbaa01af79cda0f08e723873500805a16b8c6fa5.tar.gz
box64-bbaa01af79cda0f08e723873500805a16b8c6fa5.zip
[INTERPRETER] Added CB opcode
Diffstat (limited to 'src')
-rw-r--r--src/emu/x64run.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/emu/x64run.c b/src/emu/x64run.c
index c51d3566..068dc007 100644
--- a/src/emu/x64run.c
+++ b/src/emu/x64run.c
@@ -1401,6 +1401,18 @@ x64emurun:
             R_RBP = rex.is32bits?Pop32(emu):Pop64(emu);
             break;
 
+        case 0xCB:                      /* FAR RET */
+            if(rex.is32bits) {
+                addr = Pop32(emu);
+                emu->segs[_CS] = Pop32(emu);    // no check, no use....
+            } else {
+                addr = Pop64(emu);
+                emu->segs[_CS] = Pop64(emu);    // no check, no use....
+            }
+            emu->segs_serial[_CS] = 0;
+            // need to check status of CS register!
+            STEP2;
+            break;
         case 0xCC:                      /* INT 3 */
             #ifndef TEST_INTERPRETER
             x64Int3(emu, &addr);