• gdeepti's avatar
    [wasm] Fix wasm decoder tracing for prefix opcodes. · eed164b3
    gdeepti authored
    Using --trace-wasm-decoder prints unknowns for prefix opcodes, example:
    
      @3      #01:Block               |  env = 0x5547c10, state = R, reason = block:start, control = #0:Start
    
      @4      #14:GetLocal            | i@4:GetLocal[0]
      @6      #e5:Unknown             | s@6:Unknown
      @8      #15:SetLocal            | s@8:SetLocal[1]
      @10     #14:GetLocal            | s@8:SetLocal[1] i@10:GetLocal[0]
      @12     #14:GetLocal            | s@8:SetLocal[1] i@10:GetLocal[0] s@12:GetLocal[1]
      @14     #cb:I8Const             | s@8:SetLocal[1] i@10:GetLocal[0] s@12:GetLocal[1] i@14:I8Const
      @16     #e5:Unknown             | s@8:SetLocal[1] i@10:GetLocal[0] i@16:Unknown
    
    Fixed to print:
    
      @3        #01:Block               |  env = 0x45cac10, state = R, reason = block:start, control = #0:Start
    
      @4        #14:GetLocal            | i@4:GetLocal[0]
      @6    #e5 #1b:I32x4Splat          | s@6:I32x4Splat
      @8        #15:SetLocal            | s@8:SetLocal[1]
      @10       #14:GetLocal            | s@8:SetLocal[1] i@10:GetLocal[0]
      @12       #14:GetLocal            | s@8:SetLocal[1] i@10:GetLocal[0] s@12:GetLocal[1]
      @14       #cb:I8Const             | s@8:SetLocal[1] i@10:GetLocal[0] s@12:GetLocal[1] i@14:I8Const
      @16   #e5 #1c:I32x4ExtractLane    | s@8:SetLocal[1] i@10:GetLocal[0] i@16:I32x4ExtractLane
    
    R=ahaas@chromium.org, bbudge@chromium.org
    
    Review-Url: https://codereview.chromium.org/2307733002
    Cr-Commit-Position: refs/heads/master@{#39142}
    eed164b3
wasm-opcodes.cc 4.39 KB