diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
commit | 284837daa07b29d6a63a748544a90b1f5842ac5c (patch) | |
tree | ecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/JavaScriptCore/offlineasm/asm.rb | |
parent | 2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff) | |
download | qtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz |
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/JavaScriptCore/offlineasm/asm.rb')
-rw-r--r-- | Source/JavaScriptCore/offlineasm/asm.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/offlineasm/asm.rb b/Source/JavaScriptCore/offlineasm/asm.rb index 1603f4af4..14d616442 100644 --- a/Source/JavaScriptCore/offlineasm/asm.rb +++ b/Source/JavaScriptCore/offlineasm/asm.rb @@ -96,6 +96,12 @@ class Assembler result end + # Puts a C Statement in the output stream. + def putc(*line) + raise unless @state == :asm + @outp.puts(formatDump(" " + line.join(''), lastComment)) + end + def formatDump(dumpStr, comment, commentColumns=$preferredCommentStartColumn) if comment.length > 0 "%-#{commentColumns}s %s" % [dumpStr, comment] @@ -151,7 +157,11 @@ class Assembler @numGlobalLabels += 1 putsNewlineSpacerIfAppropriate(:global) @internalComment = $enableLabelCountComments ? "Global Label #{@numGlobalLabels}" : nil - @outp.puts(formatDump("OFFLINE_ASM_GLOBAL_LABEL(#{labelName})", lastComment)) + if /\Allint_op_/.match(labelName) + @outp.puts(formatDump("OFFLINE_ASM_OPCODE_LABEL(op_#{$~.post_match})", lastComment)) + else + @outp.puts(formatDump("OFFLINE_ASM_GLUE_LABEL(#{labelName})", lastComment)) + end @newlineSpacerState = :none # After a global label, we can use another spacer. end @@ -171,6 +181,14 @@ class Assembler "\" LOCAL_LABEL_STRING(#{labelName}) \"" end + def self.cLabelReference(labelName) + "#{labelName}" + end + + def self.cLocalLabelReference(labelName) + "#{labelName}" + end + def codeOrigin(text) case @commentState when :none |