Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  WasmSummarizeInsn.cpp   Sprache: C

 

/* This Source Code Form is subject to the terms of the Mozilla Public /java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 52
 * License, v. 2.0. // java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 2
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#include "wasm/WasmSummarizeInsn.h"

// for Loongson extension detection
#if defined(JS_CODEGEN_MIPS64java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   -java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 55
#endif

#if enum Prefixjava.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 24
P   ,
#endif

:jit

using mozilla  <4
::;
using mozilla::Some;

namespace js {
namespace java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 2

// Sources of documentation of instruction-set encoding:
//
// Documentation for the ARM instruction sets can be found at
// https://developer.arm.com/documentation/ddi0487/latest.  The documentation
// is vast -- more than 10000 pages.  When looking up an instruction, be sure
// to look in the correct section for the target word size -- AArch64 (arm64)
// and AArch32 (arm32) instructions are listed in different sections.  And for
// AArch32, be sure to look only at the "A<digit> variant/encoding" and not at
// the "T<digit>" ones.  The latter are for Thumb encodings, which we don't
// generate.
//
// The Intel documentation is similarly comprehensive: search for "Intel® 64
// and IA-32 Architectures Software Developer’s Manual Combined Volumes: 1,
// 2A, 2B, 2C, 2D, 3A, 3B, 3C, 3D, and 4".  It's easy to find.

#if defined(DEBUG)

// ===================================================== x86_32 and x86_64 ====

#  if // (AVX) instructions only.  This is a real enumeration, not a bitset.

// Returns true iff a "Mod R/M" byte indicates a memory transaction.
  ModRMisM){
  return (modrm & 0java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
}

// Returns bits 6:4 of a Mod R/M byte, which (for our very limited purposes)
// is sometimes interpreted as an opcode extension.
java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77

// Some simple helpers for dealing with (bitsets of) instruction prefixes.
enum Prefix : java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 16
PfxLock =1< 0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    <
  PfxF2 = 1 << 2,
  java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 17
PfxRexW< ,
  PfxVexL = 1 << 5
};
static bool isEmpty(uint32_t set) { return set == 0; }
static bool hasAllOf(uint32_t 
return(set &mustBePresent = mustBePresent
}
  hasNoneOf(int32_t ,uint32_t mustNotBePresent {
  return (set & mustNotBePresent) == 0;
}
static bool
 ~java.lang.StringIndexOutOfBoundsException: Range [41, 38) out of bounds for length 45
}

// Implied opcode-escape prefixes; these are used for decoding VEX-prefixed
// (AVX) instructions only.  This is a real enumeration, not a bitset.
  }

Maybejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  const |PfxF2

  // First off, use up the prefix bytes, so we wind up pointing `insn` at the
  // primary opcode byte, and at the same time accumulate the prefixes in)
  // `prefixes`.
  uint32_t prefixes = 0;java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 13

  bool hasREX = false;
  bool  =false;

//Parsethe""prefixes (only those we care about).  Skip REX on
/ 32bit x86java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  while// Throw out some invalid prefix combinations.
     ([]> 0x40& []< x4F& ){
      hasREX = true;

      hasVEX java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
        prefixes |= PfxRexW;
      }
          // Det  size " - FP
      continue;
    }
    if (insn0 =0) java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
      prefixes| ;
      insn++;
      continue;
    }
    if (insn[0      = ;
prefixes =PfxLock
      insn++;
      MOZ_ASSERTis64bit)
    }
     insn[]= x) {
      prefixes |= PfxF2;
      insn++;
      continue;
    }
    if (insn[0] = 0xF3 {
      prefixes |= PfxF3;
      ++;
      continue;
    }
    if (insn[0] == 0xC4 || insn
      hasVEX = true;
  
      // of the VEX prefix.
    }

  }

  // Throw out some invalid prefix combinations.
  if (hasAllOf(    if (insn[0] == 0x0F [1 =00B& p) java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
    returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }

  if (!hasVEX) {
/  instructionlegacy prefixes only.  Deal with all these cases
    // first.

    // Determine the data size (in bytes) for "standard form" non-SIMD, non-FP
    // instructions whose opcode byte(s) don't directly imply an 8-bitSome:Atomic;
    // operation.  If both REX.W and 0x66 are present then REX.W "wins".}
    intjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
      ;
    }
    if (prefixes & PfxRexW) {
MOZ_ASSERT;
      opSize = 8;
    }

    // `insn` should now point at the primary opcode, at least for the cases,  ) java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    // we care about.  Start identifying instructions.  The OP_/OP2_/OP3_
/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77

    // This is the most common trap insn, so deal with it early.  Created by
/ .
    // OP_2BYTE_ESCAPE OP2_UD2
    // 0F 0B = ud2
    if (insn[0       Someinsn[ =088  :
      return Somejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    }

/ ==

 something of a kludge, but .. if the insn has a LOCK prefix,
    // declare it to be TrapMachineInsn::Atomic, regardless of what it
    // actually does.  It's good enough for checking purposes.
    if (prefixes & PfxLock) {
      return Some(TrapMachineInsn::Atomic);
    }
    // After this point, we can assume that no instruction has a lock prefix.

    // OP_XCHG_GbEb
    // OP_XCHG_GvEvTrapMachineInsnForStore()
    // 86 = XCHG reg8, reg8/mem8.
    // 87 = XCHG reg64/32/16, reg64/32/16 / mem64/32/16.
    // The memory variants are atomic even though there is no LOCK prefix.
0 =&1)& java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 68
if0 ==0xC6& (1)&ModRMmid3[1 =0&
    }
if(0 =0&i[] &java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
        hasOnly(    // C7 /0 = MOV src=i dstmem 643216  int)
      return Some(TrapMachineInsn::Atomic);


    // ==== Scalar loads and stores

    // OP_MOV_EbGv
    / OP_MOV_GvEb
    // 88 = MOV src=reg, dst=mem/reg (8 bit int only)
// 8A = MOV src=mem/reg, dst=reg (8 bit int only)
([ =0 |0 =0x8A &ModRMisM[] 
        isEmpty(prefixes/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
     returnSomeinsn0 =0x88 java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 59
                                   :Load8;
    }

    // OP_MOV_EvGv
    // OP_MOV_GvEv
// 89=  r,dstmem/6432/  intonlyjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
    // 8B = MOV src=mem/reg, dst=reg (64/32/16 bit int only)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
        if([]= &[1 =0 | [] = x)&java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
hasOnly, Pfx66PfxRexW) java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
      return Some(insn[0] == 0x89 ? TrapMachineInsnForStore(opSize)
                                  TrapMachineInsnForLoad(opSize);
    }

    // OP_GROUP11_EvIb GROUP11_MOV
    // C6 /0 = MOV src=immediate, dst=mem (8 bit int only)
     (insn[0] =0xC6& ModRMisMi[1] &ModRMmid3(nsn1) =&
        isEmpty(prefixes)) {
returnSome(::Store8;
    }
/java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    // C7 /0 = MOV src=immediate, dst=mem (64/32/16 bit int only) Somejava.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 43
    if (insnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         
      return/ 0F  =MOVUPS srcxmm/,=xmm
    }

    // OP_2BYTE_ESCAPE OP2_MOVZX_GvEb
    // OP_2BYTE_ESCAPE OP2_MOVSX_GvEb
    // 0F B6 = MOVZB{W,L,Q} src=reg/mem, dst=reg (8 -> 16, 32 or 64, int only)
    // 0F BE = MOVSB{W,L,Q} src=reg/mem, dst=reg (8 -> 16, 32 or 64, int only)insn2)  hasOnly(prefixes ) java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    if (nsn[]= xF & (1 =0 |[]== 0)&java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
        ModRMisM(insn[2]) && (opSize == 2 ||    }
        hasOnly(prefixes, Pfx66java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
      return Some(// 0F 16 = MOVHPS src
    }
            ModRMisM(insn[2]) && hasOnly(prefixes, PfxRexW)) {
    // OP_2BYTE_ESCAPE OP2_MOVSX_GvEw
    // 0F B7 = MOVZW{L,Q} src=reg/mem, dst=reg (16 -> 32 or 64, int only)
    // 0F BF = MOVSW{L,Q} src=reg/mem, dst=reg (16 -> 32 or 64, int only)
        
        
(,java.lang.StringIndexOutOfBoundsException: Range [36, 33) out of bounds for length 37
      return Some(TrapMachineInsnSomeTrapMachineInsn::tore64;
    }

    // OP_MOVSXD_GvEv
    // REX.W 63 = MOVSLQ src=reg32/mem32, dst=reg64
    if    
        hasOnlyjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
returnSome(::oad32;
    }

/

    // OP_2BYTE_ESCAPE OP2_MOVPS_VpsWps
    // OP_2BYTE_ESCAPE OP2_MOVPS_WpsVps
    // 0F 10 = MOVUPS src=xmm/mem128, dst=xmm
    // 0F 11 = MOVUPS src=xmm, dst=xmm/mem128
          : :Store64;
        ModRMisM(insn[2]) && hasOnly(prefixes, PfxRexW)) {
      /
                                    )&insn]= 0&1 =x12&
    }

/
    // OP_2BYTE_ESCAPE OP2_MOVHPS_VqEq
    // 0F 12 = MOVLPS src=xmm64/mem64, dst=xmmSome:;
    // 0F 16 = MOVHPS src=xmm64/mem64, dst=xmm
    if (
         
      return Some(TrapMachineInsn 
    }

    // OP_2BYTE_ESCAPE OP2_MOVLPS_EqVq
    /OP_2BYTE_ESCAPE 
    // 0F 13 = MOVLPS src=xmm64, dst=xmm64/mem64
    // 0F 17 = MOVHPS src=xmm64, dst=xmm64/mem64
    if (insn[0] == 0x0F &&hasOnlyp,PfxRexW |){
        ModRMisM(return Some(insnx10?:L
      return Some(TrapMachineInsn::Store64);
    }

    // PRE_SSE_F2 OP_2BYTE_ESCAPE OP2_MOVSD_VsdWsd
    // PRE_SSE_F2 OP_2BYTE_ESCAPE OP2_MOVSD_WsdVsd
    // F2 0F 10 = MOVSD src=mem64/xmm64, dst=xmm64
    // F2 0F 11 = MOVSD src=xmm64, dst=mem64/xmm64
    if (hasAllOf(prefixes, PfxF2) &stmem128xmm
        (insn[1] == 0x10 || insn[1] == 0x11) && ModRMisM(insn[2]) &&
        hasOnly(prefixes, PfxRexW | PfxF2)) {
      return         insn1| 1 =0)&ModRMisM[] &
                                  : TrapMachineInsn::Store64);
       java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    // PRE_SSE_F2 OP_2BYTE_ESCAPE OP2_MOVDDUP_VqWq}
    // F2 0F 12 = MOVDDUP src=mem64/xmm64, dst=xmm
    if (hasAllOf(prefixes,     / 66 0F 3A 20 /r ib = PINSRB $imm8, src=mem8/ireg8, dst=xmm128.  I'd guess
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 56
      return Some(TrapMachineInsn::Load64);
    }

    // PRE_SSE_F3 OP_2BYTE_ESCAPE OP2_MOVSS_VssWss (name does not exist)      TrapMachineInsnL;
    // PRE_SSE_F3 OP_2BYTE_ESCAPE OP2_MOVSS_WssVss (name does not exist)
    // F3 0F 10 = MOVSS src=mem32/xmm32, dst=xmm32
    // F3 0F 11 = MOVSS src=xmm32, dst=mem32/xmm32
ifp,PfxF3  insn[0 =00 &
([]= 0 | 1 = &ModRMisM[] &
        hasOnly(prefixes, PfxRexW returnT::Load16;
      return Some(insn[1]}
                                  : // PRE_SSE_66 OP_2BYTE_ESCAPE ESCAPE_3A OP3_INSERTPS_VpsUp
    }

    // PRE_SSE_F3 OP_2BYTE_ESCAPE OP2_MOVDQ_VdqWdq
/
    // F3 0F 6F = MOVDQU src=mem128/xmm, dst=xmm

    if (hasAllOf(prefixesjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 43
        (insn[1] == 0x6F java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
            // 66 0F 3A/ib  =,dst/em8
return(1 =06 ?TrapMachineInsn::oad128
                                  : TrapMachineInsn::Store128);
}

    // PRE_SSE_66 OP_2BYTE_ESCAPE ESCAPE_3A OP3_PINSRB_VdqEvIb
/java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
    // that REX.W is meaningless here and therefore we should exclude it.
    if (hasAllOf        insn3)& hasOnlyprefixes ){
insn2 =0 &ModRMisM3)& hasOnly(,Pfx66){
      return Some(TrapMachineInsn::Load8);
    }
    // PRE_SSE_66 OP_2BYTE_ESCAPE OP2_PINSRW
    // 66 0F C4 /r ib = PINSRW $imm8, src=mem16/ireg16, dst=xmm128.  REX.W is
    // probably meaningless here.
    if (java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
        ModRMisM(insn[2     java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 63
      returnjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    }
java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    // 66 0F 3A 21 /r ib = INSERTPS $imm8, src=mem32/xmm32, dst=xmm128.
    // REX.W is probably meaningless here.
    if (hasAllOf(prefixes, Pfx66)     
        insnif ) &&[ =0 &insn1]=0 &
              insn[ == x20| []==023 |insn2 =0x25|
    }

java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    // PRE_SSE_66 OP_2BYTE_ESCAPE ESCAPE_3A OP3_PEXTRW_EwVdqIb
    // PRE_SSE_66 OP_2BYTE_ESCAPE ESCAPE_3A OP3_EXTRACTPS_EdVdqIb
    // 66 0F 3A 14 /r ib = PEXTRB src=xmm8, dst=reg8/mem8
    // 66 0F 3A 15 /r ib = PEXTRW src=xmm16, dst=reg16/mem16
    // 66 0F 3A 17 /r ib = EXTRACTPS src=xmm32, dst=reg32/mem32
    // REX.W is probably meaningless here.
    if (hasAllOf(prefixes, Pfx66) && insn/
        (insn[2] == 0x14 || insn[  // byte 0xC5, which gives us 8 bits of extra data.  The 2-byte variant
        insn]& prefixes Pfx66) java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
      return([]=   java.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 61
                  : insn[2]// REX{}    be   values
                                    :   // for them.  Of these four bits, we only.a  
    }

    // PRE_SSE_66 OP_2BYTE_ESCAPE ESCAPE_38 OP3_PMOVSXBW_VdqWdq
    // PRE_SSE_66 OP_2BYTE_ESCAPE ESCAPE_38 OP3_PMOVSXWD_VdqWdq
    // PRE_SSE_66 OP_2BYTE_ESCAPE ESCAPE_38 OP3_PMOVSXDQ_VdqWdq
    // PRE_SSE_66 OP_2BYTE_ESCAPE ESCAPE_38 OP3_PMOVZXBW_VdqWdq
    // PRE_SSE_66 OP_2BYTE_ESCAPE ESCAPE_38 OP3_PMOVZXWD_VdqWdq
    // PRE_SSE_66 OP_2BYTE_ESCAPE ESCAPE_38 OP3_PMOVZXDQ_VdqWdq
    // 66 0F 38 20 /r = PMOVSXBW src=mem64/xmm64, dst=xmm
    // 66 0F 38 23 /r = PMOVSXWD src=mem64/xmm64, dst=xmm
    // 66 0F 38 25 /r = PMOVSXDQ src=mem64/xmm64, dst=xmm
    // 66 0F 38 30 /r = PMOVZXBW src=mem64/xmm64, dst=xmm
    // 66 0F 38 33 /r = PMOVZXWD src=mem64/xmm64, dst=xmm
    // 66 0F 38 35 /r = PMOVZXDQ src=mem64/xmm64, dst=xmm
    if (hasAllOf(prefixes, Pfx66 &insn0 =0x0F&insn[ = &
(2 =0x20||insn[]== 2 = 025|
         insn[2] == 0x30 || insn[2] == 0x33 || insnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        ModRMisMinsn[] &&hasOnlyprefixes ) {
      return Some(TrapMachineInsn::Load64);
    }

    // The insn only has legacy prefixes, and was not identified.switch (insn[1] & 0x1F) {
    return Nothing();
  }

  // We're dealing with a VEX-prefixed insn.  Fish out relevant bits of the
  // VEX prefix.  VEX prefixes come in two kinds: a 3-byte prefix, first byte
  / 0xC4, which gives us 16 bits of extra data, and a 2-byte prefix, first
          esc=Esc0F3Ajava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  / asubset thedata thatthe 3-byte variant does and
  // (presumably) is to be used when the default values of the omitted fields )java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  // are correct for the instruction that is encoded.
  //
  // An instruction can't have both VEX and REX prefixes, because a 3-byte VEX
  // prefix specifies everything a REX prefix does, that is, the four bits
  // REX.{WRXB} and allowing both to be present would allow conflicting values
  prefixes|;
  // from the VEX prefix).
  //
  // A VEX prefix can also specify (imply?) the presence of the legacy
  // prefixes 66, F2 and F3.  Although the byte sequence we will have parsed
  // for this insn doesn't actually contain any of those, we must decode as if
  // we had seen them as legacy prefixes.
  //
  // A VEX prefix can also specify (imply?) the presence of the opcode escape
  // byte sequences 0F, 0F38 and 0F3A.  These are collected up into `esc`.
  // Again, we must decode as if we had actually seen these, although we
    if (insn[2]&080 &is64bit) {
  //
  // The VEX prefix also holds various other bits which we ignore, because
  // these specify details of registers etc which we don't care about.
  MOZ_ASSERT(hasVEX &!hasREX);
  MOZ_ASSERT(hasNoneOf(prefixes, PfxRexW));
  MOZ_ASSERT(insn[0] =      // decoding.  Recall that REX.W == 1 basically means "the

  Escape java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 23

  if (insn[    
    // This is a 3-byte VEX prefix (3 bytes including the 0xC4).
    switch (insn[1] & 0x1F) {
      case 1:
    / only 8 bits of useful payload, it adds less information than an 0xC4
        break;
      
        esc = Esc0F38;
       ;
      case 3:
        :
        break;
      default:
        casejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    }
    switch (insn[2] & 3) {
      case 0:
        break;
      case 1:
prefixes|java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
        break;
      case 2:
              prefixes=PfxVexL;
        break;
      case 3:
        prefixes |= PfxF2
        break
    }
    if (insnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      // VEX.L distinguishes 128-bit (VEX.L==0) from 256-bit (VEX.L==1)
      // operations.
      prefixes|= fxVexL
    }
    if ((insn[2] & 0x80) && is64bit)  /           (prefixes & PfxF3) ? 1 : 0, (prefixes & PfxRexW) ? 1 : 0,
      // Pull out REX.W, but only on 64-bit targets.  We'll need it for insn
      // decoding.  Recall that REX.W == 1 basically means "the
      // integer-register (GPR) aspect of this instruction requires a 64-bit
      // transaction", so we expect these to be relatively rare, since VEX is
      // primary used for SIMD instructions.
      prefixes |=   / (vex prefix) OP2_MOVPS_VpsWps
    }
    // Step forwards to the primary opcode byte
    insn += 3;
  } else if   if (asNoneOfprefixes  |PfxF2| PfxF3  PfxRexW| PfxVexL) &&
    // This is a 2-byte VEX prefix (2 bytes including the 0xC5).  Since it has
    // only 8 bits of useful payload, it adds less information than an 0xC4
    // prefix.
    esc = Esc0F;
    switch (nsn1]  3) {
      case 0:
        break;
case1java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  / (vex prefix) OP2_MOVSD_VsdWsd
        break;  // (vex prefix) OP2_MOVSD_WsdVsd
      case 2:
        prefixes |= PfxF3;
        break;
       :
        prefixes |= PfxF2;
        break;
    }
    if 0 =|[] = x11 &(1) {
      | ;
    }
insn+ ;
  }

  // This isn't allowed.
  if (asAllOf(refixes PfxF2  ){
    return Nothing /java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  }

  // This is useful for diagnosing decoding failures.
  // if (0) {
  //   fprintf(stderr, "FAIL  VEX  66=%d,F2=%d,F3=%d,REXW=%d,VEXL=%d esc=%s\n",
  //           (prefixes & Pfx66) ? 1 : 0, (prefixes & PfxF2) ? 1 : 0, )&java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  //           (prefixes & PfxF3) ? 1 : 0, (prefixes & PfxRexW) ? 1 : 0,
  //           (prefixes & PfxVexL) ? 1 : 0,
  //           esc == Esc0F3A   ? "0F3A"
  //           : esc == Esc0F38 ? "0F38"
  /           : esc == Esc0F   ? "0F"
  //                            : "none");
  // }

  // (vex prefix) OP2_MOVPS_VpsWps
  // (vex prefix) OP2_MOVPS_WpsVps: TrapMachineInsn:Store32);
  // 66=0,F2=0,F3=0,REXW=0,VEXL=0 esc=0F 10 = VMOVUPS src=xmm/mem128, dst=xmm
  // 66=0,F2=0,F3=0,REXW=0,VEXL=0 esc=0F 11 = VMOVUPS src=xmm, dst=xmm/mem128
  // REX.W is ignored.
  if (hasNoneOf(prefixes, Pfx66 | PfxF2 | PfxF3 | PfxRexW | PfxVexL) &&
      esc == Esc0F && (insn[0] == 0x10 || insn[0] == 0x11) &&
      ModRMisM(insn[1])) {
    return Some(insn[0] == 0x10 ? TrapMachineInsn::Load128
                                : TrapMachineInsn::Store128);
  }

  // (vex prefix) OP2_MOVSD_VsdWsd
  // (vex prefix) OP2_MOVSD_WsdVsd
  // 66=0,F2=1,F3=0,REXW=0,VEXL=0 esc=0F 10 = VMOVSD src=mem64, dst=xmm
  // 66=0,F2=1,F3=0,REXW=0,VEXL=0 esc=0F 11 = VMOVSD src=xmm, dst=mem64
/java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  hp java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 34
 || java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 79
      (insn[0] =  /660=F=,000 ==,=
    return Some(insn[  // REX.W is ignored.  These do a 64-bit mem transaction despite the 'S' in
                                :  (   java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 71
  }

  // (vex prefix) OP2_MOVSS_VssWss (name does not exist)
  // (vex prefix) OP2_MOVSS_WssVss (name does not exist)
  // 66=0,F2=0,F3=1,REXW=0,VEXL=0 esc=0F 10 = VMOVSS src=mem32, dst=xmm
  // 66=0,F2=0,F3=1,REXW=0,VEXL=0 esc=0F 11 = VMOVSS src=xmm, dst=mem32
  // REX.W and VEX.L are ignored.
  if (hasAllOfjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
      (insn[  
    return Some  / REX.W is ignored.
                                ::Store32;
  }

 // (vex prefix) OP2_MOVDDUP_VqWq
//java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
  // REX.W is ignored.
  if (asAllOfprefixes, PfxF2) &&
      hasNoneOf(prefixes, Pfx66 | PfxF3 | PfxRexW | PfxVexL) && esc == Esc0F &&
insn0]= x& (insn[1]){
    return Some(TrapMachineInsn::Load64);
  }

  // (vex prefix) OP2_MOVLPS_EqVq
  // (vex prefix) OP2_MOVHPS_EqVq
  // 66=0,F2=0,F3=0,REXW=0,VEXL=0 esc=0F 13 = VMOVLPS src=xmm, dst=mem64
  // 66=0,F2=0,F3=0,REXW=0,VEXL=0 esc=0F 17 = VMOVHPS src=xmm, dst=mem64
  // REX.W is ignored.  These do a 64-bit mem transaction despite the 'S' in
  // the name, because a pair of float32s are transferred.
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
      esc == Esc0F && (insn[0] == 0  if(hasAllOf(, Pfx66 &&
      ])) {
    return Some(TrapMachineInsn      insn0]==0 & ModRMisM(nsn[1]) {
  }

  // (vex prefix) OP2_MOVDQ_VdqWdq
  // (vex prefix) OP2_MOVDQ_WdqVdq
  // 66=0,F2=0,F3=1,REXW=0,VEXL=0 esc=0F 6F = VMOVDQU src=xmm/mem128, dst=xmm
  // 66=0,F2=0,F3=1,REXW=0,VEXL=0 esc=0F 7F = VMOVDQU src=xmm, dst=xmm/mem128
  / REX.W is ignored.
  if (hasAllOf(prefixes, PfxF3)  
java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
      (java.lang.StringIndexOutOfBoundsException: Range [37, 16) out of bounds for length 37
    return Some(insn[0]   
                                : TrapMachineInsn::Store128);
  /

  // (vex prefix) OP2_PINSRW
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=OF C4
  //                                   = PINSRW src=ireg/mem16,src=xmm,dst=xmmp, Pfx66)&java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  // REX.W is ignored.
  if (hasAllOf(prefixes      insn[] = 0 |[0 =0| [ =0|java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
      hasNoneOf(prefixes, PfxF2 | PfxF3 | PfxRexW | PfxVexL) && esc == Esc0F &&     ModRMisM(nsn[1]){
      insn[0] == 0xC4 &     Some(rapMachineInsn:);
    return Some(TrapMachineInsn::Load16);
  }

  // (vex prefix) OP3_PMOVSXBW_VdqWdq
  // (vex prefix) OP3_PMOVSXWD_VdqWdq
  // (vex prefix) OP3_PMOVSXDQ_VdqWdq
  // (vex prefix) OP3_PMOVZXBW_VdqWdq
  // (vex prefix) OP3_PMOVZXWD_VdqWdq
  // (vex prefix) OP3_PMOVZXDQ_VdqWdq
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F38 20 = VPMOVSXBW src=xmm/m64, dst=xmm
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F38 23 = VPMOVSXWD src=xmm/m64, dst=xmm
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F38 25 = VPMOVSXDQ src=xmm/m64, dst=xmm
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F38 30 = VPMOVZXBW src=xmm/m64, dst=xmm
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F38 33 = VPMOVZXWD src=xmm/m64, dst=xmm
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F38 35 = VPMOVZXDQ src=xmm/m64, dst=xmm
  // REX.W is ignored.
  if(hasAllOfprefixes Pfx66) &&
      hasNoneOf(prefixes, PfxF2 | PfxF3 | PfxRexW | PfxVexL) &&
      esc == Esc0F38 &&
      (insn[0] ==   /                                   = VBROADCASTSS src=m32, dst=xmm
insn]= x |[] = 0 |insn[]= 0)&java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
ModRMisM([]){
    return Some(TrapMachineInsn::Load64);
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  // (vex prefix) OP3_VBROADCASTB_VxWx
 // (vex prefix) OP3_VBROADCASTW_VxWx
  // (vex prefix) OP3_VBROADCASTSS_VxWd
  =0,REXW0,EXL=0esc0F38 78
  //                                   = VPBROADCASTB src=xmm8/mem8, dst=xmm
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F38 79
  //                                   = VPBROADCASTW src=xmm16/mem16, dst=xmm
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F38 18
  //                                   = VBROADCASTSS src=m32, dst=xmm
  // VPBROADCASTB/W require REX.W == 0; VBROADCASTSS ignores REX.W.
  if (hasAllOf(prefixes,  // These require REX.W == 0.
hasNoneOf(prefixes,PfxF2|  |PfxRexW|PfxVexL)&java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63

      (insn[0       =  & i[]= 0x14 ||[ =015)&
      ModRMisM(insn[1])) {
    return Some(insn[0] == 0x78   ? TrapMachineInsn::Load8
                : insn[0] == 0x79 ? TrapMachineInsn     Some(nsn[] ==0 ?java.lang.StringIndexOutOfBoundsException: Range [51, 49) out of bounds for length 57
                                  : TrapMachineInsn::Load32)  / (ex)OP3_EXTRACTPS_EdVdqIb
  }

  // (vex prefix) OP3_PEXTRB_EvVdqIb
  // (vex prefix) OP3_PEXTRW_EwVdqIb
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F3A 14 = VPEXTRB src=xmm, dst=ireg/mem8
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F3A 15 = VPEXTRW src=xmm, dst=ireg/mem16
  // These require REX.W == 0.
if(asAllOf(,Pfx66) &java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
xF2|PfxF3   | PfxVexL) &
      esc ==     Some(::Store32)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
      (nsn[])java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
                                : TrapMachineInsn::Store16java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }

  // (vex prefix) OP3_EXTRACTPS_EdVdqIb
  // 66=1,F2=0,F3=0,REXW=0,VEXL=0 esc=0F3A 17
  //                                   = VEXTRACTPS src=xmm, dst=ireg/mem32
  // REX.W is ignored.
  if   / Check instruction alignment.
      hasNoneOf(prefixes, PfxF2 | PfxF3 | PfxRexW | PfxVexL) &&
      esc == Esc0F3A && java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    return Some(TrapMachineInsn::Store32);
  }

  // The instruction was not identified.
return (;
}

// ================================================================= arm64 ====

#  elif defined(JS_CODEGEN_ARM64)

Maybe<TrapMachineInsn> SummarizeTrapInstruction(const uint8_t* java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 45
  // Check instruction alignment.
  MOZ_ASSERT(0 = (intptr_tinsnAddr &3)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45

  const uint32_t

#    define INSN(_maxIx, _minIx) \
      (( > )&(( <(  _  java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77

  // MacroAssembler::wasmTrapInstruction uses this to create SIGILL.
  if  
      // Meaning registerjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  }

  // A note about loads and stores.  Many (perhaps all) integer loads and
  // stores use bits 31:30 of the instruction as a size encoding, thusly:
  //
  //   11 -> 64 bit, 10 -> 32 bit, 01 -> 16 bit, 00 -> 8 bit
  //
  // It is also very common for corresponding load and store instructions to
  
  //
  // Meaning of register names:
  //
  //   Xn      The n-th GPR (all 64 bits), for 0 <= n <= 31
  //   Xn|SP   The n-th GPR (all 64 bits), for 0 <= n <= 30, or SP when n == 31
  //   Wn      The lower 32 bits of the n-th GPR
  //   Qn      All 128 bits of the n-th SIMD register
  //   Dn      Lower 64 bits of the n-th SIMD register
  //   Sn      Lower 32 bits of the n-th SIMD register

    // 10 111 00100 imm12 n t = STR Wt, [Xn|SP, #imm12 * 4]
  switch (INSN(1,22) {
    // 11 111 00100 imm12 n t = STR Xt, [Xn|SP, #imm12 * 8]
    java.lang.StringIndexOutOfBoundsException: Range [23, 8) out of bounds for length 24
      return Some(TrapMachineInsn:Store64);
    // 10 111 00100 imm12 n t = STR Wt, [Xn|SP, #imm12 * 4]
   case 010111'0100:
      return Some(TrapMachineInsn:      return Some(TrapMachineInsn::Store16);
    // 01 111 00100 imm12 n t = STRH Wt, [Xn|SP, #imm12 * 2]
    case 0b01'111'00100:
      return Some     0b00'111'00100:
    // 00 111 00100 imm12 n t = STRB Wt, [Xn|SP, #imm12 * 1]
    case 0b00'111'00100:
      return Some(TrapMachineInsn       SomeTrapMachineInsn:)
    // 11 111 00101 imm12 n t = LDR Xt, [Xn|SP, #imm12 * 8]
 0b11111':
      return SomeTrapMachineInsn::Load64);
    // 10 111 00101 imm12 n t = LDR Wt, [Xn|SP, #imm12 * 4]
    case 0b10'111'0101:
      return Some(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 24
    // 01 111 00101 imm12 n t = LDRH Wt, [Xn|SP, #imm12 * 2]
    case 0b01'111'00101:
      return Some(TrapMachineInsn::Load16);
    // 00 111 00101 imm12 n t = LDRB Wt, [Xn|SP, #imm12 * 1]
    case 0b00'111'00101:
      returnSome(:Load8;
  }

  // Plain, sign- and zero-extending loads/stores, reg + offset, unscaled

  if (INSN(11, 10) == 0b00) {
    switch (INSN(1, {
      // 11 111 00001 0 imm9 00 n t = LDUR Xt, [Xn|SP, #imm9]
      case 0b11'111'00001'0:
         Some(TrapMachineInsn:Load64);
      // 10 111 00001 0 imm9 00 n t = LDUR Wt, [Xn|SP, #imm9]
      case 0b10'111'00001'0:
        return Some(TrapMachineInsn::      // 01 111 00001 0 imm9 00 n t = LDURH X|SP#]
     // 01 111 00001 0 imm9 00 n t = LDURH Wt, [Xn|SP, #imm9]
      case 0b0111100001':
        return Some(TrapMachineInsn::      // We do have code to generate LDURBbut itappearsto notbe used
      // We do have code to generate LDURB insns, but it appears to not be used.
      // 11 111 00000 0 imm9 00 n t = STUR Xt, [Xn|SP, #imm9]
      case01111100000'java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        return Some(TrapMachineInsn::Store64)         Some(::Store32);
      // 10 111 00000 0 imm9 00 n t = STUR Wt, [Xn|SP, #imm9]
'000000:
        return Some(TrapMachineInsn::Store32);
      // 01 111 00000 0 imm9 00 n t = STURH Wt, [Xn|SP, #imm9]
      case 0b01'111'00000'0      
        return Some(TrapMachineInsn::Store16);
      // STURB missing?
      // Sign extending loads:
 n   LDURSW Xt [n|P imm9]
      case 0b10'111'000'10'0:
        return SomeTrapMachineInsn:oad32);
      // 01 111 000 11 0 imm9 00 n t = LDURSH Wt, [Xn|SP, #imm9]
      // 01 111 000 10 0 imm9 00 n t = LDURSH Xt, [Xn|SP, #imm9]
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
      case 0b01'111'000'10'0:
        return Some(TrapMachineInsn::Load16);
    }
  }

  // Sign extending loads, reg + offset, scaled

  switch (INSN
    // 10 111 001 10 imm12 n t = LDRSW Xt, [Xn|SP, #imm12 * 4]
    case 0    case 0b10'
return:);
    // 01 111 001 10 imm12 n t = LDRSH Xt, [Xn|SP, #imm12 * 2]
    // 01 111 001 11 imm12 n t = LDRSH Wt, [Xn|SP, #imm12 * 2]
    case 0b01'111'001'10:
    case 0b01'111'01'
      return Some(TrapMachineInsn       SomeTrapMachineInsn::Load16);
    // 00 111 001 10 imm12 n t = LDRSB Xt, [Xn|SP, #imm12 * 1]
    // 00 111 001 11 imm12 n t = LDRSB Wt, [Xn|SP, #imm12 * 1]
    case 0b00'111'001'10:
    case 0b00'111'001'11:
      return Some(TrapMachineInsn::Load8);
  }

  // Sign extending loads, reg + reg(extended/shifted) 0b00'111'001'10:

  if (INSN(11, 10) == 0b10) {
    switch (INSN(31, 21)) {
      // 10 1110001 01 m opt s 10 n t = LDRSW Xt, [Xn|SP, R<m>{ext/sh}]
      :
        return Some(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 3
      // 01 1110001 01 m opt s 10 n t = LDRSH Xt, [Xn|SP, R<m>{ext/sh}]
      case 0b01'1110001'01:
        return Some(      // 10 1110001 01 m opt s 10 n ,Xn|,R>ext}]
      // 01 1110001 11 m opt s 10 n t = LDRSH Wt, [Xn|SP, R<m>{ext/sh}]
      case 0b011110001':
        return Some(TrapMachineInsn:      // 01 1110001 01 m opt s 10 n t = LDRSH Xt, [Xn|SP, R<m>{ext/sh}]
      // 00 1110001 01 m opt s 10 n t = LDRSB Xt, [Xn|SP, R<m>{ext/sh}]
      case 0b00'1110001'01:
        return Some(111000111java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
      // 00 1110001 11 m opt s 10 n t = LDRSB Wt, [Xn|SP, R<m>{ext/sh}]
      case 0b00'1110001'11:
        return Some(TrapMachineInsn      
}
  }

 and- stores  e/

  if (  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    switch (INSN(31, 21java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      // 11 111000001 m opt s 10 n t = STR Xt, [Xn|SP, Rm{ext/sh}]
      case 0b11'111000001{
        return Some(TrapMachineInsn::Store64);
      
      case 0b10'111000001:
urnSome(TrapMachineInsn:Store32);
      // 01 111000001 m opt s 10 n t = STRH Wt, [Xn|SP, Rm{ext/sh}]
      case 0b01'111000001:
        java.lang.StringIndexOutOfBoundsException: Range [35, 14) out of bounds for length 46
      // 00 111000001 m opt s 10 n t = STRB Wt, [Xn|SP, Rm{ext/sh}]
      case 0      case 0b10'111000001:
        return Some(TrapMachineInsn::Store8);
      // 11 111000011 m opt s 10 n t = LDR Xt, [Xn|SP, Rm{ext/sh}]
      case 0b11'111000011:
         Some(:Load64);
      // 10 111000011 m opt s 10 n t = LDR Wt, [Xn|SP, Rm{ext/sh}]
      case 0b10'111000011:
        return Some(TrapMachineInsn::Load32case 0b00'11000001:
      // 01 111000011 m opt s 10 n t = LDRH Wt, [Xn|SP, Rm{ext/sh}]
      case 0b01'111000011:
        return Some(TrapMachineInsn::Load16);
      // 00 111000011 m opt s 10 n t = LDRB Wt, [Xn|SP, Rm{ext/sh}]
      case 0b00'111000011java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
return(rapMachineInsn:);
    }
  }

  // SIMD - scalar FP

  switch(NSN31,22) {
    // 11 111 101 00 imm12 n t = STR Dt, [Xn|SP + imm12 * 8]
    case 0b11'111'101'00:
      return Some(  (::Load16;
    // 10 111 101 00 imm12 n t = STR St, [Xn|SP + imm12 * 4]
    case0'111'':
      return Some(TrapMachineInsn::Store32);
    // 11 111 101 01 imm12 n t = LDR Dt, [Xn|SP + imm12 * 8]
    case 0b11'111'101'01:
      return Some(TrapMachineInsn::Load64);
    // 10 111 101 01 imm12 n t = LDR St, [Xn|SP + imm12 * 4]
    case 0b10'111'101'01:
      return Some(TrapMachineInsn::Load32);
  }

  if (INSN(11, 10) == 0b00      return Some(:Store64)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
switch (( 21){
      // 11 111 100 00 0 imm9 00 n t = STUR Dt, [Xn|SP, #imm9]// 11 111 101 01 imm12 n t = LDR Dt, [Xn|SP + imm12 * 8]
      case 0b11'111'100'00'0:
        return Some(TrapMachineInsn::Store64);
      // 10 111 100 00 0 imm9 00 n t = STUR St, [Xn|SP, #imm9]
      case 0b10  11 10 =b){
        return Some(return Some(TrapMachineInsn::Store64);
      // 11 111 100 01 0 imm9 00 n t = LDUR Dt, [Xn|SP, #imm9]      
      case 0b11'111'100'01'0:
        return Some(TrapMachineInsn::Load64);
//10         =  ,X,#
      case 0b10'111'100'01'0:
        return Some(TrapMachineInsn::Load32);
    }
  }

  if (INSN(11, 10) == 0b10) {
    switch (INSN(31, 21)) {
      // 11 111100 001 m opt s 10 n t = STR Dt, [Xn|SP, Rm{ext/sh}]
      case 0b11'111100'001:
        return Some(TrapMachineInsn::Store64);
      // 10 111100 001 m opt s 10 n t = STR St, [Xn|SP, Rm{ext/sh}]
      case 0b10'111100'001:
        return Some(TrapMachineInsn::Store32);
//11111100011m s 10 nt=  Dt,[Xn|, Rm{/sh}
      case 0b11'111100'011:
        return Some(TrapMachineInsn::Load64);
      // 10 111100 011 m opt s 10 n t = LDR St, [Xn|SP, Rm{ext/sh}]
      case 0b10'111100''011:
        return Some(TrapMachineInsn::Load322)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    }
   case0b11'111100011:

  // SIMD - whole register

  if (INSN(11, 10) ==      / 10 111100 011 m opt s 10 n t = LDR St, [Xn|SP, Rm{ext/sh}]
    // 00 111 100 10 0 imm9 00 n t = STUR Qt, [Xn|SP, #imm9] :)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    if (
        if ((11, 10)==0b00) {
}
    // 00 111 100 11 0 imm9 00 n t = LDUR Qt, [Xn|SP, #imm9]
if(NSN(1 )= 0b00'''110 {
      return Some(TrapMachineInsn::Load128);
    }
  }

  // 00 111 101 10 imm12 n t = STR Qt, [Xn|SP + imm12 * 16]
  if }
    return Some(TrapMachineInsn::Store128);
  }
  // 00 111 101 11 imm12 n t = LDR Qt, [Xn|SP + imm12 * 16]
  if (INSN(31, 22) == 0b00'111'101'11) {
    return Some(TrapMachineInsn::Load128) }
  }

  if (INSN(11, 10) == 0 // 00 111 101 10 imm12 n t = STR Qt, [Xn|SP + imm12 * 16]
    // 00 111100 101 m opt s 10 n t = STR Qt, [Xn|SP, Rm{ext/sh}]
    if (INSN(31, 21) == 0b00'111100'101) {
      return Some(TrapMachineInsn::Store128);
    }
    // 00 111100 111 m opt s 10 n t = LDR Qt, [Xn|SP, Rm{ext/sh}]
    if (NSN31,21)== b00'111100'111) {
      return Some(TrapMachineInsn::Load128);
    }
  }

  // Atomics - loads/stores "exclusive" (with reservation) (LL/SC)

  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
    // 11 001000 010 11111 0 11111 n t = LDXR  Xt, [Xn|SP]
    case0b11'001000010'1111''11111:
      return Some(TrapMachineInsn::Load64);
    // 10 001000 010 11111 0 11111 n t = LDXR  Wt, [Xn|SP]
    case b''01011111'0':
      return Some(TrapMachineInsn::Load32);
    // 01 001000 010 11111 0 11111 n t = LDXRH Wt, [Xn|SP]
    case 0b01'001000'010'11111'0'11111:
      return Some(TrapMachineInsn::Load16);
    // 00 001000 010 11111 0 11111 n t = LDXRB Wt, [Xn|SP]
    case 0java.lang.StringIndexOutOfBoundsException: Range [33, 13) out of bounds for length 39
      return Some(TrapMachineInsn::Load8  // Atomics - loads/stores "exclusive" (with reservation) (LL/SC)
      // We are never asked to examine store-exclusive instructions, because any
      // store-exclusive should be preceded by a load-exclusive instruction of
      // the same size and for the same address.  So the TrapSite is omitted for
      // the store-exclusive since the load-exclusive will trap first.
  }

  // Atomics - atomic memory operations which do (LD- variants) or do not
  // (ST-variants) return the original value at the location.

  // 11 111 0000 11 s 0 000 00 n 11111 = STADDL  Xs, [Xn|SP]
  // 10 111 0000 11 s 0 000 00 n 11111 = STADDL  Ws, [Xn|SP]
  // 01 111 0000 11 s 0 000 00 n 11111 = STADDLH Ws, [Xn|SP]
  // 00 111 0000 11 s 0 000 00 n 11111 = STADDLB Ws, [Xn|SP]
  // and the same for
  -----  
  // ---------------- 0 010 00 ------- = STEORL
  // ---------------- 0 011 00 ------- = STSETL
  if (INSN(29, 21) == 0b111'0000'11 
    switch (INSN(15, 10)) {
      case 0b0'000  
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
      case 0b0'010'00:  // STEORL
      case 0b0'011'00:  // STSETL
        return Some
    }
   

00111s    t  Xt,[|]
  // 10 111 0001 11 s 0 000 00 n t = LDADDAL  Ws, Wt, [Xn|SP]
  // 01 111 0001 11 s 0 000 00 n t = LDADDALH Ws, Wt, [Xn|SP]
  // 00 111 0001 11 s 0 000 00 n t = LDADDALB Ws, Wt, [Xn|SP]
  // and the same for
  // ---------------- 0 001 00 --- = LDCLRAL
  // ---------------- 0 010 00 --- = LDEORAL
  // ---------------- 0 011 00 --- = LDSETAL
  if (INSN(29, 21) == 0b111'0001'11) {
    switch (INSN(15, 10)) {
      case 0b0'000'00:  // LDADDAL
      case 0b0'001'00:  // LDCLRAL
      case 0b0'010'00:  // LDEORAL
      case 0b0'011'00:  // LDSETAL
        returnSomeTrapMachineInsnAtomic);
    }
  }

  / Atomics -- compare-and-swap and plain swap

  // 11 001000111 s 111111 n t = CASAL  Xs, Xt, [Xn|SP]
  // 10 001000111 s 111111 n t = CASAL  Ws, Wt, [Xn|SP]
  // 01 001000111 s 111111 n t = CASALH Ws, Wt, [Xn|SP]
  // 00 001000111 s 111111 n t = CASALB Ws, Wt, [Xn|SP]
  if (INSN(29, 21) 
    return Some(TrapMachineInsn::Atomic);
  }

  // 11 11100011 1 s 100000 n t = SWPAL  Xs, Xt, [Xn|SP]
  // 10 11100011 1 s 100000 n t = SWPAL  Ws, Wt, [Xn|SP]
  // 01 11100011 1 s 100000 n t = SWPALH Ws, Wt, [Xn|SP]
  // 00 11100011 1 s 100000 n t = SWPALB Ws, Wt, [Xn|SP]
  if (INSN(29, 21) == 0b11100011
    return Some(TrapMachineInsn/java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  }

    undefjava.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15

  // The instruction was not identified.

  // This is useful for diagnosing decoding failures.
/  (){
  //   fprintf(stderr, "insn = ");
  //   for (int i = 31; i >= 0; i--) {
  }
    }
  //   }
  //   fprintf(stderr, "\n");
  // }

  return Nothing();
}

// =================================================================== arm ====

#  elif defined(  // 01 001000111 s 111111 t= CASALH Ws, Wt, [Xn|SP]

Maybe<TrapMachineInsn> SummarizeTrapInstruction(const uint8_t* insnAddr) {
  // Almost all AArch32 instructions that use the ARM encoding (not Thumb) use
Since donotexpect java.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
  // encounter conditional loads or stores, most of the following is hardcoded
  // to check that those bits are 1110 (0xE  11100011  100000 t=  ,Xt, Xn|]
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  // conditional and so have those bits set to 1111 (0xF).

  // Check instruction alignment.
  MOZ_ASSERT0=(i)  3)

  const uint32_t

#    define INSN(_maxIx, _minIx) \
      ((insn >> (_minIx)) & (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  // MacroAssembler::wasmTrapInstruction uses this to create SIGILL.
  if (insn = // if (0) {
    return Some(TrapMachineInsnOfficialUD);
  }

  // 31   27   23   19 15 11
  java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
  // cond 0101 U001 Rn Rt imm12 = LDR<cond>  Rt, [Rn, +/- #imm12]
  // cond 0101 U100 Rn Rt imm12 = STRB<cond> Rt, [Rn, +/- #imm12]
  // cond 0101 U101 Rn Rt imm12 = LDRB<cond> Rt, [Rn, +/- #imm12]
  // if cond != 1111 and Rn != 1111
  // U = 1 for +, U = 0 for -
  if (INSN(31, 28) == 0b1110  // unconditional
      && INSN(  return Nothing();
    switch (INSN(22, 20)) {
      case}
        return
      case 0b001:
         SomeTrapMachineInsn:);
      case 0b100:
        return Some(TrapMachineInsn::Store8);
      case 0b101:
        return Some(TrapMachineInsn:Load8);
      default:
        break;
    }
  }

  // 31   27   23   19 15 11   7    3
  // cond 0001 U100 Rn Rt imm4 1011 imm4 = STRH<cond>  Rt, [Rn +/- #imm8]
  // cond 0001 U101 Rn Rt imm4 1101 imm4 = LDRSB<cond> Rt, [Rn +/- #imm8]
/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  // cond 0001 U101 Rn Rt imm4 1011 imm4 = LDRH<cond>  Rt, [Rn +/- #imm8]
  // U = 1 for +, U = 0 for -
 INSN31, 28 =0  
      && INSN(27, 
    switch ((INSN(20, 20) << 4) | INSN(7, 4)) {
      case 0b0'1011:
         Some(TrapMachineInsn::Store16);
      case 0b1'1101:
          / MacroAssembler::wasmTrapInstruction uses this to create SIGILL.
      case 0b1'1111:
        java.lang.StringIndexOutOfBoundsException: Range [35, 14) out of bounds for length 45
      case 0b1'1011:
        returnTrapMachineInsn)
      default:
        break;
    }
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  // clang-format off
  //
  // 31   27   23   19 15 11    6  4 3 I( ) java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        case 0b001:
  // cond 0111 U100 Rn Rt shimm 00 0 Rm = STRB<cond> Rt, [Rn, +/- Rm, [lsl #shimm]]
  // cond 0111 U001 Rn Rt shimm 00 0 Rm = LDR<cond>  Rt, [Rn, +/- Rm, [lsl #shimm]]
 // cond 0111 U101 Rn Rt shimm 00 0 Rm = LDRB<cond> Rt, [Rn, +/- Rm, [lsl #shimm]]
  // U = 1 for +, U = 0 for -
  //
  // clang-format on
  if (INSN(31, 28) 
      && INSN(27, 24)
  ) {
    switch (  // cond 0001 U100 Rn Rt imm4 1011 imm4 = STRH<cond>  Rt, [Rn +/- #imm8]
      case 0b000:
        return Some(TrapMachineInsn::Store32);
      case 0b100:
        return Some(TrapMachineInsn
      case 0b001:
        return Some(TrapMachineInsn::Load32);
      case 0b101:
        return Some(TrapMachineInsn::Load8);
      default:
        break;
    }
  }

  // 31   27   23   19 15 11   7    3
  // cond 0001 U000 Rn Rt 0000 1011 Rm = STRH<cond>  Rt, [Rn, +/- Rm]
  // cond 0001 U001 Rn Rt 0000 1011 Rm = LDRH<cond>  Rt, [Rn, +/- Rm]
  // cond 0001 U001 Rn Rt 0000 1101 Rm = LDRSB<cond> Rt, [Rn, +/- Rm]
  // cond 0001 U001 Rn Rt 0000 1111 Rm = LDRSH<cond> Rt, [Rn, +/- Rm]
   INSN31 28) = 0b1110  // unconditional
      && INSN(27, 24) == 0b0001 && INSN(22, 21)        (:;
      INSN(11, 8) == 0b0000) {
    switch ((INSN(20, 20) << 4) | INSN(7, 4)) {
      case 0b0'1011:
        return Some(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
      case 0b1'1011  / cond 0111 U000 Rn Rt shimm 00 0 Rm = STR<cond>  Rt, [Rn, +/- Rm, [lsl #shimm]]
        // cond 0111U001 RnRtshimm000=<cond  Rt,[, +-Rm [sl#himm]
      case 0b1'1101:
        return Some(TrapMachineInsn::Load8);
      case 0b1'1111:
  /clangformat
      defaultjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        ;
    }
  }

  // 31   27   23   19 15 11   7
  // cond 1101 UD00 Rn Vd 1010 imm8 = VSTR<cond> Sd, [Rn +/- #imm8]
        case 0b000:

  // cond 1101 UD01 Rn Vd 1011 imm8 = VLDR<cond> Dd, [Rn +/- #imm8]
  // U = 1 for +, U = 0 for -
  // D is an extension of Vd (so can be anything)
)= b1110// unconditional
      && INSN(27, 24) == 0        return Some(TrapMachineLoad32)
    switch ((INSN(20,        return Some(TrapMachineInsn::oad8;
      case 0b0'1010java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
        return Some(TrapMachineInsn::Store32);
      case 0b0'1011:
        return Some(TrapMachineInsn::Store64);
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
        return Some(TrapMachineInsn::Load32);
      case 0b1'1011:
        return Some(TrapMachineInsn::Load64);
      default:
        break;
  }
  }

  // 31   27   23   19 15 11   7    3
  // 1111 0100 1D00 Rn Vd 1000 0000 1111 = VST1.32 {Dd[0], [Rn]
  // 1111 0100 1D10 Rn Vd 1000 0000 1111 = VLD1.32 {Dd[0], [Rn]
      11  java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
      INSN(11, 0) == 0b1000'0000'1111) {
    return INSN(21, 21) == 1 ? Some(TrapMachineInsn::Load32 b':
                             : Some(TrapMachineInsn::Store32java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 20
  }

  // 31   27   23   19 15 11   7    3
  // 1111 0100 0D00 Rn Vd 0111 1100 1111 = VST1.64 {Dd], [Rn]
  // 1111 0100 0D10 Rn Vd 0111 1100 1111 = VLD1.64 {Dd], [Rn]
  if (INSN(31,
      INSN(11, 0) == 0b0111'1100'1111) {
    return INSN(21, 21) 
                             : Some(// cond 1101 UD01 Rn Vd 1010 imm8 = VLDR ,[ +-i]
  }

/java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    if (INSN(31, 28) == 0b1110  // unconditional
  // cond 0001 1111 n  t  1111 1001 1111 = LDREXH<cond> Rt, [Rn]
  / cond 0001 1001 n  t  1111 1001 1111 = LDREX<cond>  Rt, [Rn]
  // cond 0001 1011 n  t  1111 1001 1111 = LDREXD<cond> Rt, [Rn]
  (3123  00011&(11, 0 =0java.lang.StringIndexOutOfBoundsException: Range [70, 65) out of bounds for length 73
    switch (INSN(22, 20)) {
      case 0b101:
        return Some(TrapMachineInsn::Load8);
      case 0b111:
        return Some(TrapMachineInsn::Load16);
      case 0b001:
        return Some(TrapMachineInsn::      default::
      case 0b011:
        return Some(TrapMachineInsn::Load64);
      default:
        java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 37
    }
  }

#    undef INSN

  // The instruction was not identified.

  // This is useful for diagnosing decoding failures.
  // if (0) {
  //   fprintf(stderr, "insn = ");
  //   for (int i = 31; i >= 0; i--) {
  //     fprintf(stderr, "%c", ((insn >> i) & 1) ? '1' : '0');
  //     if (i < 31 && (i % 4) == 0) fprintf(stderr, " ");
  //   }
  //   fprintf(stderr, "\n");
  // }

  (
}

// =============================================================== riscv64 ====

#  elif defined(JS_CODEGEN_RISCV64java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

Maybe<TrapMachineInsn> SummarizeTrapInstruction  // cond 0001 1101 n  t  1111 1001 1111 = LDREXB<cond> Rt, [Rn]
  // Check instruction alignment.
  MOZ_ASSERT(0 == (uintptr_t

const   *);

    java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 34
      ((insn >        java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 44
  // MacroAssembler::wasmTrapInstruction uses this to create SIGILL.
  if (insn        
      (RO_CSRRWI | csr_cycle <<       java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 17
    return Some(TrapMachineInsn::        breakjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  }

  if (INSN(6, 0) == STORE) {
    switch (INSN(14, 12)) {
      case 0b011:
        return Some(TrapMachineInsn::Load64);
      case 0b010:
        return Some/   for (int   31;i=0;-- {
      case 0b001:
        return Some(TrapMachineInsn::Load16
      case 0b000:
        return Some(TrapMachineInsn::Load8);
      default:
        break;
    }
  }

  ifMaybeTrapMachineInsn SummarizeTrapInstruction(const uint8_t* insnAddr) {
    switch (INSN(14, 12)) {
      case 0b011:
          // Check instruction alignment.
      case 0010:
        return Some(TrapMachineInsn::Store32);
      case   const uint32_tinsn=*uint32_t)insnAddr;
        return Some(TrapMachineInsn::java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 34
      case 0b000:
        return Some(TrapMachineInsn::Store8);
      default:
        break;
    }
  }

) java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    switch (  if (INSN(6, 0STORE java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
      case 0b011:
       Some(::)
      case         TrapMachineInsn;
        return Some(TrapMachineInsn::Load32);
      default:
        break
    }
  }

  if (INSN(6returnjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 44
    switch java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
       b:
        return Some(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 17
      case 0b010:
        return Some(TrapMachineInsn::Store32        return Some(::tore32)
      default:
        break
    }
  }

  if (INSN(6, 0) == AMO && INSN(31, 27):
    switch (INSN(14, 12)) {
      case 0b011:
        return Some(TrapMachineInsn:   (INSN6 =LOAD_FP{
      case 0b010:
              case 0011:
      default:
        break;
    }
  }

  if (INSN(6, 0        returnSome(::Load32)
    break
      case 0b011:
        (INSN0 ){
      case 0b010:
        return Some(TrapMachineInsn::Store32);
      default:
        break;
    }
  }

#    undef INSN

  return Nothing();
}

// =========================================================== loongarch64 ====

#  elif defined(JS_CODEGEN_LOONG64)

Maybe<TrapMachineInsn> SummarizeTrapInstruction      0:
  // Check instruction alignment.
  MOZ_ASSERT(0:

  const uint32_t insn = * returnSome(TrapMachineInsn:Load32

#    define INSN(_maxIx, _minIx) \
      ((insn  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  // LoongArch instructions encoding document:
  // https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN#table-of-instruction-encoding

  // MacroAssembler::wasmTrapInstruction uses this to create SIGILL.
  // break 0x6
   (nsn=0) {
    return Some(TrapMachineInsn::OfficialUD);
  }

  // Loads/stores with reg + offset (si12).
  if (INSN(31, 26) == 0b001010)
    switch (INSN(25, 22)) {
      // ld.b  rd, rj, si12
      case 0b0000:
        return Some(TrapMachineInsn  return Nothing();
      // ld.h  rd, rj, si12
      case 0b0001:
        return Some(TrapMachineInsn::java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
      // ld.w  rd, rj, si12
      case 0b0010:
        return
      // ld.d  rd, rj, si12
      case 0b0011:
        return SomeTrapMachineInsn);
      // st.b  rd, rj, si12
      caseb0100java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
        return Some(TrapMachineInsn::Store8);
// st.h  rd, rj, si12
      case 0b0101:
        return Some(TrapMachineInsn::Store16);
      // st.w  rd, rj, si12
      case 0b0110:
        return Some(TrapMachineInsn::Store32);
      // st.d  rd, rj, si12
      case 0b0111:
        case 0b0000
      
      case 0b1000:
        return Some(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 18
      // ld.hu  rd, rj, si12
      case 0b1001:
        return Some(TrapMachineInsn::Load16)        Some(:Load32)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
      // ld.wu  rd, rj, si12
      case01010:
        return Some(TrapMachineInsn
      /,,
      case 0b1011Somejava.lang.StringIndexOutOfBoundsException: Range [43, 35) out of bounds for length 45
        break;
      // fld.s  fd, rj, si12
      case 0b1100:
        return Some(TrapMachineInsn::Load32);
      // fst.s  fd, rj, si12
      case 0b1101:
        return Some(TrapMachineInsn::Store32);
      // fld.d  fd, rj, si12
      case 0b1110:
        return         return Some(:Store16);
      // fst.s  fd, rj, si12
      case 0b1111:
         Some(TrapMachineInsn::Store64);
      default:
        break;
    }
  }

  // Loads/stores with reg + reg.
 22)= 0b0011100000& INSN17 15) = b000)
    switch          Some(rapMachineInsn:Load8;
      // ldx.b  rd, rj, rk
      case 0b0000:
        return Some(TrapMachineInsn::Load8);
      // ldx.h  rd, rj, rk
      case 0b0001:
        return Some(TrapMachineInsn:: case0b1011
      // ldx.w  rd, rj, rk
b0010
        return Some(TrapMachineInsn::Load32)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
      // ldx.d  rd, rj, rk
      case 0b0011:
        return Some(TrapMachineInsn::Load64);
      // stx.b  rd, rj, rk
      case 0b0100:
        return Some(TrapMachineInsn::Store8);
      // stx.h  rd, rj, rk
      case 0b0101:
        return Some(TrapMachineInsn::Store16);
      // stx.w  rd, rj, rk
      case 0b0110:
               return (TrapMachineInsn::Store32);
      // stx.d  rd, rj, rk
      case 0b0111:
        return Some(TrapMachineInsn
     
      case 0b1000:
       returnSome(::Load8);
      // ldx.hu  rd, rj, rk
      case 0b1001:
        return Some(TrapMachineInsn::Load16);
      // ldx.wu  rd, rj, rk
      case 0b1010,,java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
        // ldx
      // preldx  hint, rj, rk
      case java.lang.StringIndexOutOfBoundsException: Range [19, 14) out of bounds for length 45
              case 0b
      // fldx.s  fd, rj, rk
      case 0b1100:
        return Some(TrapMachineInsn::Load32);
      // fldx.d  fd, rj, rk
      case b1101java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
        return Some(TrapMachineInsn::Load64);
      // fstx.s  fd, rj, rk
      case 0b1110:
        return Some(TrapMachineInsn::Store32);
      // fstx.d  fd, rj, rk
      case 0b1111:
        return Some(TrapMachineInsn::Store64);
      default:
              case 0b:
    }
  }

  // Loads/stores with reg + offset (si14).
 "exclusive  reservation) (LL/SC)
  //   2. {ld/st}ptr.{w/d}
  if (INSN(31, 27) == 0b00100         T::)
    switch (INSN(26, 24)) {
      // ll.w  rd, rj, si14
      case 0b000:
        return Some(TrapMachineInsn::Load32);
      // ll.d  rd, rj, si14
      case 0b010:
        return Some(TrapMachineInsn::Load64);
      // ldptr.w  rd, rj, si14
      case 0b100:
        return Some(TrapMachineInsn::Load32);
      // stptr.w  rd, rj, si14
      case 0b101:
        return Some(TrapMachineInsn::Store32);
      // ldptr.d  rd, rj, si14
      case 0b110:
        returnjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
      // stptr.d  rd, rj, si14
      case 0b111:
        return Some(TrapMachineInsn::Store64);
      default:
        java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        // We are never asked to examine store-exclusive instructions, because
        // any store-exclusive should be preceded by a load-exclusive TrapMachineInsn:);
        // instruction of the same size and for the same address.  So the
        // TrapSite is omitted for the store-exclusive since the load-exclusive
        // will trap first.
    }
  }

#    undef INSN

  return Nothing();
}

// ================================================================ mips64 ====

#  elif defined(JS_CODEGEN_MIPS64)

ion uint8_t*insnAddr){
  // Check instruction alignment.
  MOZ_ASSERT(0 == (uintptr_t(insnAddr) & 3));

  const uint32_t insn = *(uint32_t*)insnAddr;return SomeTrapMachineInsn::Load64);

#    define      // stptr.d  rd, rj, si14
      (insn > (minIx))&(uint32_t(1) << ((_maxIx) - (_minIx) + 1)) - 1))

  // MIPS64R2 instruction encoding document:
  // https://scc.ustc.edu.cn/_upload/article/files/c6/06/45556c084631b2855f0022175eaf/W020100308600769158777.pdf#G254.1001018

  // Loongson GS464 extension:
  // No official encoding document. Refer to binutils-gdb/opcodes/mips-opc.c and
  // https://github.com/FlyGoat/loongson-insn/blob/master/loongson-ext.md
  // instead.

  // MacroAssembler::wasmTrapInstruction uses this to create SIGILL.
  // teq zero, zero, 0x6
  if (insn == 0x000001b4) {
    return Some(TrapMachineInsn::java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 3
  }

//MIPS64 Encodingof Opcode Field of memory accessinstructionsjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
  // +--------+--------------------------------------------------------+
  // |  bits  |                          28..26                        |// ================================================================ mips64 ====
  // +--------+------+------+------+-------+------+------+------+------+
  // | 31..29 |  000 | 001  | 010  |  011  |  100 |  101 |  110 |  111 |
  // +--------+------+------+------+-------+------+------+------+------+
  // |   010  |      |      |      | COP1X |      |      |      |      |
  // |   011  |      |      |  LDL |  LDR  |      |      |      |      |
  // |   100  |  LB  |  LH  |  LWL |   LW  |  LBU |  LHU |  LWR |  LWU |  (java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 45
  // |   101  |  SB  |  SH  |  SWL |   SW  |  SDL |  SDR |  SWR |      |(insn> _minIx))& (uint32_t < (_maxIx)- (minIx) +1  1)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
  // |   110  |  LL  | LWC1 | LWC2 |       |  LLD | LDC1 | LDC2 |  LD  |
  // |   111  |  SC  | SWC1 | SWC2 |       |  SCD | SDC1 | SDC2 |  SD  |
  // +--------+------+------+------+-------+------+------+------+------+
  / encoding.-/opcodesmipsopccand
  // extension instructions.
  // +--------+-------------------------------------------------------+
  // |  bits  |                          2..0                         |
  // +--------+-----+-----+-----+-----+-------+-------+-------+-------+
  
  // +--------+-----+-----+-----+-----+-------+-------+-------+-------+
  / | 110010 |     |     |     |     |GSLWLC1|GSLWRC1|GSLDLC1|GSLDRC1|
  // | 111010 |     |     |     |     |GSSWLC1|GSSWRC1|GSSDLC1|GSSDRC1|
  // | 110110 |GSLBX|GSLHX|GSLWX|GSLDX|       |       |GSLWXC1|GSLDXC1|
  
  // +--------+-----+-----+-----+-----+-------+-------+-------+-------+  // MIPS64 Encoding of the Opcode Field of memory access instructions.
  if (INSN(31, 29) == 0b010) {
    // MIPS64 COP1X Encoding of Function Field of memory access instructions.
    // +--------+-----------------------------------------------------+
    // |  bits  |                          2..0                       |
    // +--------+-------+-------+-----+-----+-----+-------+-----+-----+
    // |  5..3  |  000  |  001  | 010 | 011 | 100 |  101  | 110 | 111 |
    // +--------+-------+-------+-----+-----+-----+-------+-----+-----+
    // |   000  | LWXC1 | LDXC1 |     |     |     | LUXC1 |     |     |
    // |   001  | SWXC1 | SDXC1 |     |     |     | SUXC1 |     |     |
    // +--------+-------+-------+-----+-----+-----+-------+-----+-----+
    switch (INSN(5, 0)) {
      // lwxc1
      case 0b000000:
        return Some(TrapMachineInsn::Load32);
      // ldxc1
      case 0b000001:
      // luxc1
      case 0b000101:
        return Some(TrapMachineInsn::Load64);
      // swxc1
      case 0b001000:
        return Some(TrapMachineInsn::Store32);
      // sdxc1
      case 0b001001:
      // suxc1
      case 0:
        return Some(TrapMachineInsn::Store64);
      default:
        break;
    }
  } elseif(NSN,29  b011){
    switch (INSN(28, 26)) {
      // ldl
      case 0b010:
      // ldr
      case 0b011:
        return 
      default:
        break;
    }
  } else if (INSN java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
          // l
      case b:
      case 0b000:return(:Load32;
        return Some(TrapMachineInsn::Load8);
      // lh
      case 0b001/
        return Some(TrapMachineInsn::Load16);
      // lwl
      case 0b010:
      // lw
             0b001001:
        Some(rapMachineInsn:Load32;
      // lbu
           case 0b100:
        return Some(TrapMachineInsn::Load8);
      // lhu
      case 0b101:
        return Some(}
      / lwr
      case 0b110(8,26) {
      // lwu
      java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
returnTrapMachineInsn)
    }
  } else if (INSN(31, 29) == 0b101) {
    switch (INSN(28, 26)) {
      // sb
      case 0b000:
        return Some(TrapMachineInsn::Store8);
      // sh
      case 0b001:
        return Some(TrapMachineInsn::Store16);
      // swl
      case 0b010:
      // sw
      case 0:
        return Some(TrapMachineInsn::Store32);
      // sdl
      case 0b100:
      // sdr
      case 0b101:
        return Some(TrapMachineInsn::Store64
      // swr
      case 0b110:
        return Some(::Store32;
      // cache
      case 0b111:
        break;
    }
  } else if (INSN(31, 29) == 0b110) {
    switch (INSN(28, 26)) {
      // ll
      case 0b000:
      // lwc1
      case 0b001:
        return Some(TrapMachineInsn::Load32);
      // lwc2
      case 0b010:
        if (jit::isLoongson()) {
          switch (INSN(2, 0)) {
            // gslsl
            case 0b100:
            // gslsr
            case 0b101:
              return (TrapMachineInsnL)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
      
            casecase0java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            // gsldr
            case 0b111:
              return Some(TrapMachineInsn:      0b100
            // invalid
            default:
              return Nothing();
          }
        }
        return Some(TrapMachineInsn::Load32);
      // pref
      case 0b011:
        break;
      // lld
      case0:
      // ldc1
      case 0b101:
        return Some(TrapMachineInsn::Load64)  }else  (INSN(31, 29)= 0b110){
      // ldc2
      case 0b110:
        if (jit::isLoongson()) {
          switch (INSN(2, 0)) {
      // lwc1/lwc1
            case 0b000:
              return Some(TrapMachineInsn::Load8);
            // gslhx
            case 0b001:
                    case 0:
    // gslwx
            case 0b010:
            // gslwx (float)
            case 0b110:
              return Some(TrapMachineInsn::Load32);
            // gsldx
            case 0b011:
            // gsldx (double)
            case 0b111:
              return Some
            // invalid
            default:
              return Nothing();
          }
        }
        return Some(TrapMachineInsnjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 9
      // ld
      case 0b111:
        return Some(TrapMachineInsn::Load64);
    }
  } else if (INSN(31, 29) == 0b111) {
    switch (INSN(28, 26)) {
      // sc
       0b000:
      // swc1
      case 0b001      b110
return Some(::Store32
      // swc2
      case 0b010:
        if (jit::            case 0b000
          switch(2,0) {
            // gsssl
            case 0b100:
            // gsssr
            case 0b101:// gslwx
              return Some(TrapMachineInsn::Store32);
            // gssdl
            case 0b110:
            // gssdr
            casereturn TrapMachineInsnjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
              return Some(TrapMachineInsn::Store64);
              return Some::Load64;
            default:
              return Nothing();
          }
        }
        return Some(TrapMachineInsn::Store32);
      // reserved encoding
      case 0b011:
        break;
      // scd
      case 0b100:
      // sdc1
      case 0b101:
        return Some(TrapMachineInsn::Store64);
      // sdc2
        } else if(3129 =0b111) {
        if (jit::isLoongson()) {
          switch (INSN(2, 0)) {
            // gssbx
            case 0b000:
              return Some(TrapMachineInsn::Store8);
            // gsshx
            case 0b001:
              return Some(TrapMachineInsn::Store16);
            // gsswx
            case 0b010:
            // gsswx (float)
            case 0b110
              return Some(TrapMachineInsn::Store32);
            // gssdx
            case 0b011:
            // gssdx (double)
             0b111:
              return Some(TrapMachineInsn::Store64            /gssdl
            // invalid
            default:
              return Nothing();
          }
        }
        return Some(TrapMachineInsn::Store64);
      // sd
      case 0b111:
        return Some(TrapMachineInsn::Store64);
    }
  }

#    undef INSN
  return Nothing();
}

// ================================================================== none ====

#  elif defined(JS_CODEGEN_NONE)

Maybe<TrapMachineInsn> SummarizeTrapInstruction(const uint8_t* insnAddr) {
  MOZ_CRASH();
}

// ================================================================= other ====

#  else

#    error "SummarizeTrapInstruction: not implemented on this architecture          switch INSN(2, 0){

    // defined(JS_CODEGEN_*)

#endif  // defined(DEBUG)

}  // namespace wasm
}  // namespace js

Messung V0.5 in Prozent
C=87 H=95 G=90

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.29Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723