0f5c0d6bb7
This ensures that tests actually abort on unimplemented opcodes instead of just printing them as "Unimplemented Instruction". If used to disassemble a code region though, we want to ignore unimplemented opcodes to keep printing remaining valid instructions. The tests were previously fixed by Deepti in8fa509d311
, but this got partly reverted on the "Address" refactoring in2459046c1d
. R=titzer@chromium.org Change-Id: I802dda2b0f45ee77c4f9b244ed984b1c4679bac3 Reviewed-on: https://chromium-review.googlesource.com/1146649 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#54726}
31 lines
1.0 KiB
C++
31 lines
1.0 KiB
C++
// Copyright 2006-2008 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef V8_DISASSEMBLER_H_
|
|
#define V8_DISASSEMBLER_H_
|
|
|
|
#include "src/allocation.h"
|
|
#include "src/code-reference.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
class Disassembler : public AllStatic {
|
|
public:
|
|
// Decode instructions in the the interval [begin, end) and print the
|
|
// code into os. Returns the number of bytes disassembled or 1 if no
|
|
// instruction could be decoded.
|
|
// Does not abort on unimplemented opcodes, but prints them as 'Unimplemented
|
|
// Instruction'.
|
|
// the code object is used for name resolution and may be null.
|
|
// TODO(titzer): accept a {WasmCodeManager*} if {isolate} is null
|
|
static int Decode(Isolate* isolate, std::ostream* os, byte* begin, byte* end,
|
|
CodeReference code = {}, Address current_pc = kNullAddress);
|
|
};
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|
|
|
|
#endif // V8_DISASSEMBLER_H_
|