Title: [200742] trunk/Source/_javascript_Core
Revision
200742
Author
[email protected]
Date
2016-05-11 23:23:19 -0700 (Wed, 11 May 2016)

Log Message

ARMv7Assembler: suppress a -Wnarrowing warning when compiling with GCC
https://bugs.webkit.org/show_bug.cgi?id=157576

Patch by Zan Dobersek <[email protected]> on 2016-05-11
Reviewed by Csaba Osztrogonác.

* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::revertJumpTo_movT3movtcmpT2): Explicitly cast the
`OP_CMP_reg_T2 | left` value to uint16_t, avoiding a narrowing conversion
warning that's being reported when compiling with GCC. The warning is sprung
due to RegisterID (which is the type of `left`) being an enum based on int,
even when the enum itself only declares 23 values.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (200741 => 200742)


--- trunk/Source/_javascript_Core/ChangeLog	2016-05-12 04:35:15 UTC (rev 200741)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-05-12 06:23:19 UTC (rev 200742)
@@ -1,3 +1,17 @@
+2016-05-11  Zan Dobersek  <[email protected]>
+
+        ARMv7Assembler: suppress a -Wnarrowing warning when compiling with GCC
+        https://bugs.webkit.org/show_bug.cgi?id=157576
+
+        Reviewed by Csaba Osztrogonác.
+
+        * assembler/ARMv7Assembler.h:
+        (JSC::ARMv7Assembler::revertJumpTo_movT3movtcmpT2): Explicitly cast the
+        `OP_CMP_reg_T2 | left` value to uint16_t, avoiding a narrowing conversion
+        warning that's being reported when compiling with GCC. The warning is sprung
+        due to RegisterID (which is the type of `left`) being an enum based on int,
+        even when the enum itself only declares 23 values.
+
 2016-05-11  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: `this` in Scope Chain Sidebar does not have preview, looks poor

Modified: trunk/Source/_javascript_Core/assembler/ARMv7Assembler.h (200741 => 200742)


--- trunk/Source/_javascript_Core/assembler/ARMv7Assembler.h	2016-05-12 04:35:15 UTC (rev 200741)
+++ trunk/Source/_javascript_Core/assembler/ARMv7Assembler.h	2016-05-12 06:23:19 UTC (rev 200742)
@@ -1332,7 +1332,7 @@
             twoWordOp5i6Imm4Reg4EncodedImmSecond(right, lo16),
             twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOVT, hi16),
             twoWordOp5i6Imm4Reg4EncodedImmSecond(right, hi16),
-            OP_CMP_reg_T2 | left
+            static_cast<uint16_t>(OP_CMP_reg_T2 | left)
         };
         performJITMemcpy(address, instruction, sizeof(uint16_t) * 5);
         cacheFlush(address, sizeof(uint16_t) * 5);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to