Ignore:
Timestamp:
Nov 2, 2019, 1:12:38 PM (6 years ago)
Author:
[email protected]
Message:

The offline assembler is wrong about which immediates are supported by and/or/xor on ARM64
https://bugs.webkit.org/show_bug.cgi?id=203752

Reviewed by Tadeu Zagallo.

See https://dinfuehr.github.io/blog/encoding-of-immediate-values-on-aarch64/ for the details of which immediates are supported.
This patch is a minimal fix, ideally we should refactor all of the code dealing with immediates in risc.rb, but considering that I don't know ruby and this code is poorly/not tested, I went for the simplest possible fix.

  • offlineasm/arm64.rb:
  • offlineasm/mips.rb:
  • offlineasm/risc.rb:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/risc.rb

    r229481 r251966  
    363363end
    364364
    365 def riscLowerMalformedImmediates(list, validImmediates)
     365def riscLowerMalformedImmediates(list, validImmediates, validLogicalImmediates)
    366366    newList = []
    367367    list.each {
     
    396396                    newList << node.riscLowerMalformedImmediatesRecurse(newList, validImmediates)
    397397                end
     398            when "ori", "orh", "orp", "oris", "xori", "xorp", "andi", "andp"
     399                newList << node.riscLowerMalformedImmediatesRecurse(newList, validLogicalImmediates)
    398400            else
    399401                newList << node.riscLowerMalformedImmediatesRecurse(newList, validImmediates)
Note: See TracChangeset for help on using the changeset viewer.