Bug 1438886 - Fix arm disassembler by adding support for CSDB instruction. r=me
authorNicolas B. Pierron <nicolas.b.pierron@gmail.com>
Fri, 09 Mar 2018 19:19:01 +0000
changeset 407375 bf56e43e67adee8116c18fd2245327219013c2e7
parent 407374 2c9d1c92da9b755dd91843c14912ec405150fd9a
child 407376 4f5d6034a9ca884707d2d3054b8bbcc7d613d171
push id100661
push usernpierron@mozilla.com
push dateFri, 09 Mar 2018 19:21:06 +0000
treeherdermozilla-inbound@bf56e43e67ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1438886
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1438886 - Fix arm disassembler by adding support for CSDB instruction. r=me CLOSED TREE
js/src/jit/arm/disasm/Constants-arm.h
js/src/jit/arm/disasm/Disasm-arm.cpp
--- a/js/src/jit/arm/disasm/Constants-arm.h
+++ b/js/src/jit/arm/disasm/Constants-arm.h
@@ -650,16 +650,19 @@ class Instruction {
     inline bool IsMiscType0() const { return (Bit(24) == 1)
             && (Bit(23) == 0)
             && (Bit(20) == 0)
             && ((Bit(7) == 0)); }
 
     // Test for a nop instruction, which falls under type 1.
     inline bool IsNopType1() const { return Bits(24, 0) == 0x0120F000; }
 
+    // Test for a nop instruction, which falls under type 1.
+    inline bool IsCsdbType1() const { return Bits(24, 0) == 0x0120F014; }
+
     // Test for a stop instruction.
     inline bool IsStop() const {
         return (TypeValue() == 7) && (Bit(24) == 1) && (SvcValue() >= kStopCode);
     }
 
     // Special accessors that test for existence of a value.
     inline bool HasS()    const { return SValue() == 1; }
     inline bool HasB()    const { return BValue() == 1; }
--- a/js/src/jit/arm/disasm/Disasm-arm.cpp
+++ b/js/src/jit/arm/disasm/Disasm-arm.cpp
@@ -947,16 +947,18 @@ Decoder::DecodeType01(Instruction* instr
                 Unknown(instr);  // not used by V8
                 break;
             }
         } else {
             Unknown(instr);  // not used by V8
         }
     } else if ((type == 1) && instr->IsNopType1()) {
         Format(instr, "nop'cond");
+    } else if ((type == 1) && instr->IsCsdbType1()) {
+        Format(instr, "csdb'cond");
     } else {
         switch (instr->OpcodeField()) {
           case AND: {
             Format(instr, "and'cond's 'rd, 'rn, 'shift_op");
              break;
           }
           case EOR: {
             Format(instr, "eor'cond's 'rd, 'rn, 'shift_op");