Changeset 239838 in webkit for trunk/Source/JavaScriptCore/offlineasm/arm.rb
- Timestamp:
- Jan 10, 2019, 12:04:32 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/offlineasm/arm.rb
r239825 r239838 35 35 # x3 => t3, a3, r3 36 36 # x6 => (callee-save scratch) 37 # x7 => cfr 37 # x7 => cfr (ARMv7 only) 38 38 # x8 => t4 (callee-save) 39 39 # x9 => t5 (callee-save) … … 56 56 # d7 => (scratch) 57 57 58 def isARMv7 59 case $activeBackend 60 when "ARMv7" 61 true 62 else 63 raise "bad value for $activeBackend: #{$activeBackend}" 64 end 65 end 66 58 67 class Node 59 68 def armSingle … … 83 92 elsif (~value) >= 0 && (~value) < 256 84 93 $asm.puts "mvn #{register.armOperand}, \##{~value}" 85 els e94 elsif isARMv7 86 95 $asm.puts "movw #{register.armOperand}, \##{value & 0xffff}" 87 96 if (value & 0xffff0000) != 0 88 97 $asm.puts "movt #{register.armOperand}, \##{(value >> 16) & 0xffff}" 89 98 end 99 else 100 $asm.puts "ldr #{register.armOperand}, =#{value}" 90 101 end 91 102 end … … 109 120 "r9" 110 121 when "cfr" 111 "r7"122 isARMv7 ? "r7" : "r11" 112 123 when "csr0" 113 124 "r11" … … 599 610 $asm.puts "mov pc, #{operands[0].armOperand}" 600 611 end 612 if not isARMv7 and not isARMv7Traditional 613 $asm.puts ".ltorg" 614 end 601 615 when "call" 602 616 if operands[0].label? … … 679 693 $asm.puts "ldr #{dest.armOperand}, [#{dest.armOperand}, #{temp.armOperand}]" 680 694 681 offset = 4695 offset = $activeBackend == "ARMv7" ? 4 : 8 682 696 683 697 $asm.deferNextLabelAction {
Note:
See TracChangeset
for help on using the changeset viewer.