Changeset 267371 in webkit for trunk/Source/JavaScriptCore/offlineasm
- Timestamp:
- Sep 21, 2020, 3:01:12 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore/offlineasm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/offlineasm/arm.rb
r259996 r267371 263 263 labelRef = node.operands[0] 264 264 if labelRef.is_a? LabelReference 265 raise unless labelRef.offset == 0266 265 tmp = Tmp.new(node.codeOrigin, :gpr) 267 266 newList << Instruction.new(codeOrigin, "globaladdr", [LabelReference.new(node.codeOrigin, labelRef.label), node.operands[1], tmp]) 267 # FIXME: This check against 255 is just the simplest check we can do. ARM is capable of encoding some larger constants using 268 # rotation (subject to some special rules). Perhaps we can add the more comprehensive encoding check here. 269 if labelRef.offset > 255 270 newList << Instruction.new(codeOrigin, "move", [Immediate.new(node.codeOrigin, labelRef.offset), tmp]) 271 newList << Instruction.new(codeOrigin, "addp", [tmp, node.operands[1]]) 272 elsif labelRef.offset > 0 273 newList << Instruction.new(codeOrigin, "addp", [Immediate.new(node.codeOrigin, labelRef.offset), node.operands[1]]) 274 end 268 275 else 269 276 newList << node -
trunk/Source/JavaScriptCore/offlineasm/cloop.rb
r252422 r267371 1 # Copyright (C) 2012-20 19Apple Inc. All rights reserved.1 # Copyright (C) 2012-2020 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 334 334 def cloopEmitLea(destination, type) 335 335 $asm.putc "#{destination.clLValue(:voidPtr)} = CAST<void*>(&#{cLabel});" 336 if offset != 0 337 $asm.putc "#{destination.clLValue(:int8Ptr)} = #{destination.clValue(:int8Ptr)} + #{offset};" 338 end 336 339 end 337 340 end … … 345 348 def cloopEmitLea(destination, type) 346 349 if destination == base 347 $asm.putc "#{destination.clLValue(:int8Ptr)} +=#{offset.clValue(type)};"350 $asm.putc "#{destination.clLValue(:int8Ptr)} = #{destination.clValue(:int8Ptr)} + #{offset.clValue(type)};" 348 351 else 349 352 $asm.putc "#{destination.clLValue(:int8Ptr)} = #{base.clValue(:int8Ptr)} + #{offset.clValue(type)};" -
trunk/Source/JavaScriptCore/offlineasm/x86.rb
r262389 r267371 575 575 else 576 576 $asm.puts "lea #{dst.x86Operand(:ptr)}, #{src.asmLabel}" 577 end 578 if src.offset != 0 579 $asm.puts "add#{x86Suffix(kind)} #{orderOperands(const(src.offset), dst.x86Operand(kind))}" 577 580 end 578 581 else
Note:
See TracChangeset
for help on using the changeset viewer.