Title: [262389] trunk/Source/_javascript_Core
Revision
262389
Author
mark....@apple.com
Date
2020-06-01 12:35:53 -0700 (Mon, 01 Jun 2020)

Log Message

x86.rb's LabelReference.x86LoadOperand()'s address operand should be a pointer type.
https://bugs.webkit.org/show_bug.cgi?id=212603

Reviewed by Saam Barati.

The current implementation mistakenly sets the address type to that of the value
being loaded.  I encountered this issue when I was trying to do a loadb from a
global address.  Because of this bug, the emitted code was trying do a load using
%al (8 byte register) as the pointer to load from.  With this fix, it now loads
from %rax.

* offlineasm/x86.rb:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (262388 => 262389)


--- trunk/Source/_javascript_Core/ChangeLog	2020-06-01 18:42:47 UTC (rev 262388)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-06-01 19:35:53 UTC (rev 262389)
@@ -1,3 +1,18 @@
+2020-06-01  Mark Lam  <mark....@apple.com>
+
+        x86.rb's LabelReference.x86LoadOperand()'s address operand should be a pointer type.
+        https://bugs.webkit.org/show_bug.cgi?id=212603
+
+        Reviewed by Saam Barati.
+
+        The current implementation mistakenly sets the address type to that of the value
+        being loaded.  I encountered this issue when I was trying to do a loadb from a
+        global address.  Because of this bug, the emitted code was trying do a load using
+        %al (8 byte register) as the pointer to load from.  With this fix, it now loads
+        from %rax.
+
+        * offlineasm/x86.rb:
+
 2020-06-01  Yusuke Suzuki  <ysuz...@apple.com>
 
         [JSC] JSValue::toThis should not throw exception

Modified: trunk/Source/_javascript_Core/offlineasm/x86.rb (262388 => 262389)


--- trunk/Source/_javascript_Core/offlineasm/x86.rb	2020-06-01 18:42:47 UTC (rev 262388)
+++ trunk/Source/_javascript_Core/offlineasm/x86.rb	2020-06-01 19:35:53 UTC (rev 262389)
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2018 Apple Inc. All rights reserved.
+# Copyright (C) 2012-2020 Apple Inc. All rights reserved.
 # Copyright (C) 2013 Digia Plc. and/or its subsidiary(-ies)
 #
 # Redistribution and use in source and binary forms, with or without
@@ -447,7 +447,7 @@
         else
             $asm.puts "lea #{dst.x86Operand(:ptr)}, #{asmLabel}"
         end
-        "#{offset}(#{dst.x86Operand(kind)})"
+        "#{offset}(#{dst.x86Operand(:ptr)})"
     end
 end
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to