Changeset 237627 in webkit for trunk/Source/JavaScriptCore/offlineasm/x86.rb
- Timestamp:
- Oct 30, 2018, 11:14:04 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/offlineasm/x86.rb
r237547 r237627 799 799 if operands.size == 3 and operands[0].is_a? Immediate 800 800 $asm.puts "imul#{x86Suffix(kind)} #{x86Operands(kind, kind, kind)}" 801 else 802 # FIXME: could do some peephole in case the left operand is immediate and it's 803 # a power of two. 804 handleX86Op("imul#{x86Suffix(kind)}", kind) 805 end 801 return 802 end 803 804 if operands.size == 2 and operands[0].is_a? Immediate 805 imm = operands[0].value 806 if imm > 0 and isPowerOfTwo(imm) 807 $asm.puts "sal#{x86Suffix(kind)} #{orderOperands(Immediate.new(nil, Math.log2(imm).to_i).x86Operand(kind), operands[1].x86Operand(kind))}" 808 return 809 end 810 end 811 812 handleX86Op("imul#{x86Suffix(kind)}", kind) 806 813 end 807 814
Note:
See TracChangeset
for help on using the changeset viewer.