Title: [192348] trunk/Source/_javascript_Core
Revision
192348
Author
benja...@webkit.org
Date
2015-11-11 21:19:40 -0800 (Wed, 11 Nov 2015)

Log Message

[JSC] Add a comment explaining the opcode suffixes on x86
https://bugs.webkit.org/show_bug.cgi?id=151176

Patch by Benjamin Poulain <bpoul...@apple.com> on 2015-11-11
Reviewed by Alex Christensen.

* assembler/X86Assembler.h:
I was always confused with the prefixes. Gavin pointed out the Intel documentation
explains everything.
I added a comment to help the next person confused about those suffixes.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (192347 => 192348)


--- trunk/Source/_javascript_Core/ChangeLog	2015-11-12 05:12:20 UTC (rev 192347)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-11-12 05:19:40 UTC (rev 192348)
@@ -1,5 +1,17 @@
 2015-11-11  Benjamin Poulain  <bpoul...@apple.com>
 
+        [JSC] Add a comment explaining the opcode suffixes on x86
+        https://bugs.webkit.org/show_bug.cgi?id=151176
+
+        Reviewed by Alex Christensen.
+
+        * assembler/X86Assembler.h:
+        I was always confused with the prefixes. Gavin pointed out the Intel documentation
+        explains everything.
+        I added a comment to help the next person confused about those suffixes.
+
+2015-11-11  Benjamin Poulain  <bpoul...@apple.com>
+
         [JSC] Support Doubles with B3's Add
         https://bugs.webkit.org/show_bug.cgi?id=151164
 

Modified: trunk/Source/_javascript_Core/assembler/X86Assembler.h (192347 => 192348)


--- trunk/Source/_javascript_Core/assembler/X86Assembler.h	2015-11-12 05:12:20 UTC (rev 192347)
+++ trunk/Source/_javascript_Core/assembler/X86Assembler.h	2015-11-12 05:19:40 UTC (rev 192348)
@@ -169,6 +169,22 @@
     } Condition;
 
 private:
+    // OneByteOpcodeID defines the bytecode for 1 byte instruction. It also contains the prefixes
+    // for two bytes instructions.
+    // TwoByteOpcodeID, ThreeByteOpcodeID define the opcodes for the multibytes instructions.
+    //
+    // The encoding for each instruction can be found in the Intel Architecture Manual in the appendix
+    // "Opcode Map."
+    //
+    // Each opcode can have a suffix describing the type of argument. The full list of suffixes is
+    // in the "Key to Abbreviations" section of the "Opcode Map".
+    // The most common argument types are:
+    //     -E: The argument is either a GPR or a memory address.
+    //     -G: The argument is a GPR.
+    //     -I: The argument is an immediate.
+    // The most common sizes are:
+    //     -v: 32 or 64bit depending on the operand-size attribute.
+    //     -z: 32bit in both 32bit and 64bit mode. Common for immediate values.
     typedef enum {
         OP_ADD_EvGv                     = 0x01,
         OP_ADD_GvEv                     = 0x03,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to