Title: [167566] trunk/Source/_javascript_Core
- Revision
- 167566
- Author
- [email protected]
- Date
- 2014-04-20 06:58:25 -0700 (Sun, 20 Apr 2014)
Log Message
_javascript_Core: ARM build fix after r167094.
https://bugs.webkit.org/show_bug.cgi?id=131612
Patch by László Langó <[email protected]> on 2014-04-20
Reviewed by Michael Saboff.
After r167094 there are many build errors on ARM like these:
/tmp/ccgtHRno.s:370: Error: invalid constant (425a) after fixup
/tmp/ccgtHRno.s:374: Error: invalid constant (426e) after fixup
/tmp/ccgtHRno.s:378: Error: invalid constant (4282) after fixup
/tmp/ccgtHRno.s:382: Error: invalid constant (4296) after fixup
Problem is caused by the wrong generated assembly like:
"\tmov r2, (" LOCAL_LABEL_STRING(llint_op_strcat) " - " LOCAL_LABEL_STRING(relativePCBase) ")\n" // /home/webkit/WebKit/Source/_javascript_Core/llint/LowLevelInterpreter.asm:741
`mov` can only move 8 bit immediate, but not every constant fit into 8 bit. Clang converts
the mov to a single movw or a movw and a movt, depending on the immediate, but binutils doesn't.
Add a new ARM specific offline assembler instruction (`mvlbl`) for the following llint_entry
use case: move rn, (label1-label2) which is translated to movw and movt.
* llint/LowLevelInterpreter.asm:
* offlineasm/arm.rb:
* offlineasm/instructions.rb:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (167565 => 167566)
--- trunk/Source/_javascript_Core/ChangeLog 2014-04-20 13:46:46 UTC (rev 167565)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-04-20 13:58:25 UTC (rev 167566)
@@ -1,3 +1,29 @@
+2014-04-20 László Langó <[email protected]>
+
+ _javascript_Core: ARM build fix after r167094.
+ https://bugs.webkit.org/show_bug.cgi?id=131612
+
+ Reviewed by Michael Saboff.
+
+ After r167094 there are many build errors on ARM like these:
+
+ /tmp/ccgtHRno.s:370: Error: invalid constant (425a) after fixup
+ /tmp/ccgtHRno.s:374: Error: invalid constant (426e) after fixup
+ /tmp/ccgtHRno.s:378: Error: invalid constant (4282) after fixup
+ /tmp/ccgtHRno.s:382: Error: invalid constant (4296) after fixup
+
+ Problem is caused by the wrong generated assembly like:
+ "\tmov r2, (" LOCAL_LABEL_STRING(llint_op_strcat) " - " LOCAL_LABEL_STRING(relativePCBase) ")\n" // /home/webkit/WebKit/Source/_javascript_Core/llint/LowLevelInterpreter.asm:741
+
+ `mov` can only move 8 bit immediate, but not every constant fit into 8 bit. Clang converts
+ the mov to a single movw or a movw and a movt, depending on the immediate, but binutils doesn't.
+ Add a new ARM specific offline assembler instruction (`mvlbl`) for the following llint_entry
+ use case: move rn, (label1-label2) which is translated to movw and movt.
+
+ * llint/LowLevelInterpreter.asm:
+ * offlineasm/arm.rb:
+ * offlineasm/instructions.rb:
+
2014-04-20 Csaba Osztrogonác <[email protected]>
[ARM] Unreviewed build fix after r167336.
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (167565 => 167566)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2014-04-20 13:46:46 UTC (rev 167565)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2014-04-20 13:58:25 UTC (rev 167566)
@@ -737,14 +737,17 @@
pcrtoaddr label, t1
move index, t2
storep t1, [a0, t2, 8]
- elsif ARM or ARMv7 or ARMv7_TRADITIONAL or SH4
+ elsif ARM or ARMv7 or ARMv7_TRADITIONAL
+ mvlbl (label - _relativePCBase), t2
+ addp t2, t1, t2
+ move index, t3
+ storep t2, [a0, t3, 4]
+ elsif SH4
move (label - _relativePCBase), t2
addp t2, t1, t2
move index, t3
storep t2, [a0, t3, 4]
- if SH4
- flushcp # Force constant pool flush to avoid "pcrel too far" link error.
- end
+ flushcp # Force constant pool flush to avoid "pcrel too far" link error.
elsif MIPS
crash() # Need to replace with code to turn label into and absolute address and save at index
end
Modified: trunk/Source/_javascript_Core/offlineasm/arm.rb (167565 => 167566)
--- trunk/Source/_javascript_Core/offlineasm/arm.rb 2014-04-20 13:46:46 UTC (rev 167565)
+++ trunk/Source/_javascript_Core/offlineasm/arm.rb 2014-04-20 13:58:25 UTC (rev 167566)
@@ -484,6 +484,9 @@
else
$asm.puts "mov #{armFlippedOperands(operands)}"
end
+ when "mvlbl"
+ $asm.puts "movw #{operands[1].armOperand}, \#:lower16:#{operands[0].value}"
+ $asm.puts "movt #{operands[1].armOperand}, \#:upper16:#{operands[0].value}"
when "nop"
$asm.puts "nop"
when "bieq", "bpeq", "bbeq"
Modified: trunk/Source/_javascript_Core/offlineasm/instructions.rb (167565 => 167566)
--- trunk/Source/_javascript_Core/offlineasm/instructions.rb 2014-04-20 13:46:46 UTC (rev 167565)
+++ trunk/Source/_javascript_Core/offlineasm/instructions.rb 2014-04-20 13:58:25 UTC (rev 167566)
@@ -261,7 +261,8 @@
ARM_INSTRUCTIONS =
[
- "clrbp"
+ "clrbp",
+ "mvlbl"
]
ARM64_INSTRUCTIONS =
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes