x86 disassembler confuses immediates with addresses
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2012 21:45:08 +0000 (21:45 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2012 21:45:08 +0000 (21:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90099

Reviewed by Mark Hahnenberg.

Prepend "$" to immediates to disambiguate between immediates and addresses. This is in
accordance with the gas and AT&T syntax.

* disassembler/udis86/udis86_syn-att.c:
(gen_operand):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121374 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/disassembler/udis86/udis86_syn-att.c

index b74cef7..88dc4d0 100644 (file)
@@ -1,5 +1,18 @@
 2012-06-27  Filip Pizlo  <fpizlo@apple.com>
 
+        x86 disassembler confuses immediates with addresses
+        https://bugs.webkit.org/show_bug.cgi?id=90099
+
+        Reviewed by Mark Hahnenberg.
+        
+        Prepend "$" to immediates to disambiguate between immediates and addresses. This is in
+        accordance with the gas and AT&T syntax.
+
+        * disassembler/udis86/udis86_syn-att.c:
+        (gen_operand):
+
+2012-06-27  Filip Pizlo  <fpizlo@apple.com>
+
         Add a comment clarifying Options::showDisassembly versus Options::showDFGDisassembly.
 
         Rubber stamped by Mark Hahnenberg.
index 132d6ff..155a34c 100644 (file)
@@ -109,7 +109,7 @@ gen_operand(struct ud* u, struct ud_operand* op)
         }
         if ( sext_size < 64 )
             sext_mask = ( 1ull << sext_size ) - 1;
-        mkasm( u, "0x" FMT64 "x", imm & sext_mask ); 
+        mkasm( u, "$0x" FMT64 "x", imm & sext_mask ); 
 
                break;
     }