Title: [248213] releases/WebKitGTK/webkit-2.24/Source/_javascript_Core
- Revision
- 248213
- Author
- [email protected]
- Date
- 2019-08-03 20:22:22 -0700 (Sat, 03 Aug 2019)
Log Message
Merge r242215 - cloop.rb shift mask should depend on the word size being shifted.
https://bugs.webkit.org/show_bug.cgi?id=195181
<rdar://problem/48484164>
Reviewed by Yusuke Suzuki.
Previously, we're always masking the shift amount with 0x1f. This is only correct
for 32-bit words. For 64-bit words, the mask should be 0x3f. For pointer sized
shifts, the mask depends on sizeof(uintptr_t).
* offlineasm/cloop.rb:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog (248212 => 248213)
--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog 2019-08-04 03:22:21 UTC (rev 248212)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog 2019-08-04 03:22:22 UTC (rev 248213)
@@ -1,3 +1,17 @@
+2019-02-28 Mark Lam <[email protected]>
+
+ cloop.rb shift mask should depend on the word size being shifted.
+ https://bugs.webkit.org/show_bug.cgi?id=195181
+ <rdar://problem/48484164>
+
+ Reviewed by Yusuke Suzuki.
+
+ Previously, we're always masking the shift amount with 0x1f. This is only correct
+ for 32-bit words. For 64-bit words, the mask should be 0x3f. For pointer sized
+ shifts, the mask depends on sizeof(uintptr_t).
+
+ * offlineasm/cloop.rb:
+
2019-02-23 Michael Catanzaro <[email protected]>
Unreviewed, fix -Wunused-param warning
Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/offlineasm/cloop.rb (248212 => 248213)
--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/offlineasm/cloop.rb 2019-08-04 03:22:21 UTC (rev 248212)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/offlineasm/cloop.rb 2019-08-04 03:22:22 UTC (rev 248213)
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2018 Apple Inc. All rights reserved.
+# Copyright (C) 2012-2019 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -426,7 +426,12 @@
truncationHeader = ""
truncationFooter = ""
end
- $asm.putc "#{dst.clLValue(type)} = #{truncationHeader}#{operands[1].clValue(type)} #{operator} (#{operands[0].clValue(:int)} & 0x1f)#{truncationFooter};"
+ # FIXME: rename :int to :intptr to be match their expected names from C++. Ditto for :uint.
+ # https://bugs.webkit.org/show_bug.cgi?id=195183
+ shiftMask = "((sizeof(uintptr_t) == 8) ? 0x3f : 0x1f)" if type == :int || type == :uint
+ shiftMask = "0x3f" if type == :int64 || type == :uint64
+ shiftMask = "0x1f" if type == :int32 || type == :uint32
+ $asm.putc "#{dst.clLValue(type)} = #{truncationHeader}#{operands[1].clValue(type)} #{operator} (#{operands[0].clValue(:int)} & #{shiftMask})#{truncationFooter};"
end
def cloopEmitUnaryOperation(operands, type, operator)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes