Browse Source

test pushf manually

Fabian 1 year ago
parent
commit
6b91f91c45
2 changed files with 14 additions and 2 deletions
  1. 2 2
      gen/x86_table.js
  2. 12 0
      tests/nasm/pushf.asm

+ 2 - 2
gen/x86_table.js

@@ -203,8 +203,8 @@ const encodings = [
     { opcode: 0x99, os: 1, custom: 1 },
     { opcode: 0x9A, os: 1, imm1632: 1, extra_imm16: 1, skip: 1, block_boundary: 1, }, // callf
     { opcode: 0x9B, block_boundary: 1, skip: 1, }, // fwait: block_boundary since it uses non-raising cpu exceptions
-    { opcode: 0x9C, os: 1, custom: 1 },
-    { opcode: 0x9D, os: 1, skip: 1, custom: 1, },
+    { opcode: 0x9C, os: 1, custom: 1, skip: 1 }, // pushf
+    { opcode: 0x9D, os: 1, custom: 1, skip: 1 }, // popf
     { opcode: 0x9E, custom: 1 },
     { opcode: 0x9F, custom: 1 },
 

+ 12 - 0
tests/nasm/pushf.asm

@@ -0,0 +1,12 @@
+global _start
+
+%include "header.inc"
+
+    pushf
+    and dword [esp], ~0x0200 ; if
+
+    db 66h
+    pushf
+    and dword [esp], ~0x0200
+
+%include "footer.inc"