WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
the patch
blah.patch (text/plain), 6.87 KB, created by
Filip Pizlo
on 2013-01-29 16:38:46 PST
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Filip Pizlo
Created:
2013-01-29 16:38:46 PST
Size:
6.87 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 141178) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2013-01-29 Filip Pizlo <fpizlo@apple.com> >+ >+ cloop.rb shouldn't use a method called 'dump' for code generation >+ https://bugs.webkit.org/show_bug.cgi?id=108251 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Revert http://trac.webkit.org/changeset/141178 and rename 'dump' to 'clDump'. >+ >+ * offlineasm/cloop.rb: >+ > 2013-01-29 Filip Pizlo <fpizlo@apple.com> > > Remove redundant AST dump method from cloop.rb, since they are already defined in ast.rb >Index: Source/JavaScriptCore/offlineasm/cloop.rb >=================================================================== >--- Source/JavaScriptCore/offlineasm/cloop.rb (revision 141178) >+++ Source/JavaScriptCore/offlineasm/cloop.rb (working copy) >@@ -55,7 +55,7 @@ end > > > class SpecialRegister < NoChildren >- def dump >+ def clDump > @name > end > def clValue(type=:int) >@@ -66,18 +66,67 @@ end > C_LOOP_SCRATCH_FPR = SpecialRegister.new("d8") > > class RegisterID >+ def clDump >+ case name >+ when "t0" >+ "t0" >+ when "t1" >+ "t1" >+ when "t2" >+ "t2" >+ when "t3" >+ "t3" >+ when "t4" >+ "rPC" >+ when "t6" >+ "rBasePC" >+ when "csr1" >+ "tagTypeNumber" >+ when "csr2" >+ "tagMask" >+ when "cfr" >+ "cfr" >+ when "lr" >+ "rRetVPC" >+ when "sp" >+ "sp" >+ else >+ raise "Bad register #{name} for C_LOOP at #{codeOriginString}" >+ end >+ end > def clValue(type=:int) >- dump + cloopMapType(type) >+ clDump + cloopMapType(type) > end > end > > class FPRegisterID >+ def clDump >+ case name >+ when "ft0", "fr" >+ "d0" >+ when "ft1" >+ "d1" >+ when "ft2" >+ "d2" >+ when "ft3" >+ "d3" >+ when "ft4" >+ "d4" >+ when "ft5" >+ "d5" >+ else >+ raise "Bad register #{name} for C_LOOP at #{codeOriginString}" >+ end >+ end > def clValue(type=:int) >- dump + cloopMapType(type) >+ clDump + cloopMapType(type) > end > end > > class Immediate >+ def clDump >+ "#{value}" >+ end > def clValue(type=:int) > # There is a case of a very large unsigned number (0x8000000000000000) > # which we wish to encode. Unfortunately, the C/C++ compiler >@@ -107,6 +156,9 @@ class Immediate > end > > class Address >+ def clDump >+ "[#{base.clDump}, #{offset.value}]" >+ end > def clValue(type=:int) > case type > when :int8; int8MemRef >@@ -177,6 +229,9 @@ class Address > end > > class BaseIndex >+ def clDump >+ "[#{base.clDump}, #{offset.clDump}, #{index.clDump} << #{scaleShift}]" >+ end > def clValue(type=:int) > case type > when :int8; int8MemRef >@@ -239,8 +294,11 @@ class BaseIndex > end > > class AbsoluteAddress >+ def clDump >+ "#{codeOriginString}" >+ end > def clValue >- dump >+ clDump > end > end > >@@ -290,7 +348,7 @@ class Sequence > end > > def clOperands(operands) >- operands.map{|v| v.dump}.join(", ") >+ operands.map{|v| v.clDump}.join(", ") > end > > >@@ -300,14 +358,14 @@ def cloopEmitOperation(operands, type, o > if operands.size == 3 > $asm.putc "#{operands[2].clValue(type)} = #{operands[1].clValue(type)} #{operator} #{operands[0].clValue(type)};" > if operands[2].is_a? RegisterID and (type == :int32 or type == :uint32) >- $asm.putc "#{operands[2].dump}.clearHighWord();" # Just clear it. It does nothing on the 32-bit port. >+ $asm.putc "#{operands[2].clDump}.clearHighWord();" # Just clear it. It does nothing on the 32-bit port. > end > else > raise unless operands.size == 2 > raise unless not operands[1].is_a? Immediate > $asm.putc "#{operands[1].clValue(type)} = #{operands[1].clValue(type)} #{operator} #{operands[0].clValue(type)};" > if operands[1].is_a? RegisterID and (type == :int32 or type == :uint32) >- $asm.putc "#{operands[1].dump}.clearHighWord();" # Just clear it. It does nothing on the 32-bit port. >+ $asm.putc "#{operands[1].clDump}.clearHighWord();" # Just clear it. It does nothing on the 32-bit port. > end > end > end >@@ -317,14 +375,14 @@ def cloopEmitShiftOperation(operands, ty > if operands.size == 3 > $asm.putc "#{operands[2].clValue(type)} = #{operands[1].clValue(type)} #{operator} (#{operands[0].clValue(:int)} & 0x1f);" > if operands[2].is_a? RegisterID and (type == :int32 or type == :uint32) >- $asm.putc "#{operands[2].dump}.clearHighWord();" # Just clear it. It does nothing on the 32-bit port. >+ $asm.putc "#{operands[2].clDump}.clearHighWord();" # Just clear it. It does nothing on the 32-bit port. > end > else > raise unless operands.size == 2 > raise unless not operands[1].is_a? Immediate > $asm.putc "#{operands[1].clValue(type)} = #{operands[1].clValue(type)} #{operator} (#{operands[0].clValue(:int)} & 0x1f);" > if operands[1].is_a? RegisterID and (type == :int32 or type == :uint32) >- $asm.putc "#{operands[1].dump}.clearHighWord();" # Just clear it. It does nothing on the 32-bit port. >+ $asm.putc "#{operands[1].clDump}.clearHighWord();" # Just clear it. It does nothing on the 32-bit port. > end > end > end >@@ -335,7 +393,7 @@ def cloopEmitUnaryOperation(operands, ty > raise unless not operands[0].is_a? Immediate > $asm.putc "#{operands[0].clValue(type)} = #{operator}#{operands[0].clValue(type)};" > if operands[0].is_a? RegisterID and (type == :int32 or type == :uint32) >- $asm.putc "#{operands[0].dump}.clearHighWord();" # Just clear it. It does nothing on the 32-bit port. >+ $asm.putc "#{operands[0].clDump}.clearHighWord();" # Just clear it. It does nothing on the 32-bit port. > end > end > >@@ -645,7 +703,7 @@ class Instruction > > when "td2i" > $asm.putc "#{operands[1].clValue(:int)} = #{operands[0].clValue(:double)};" >- $asm.putc "#{operands[1].dump}.clearHighWord();" >+ $asm.putc "#{operands[1].clDump}.clearHighWord();" > > when "bcd2i" # operands: srcDbl dstInt slowPath > $asm.putc "{" >@@ -654,7 +712,7 @@ class Instruction > $asm.putc " if (asInt32 != d || (!asInt32 && signbit(d))) // true for -0.0" > $asm.putc " goto #{operands[2].cLabel};" > $asm.putc " #{operands[1].clValue} = asInt32;" >- $asm.putc " #{operands[1].dump}.clearHighWord();" >+ $asm.putc " #{operands[1].clDump}.clearHighWord();" > $asm.putc "}" > > when "move"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mhahnenberg
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 108251
: 185339