diff options
Diffstat (limited to 'Source/JavaScriptCore/offlineasm/risc.rb')
-rw-r--r-- | Source/JavaScriptCore/offlineasm/risc.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/offlineasm/risc.rb b/Source/JavaScriptCore/offlineasm/risc.rb index 7408253af..1696a0c5c 100644 --- a/Source/JavaScriptCore/offlineasm/risc.rb +++ b/Source/JavaScriptCore/offlineasm/risc.rb @@ -172,7 +172,7 @@ end # end # } # -# See armv7.rb for a different example, in which we lower all BaseIndex addresses +# See arm.rb for a different example, in which we lower all BaseIndex addresses # that have non-zero offset, all Address addresses that have large offsets, and # all other addresses (like AbsoluteAddress). # @@ -272,7 +272,7 @@ def riscLowerMalformedAddressesDouble(list) end # -# Lowering of misplaced immediates. For example: +# Lowering of misplaced immediates for opcodes in opcodeList. For example, if storei is in opcodeList: # # storei 0, [foo] # @@ -282,13 +282,12 @@ end # storei tmp, [foo] # -def riscLowerMisplacedImmediates(list) +def riscLowerMisplacedImmediates(list, opcodeList) newList = [] list.each { | node | if node.is_a? Instruction - case node.opcode - when "storeb", "storei", "storep" + if opcodeList.include? node.opcode operands = node.operands newOperands = [] operands.each { |