summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/offlineasm/cloop.rb
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
commit32761a6cee1d0dee366b885b7b9c777e67885688 (patch)
treed6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/offlineasm/cloop.rb
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/offlineasm/cloop.rb')
-rw-r--r--Source/JavaScriptCore/offlineasm/cloop.rb72
1 files changed, 32 insertions, 40 deletions
diff --git a/Source/JavaScriptCore/offlineasm/cloop.rb b/Source/JavaScriptCore/offlineasm/cloop.rb
index 7e939480e..852e864e9 100644
--- a/Source/JavaScriptCore/offlineasm/cloop.rb
+++ b/Source/JavaScriptCore/offlineasm/cloop.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2012, 2014 Apple Inc. All rights reserved.
+# Copyright (C) 2012 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -68,22 +68,34 @@ C_LOOP_SCRATCH_FPR = SpecialRegister.new("d6")
class RegisterID
def clDump
case name
- # The cloop is modelled on the ARM implementation. Hence, the a0-a3
- # registers are aliases for r0-r3 i.e. t0-t3 in our case.
- when "t0", "a0", "r0"
+ when "a0"
+ "a0"
+ when "a1"
+ "a1"
+ when "a2"
+ "a2"
+ when "a3"
+ "a3"
+ when "a4"
+ "a4"
+ when "a5"
+ "a5"
+ when "a6"
+ "a6"
+ when "a6"
+ "a6"
+ when "t0"
"t0"
- when "t1", "a1", "r1"
+ when "t1"
"t1"
- when "t2", "a2"
+ when "t2"
"t2"
- when "t3", "a3"
+ when "t3"
"t3"
when "t4"
- "pc"
- when "t5"
- "t5"
- when "csr0"
- "pcBase"
+ "rPC"
+ when "t6"
+ "rBasePC"
when "csr1"
"tagTypeNumber"
when "csr2"
@@ -91,7 +103,7 @@ class RegisterID
when "cfr"
"cfr"
when "lr"
- "lr"
+ "rRetVPC"
when "sp"
"sp"
else
@@ -543,18 +555,14 @@ end
# operands: callTarget, currentFrame, currentPC
def cloopEmitCallSlowPath(operands)
$asm.putc "{"
- $asm.putc " SlowPathReturnType result = #{operands[0].cLabel}(#{operands[1].clDump}, #{operands[2].clDump});"
- $asm.putc " decodeResult(result, t0.vp, t1.vp);"
+ $asm.putc " ExecState* exec = CAST<ExecState*>(#{operands[1].clValue(:voidPtr)});"
+ $asm.putc " Instruction* pc = CAST<Instruction*>(#{operands[2].clValue(:voidPtr)});"
+ $asm.putc " SlowPathReturnType result = #{operands[0].cLabel}(exec, pc);"
+ $asm.putc " decodeResult(result, t0.instruction, t1.vp);"
$asm.putc "}"
end
-def cloopEmitCallSlowPathVoid(operands)
- $asm.putc "#{operands[0].cLabel}(#{operands[1].clDump}, #{operands[2].clDump});"
-end
-
class Instruction
- @@didReturnFromJSLabelCounter = 0
-
def lowerC_LOOP
$asm.codeOrigin codeOriginString if $enableCodeOriginComments
$asm.annotation annotation if $enableInstrAnnotations && (opcode != "cloopDo")
@@ -868,8 +876,7 @@ class Instruction
when "break"
$asm.putc "CRASH(); // break instruction not implemented."
when "ret"
- $asm.putc "opcode = lr.opcode;"
- $asm.putc "DISPATCH_OPCODE();"
+ $asm.putc "goto doReturnHelper;"
when "cbeq"
cloopEmitCompareAndSet(operands, :uint8, "==")
@@ -1090,17 +1097,8 @@ class Instruction
cloopEmitOpAndBranch(operands, "|", :int32, "!= 0")
when "memfence"
-
- when "push"
- operands.each {
- | op |
- $asm.putc "PUSH(#{op.clDump});"
- }
- when "pop"
- operands.each {
- | op |
- $asm.putc "POP(#{op.clDump});"
- }
+ when "pushCalleeSaves"
+ when "popCalleeSaves"
# A convenience and compact call to crash because we don't want to use
@@ -1115,11 +1113,8 @@ class Instruction
# use of the call instruction. Instead, we just implement JS calls
# as an opcode dispatch.
when "cloopCallJSFunction"
- @@didReturnFromJSLabelCounter += 1
- $asm.putc "lr.opcode = getOpcode(llint_cloop_did_return_from_js_#{@@didReturnFromJSLabelCounter});"
$asm.putc "opcode = #{operands[0].clValue(:opcode)};"
$asm.putc "DISPATCH_OPCODE();"
- $asm.putsLabel("llint_cloop_did_return_from_js_#{@@didReturnFromJSLabelCounter}", false)
# We can't do generic function calls with an arbitrary set of args, but
# fortunately we don't have to here. All native function calls always
@@ -1140,9 +1135,6 @@ class Instruction
when "cloopCallSlowPath"
cloopEmitCallSlowPath(operands)
- when "cloopCallSlowPathVoid"
- cloopEmitCallSlowPathVoid(operands)
-
# For debugging only. This is used to insert instrumentation into the
# generated LLIntAssembly.h during llint development only. Do not use
# for production code.