Commit d5ef741f authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[turbofan] Change {InstructionCode} to uint32_t.

The {InstructionCode} is only used to store plain (non-negative) values
of the {ArchOpcode} enum, or additionally encodes {BitField} values. The
underlying base type 'U' of a {BitField} is uint32_t. To avoid all the
numerous implicit conversions between int32_t and uint32_t, this is
changing the {InstructionCode} so that uint32_t is used exclusively.

R=neis@chromium.org
BUG=v8:9872

Change-Id: If64107ad9298011e219b4827735eafb51465beb0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1869193Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64503}
parent 4ba57940
......@@ -260,7 +260,7 @@ enum MemoryAccessMode {
// what code to emit for an instruction in the code generator. It is not
// interesting to the register allocator, as the inputs and flags on the
// instructions specify everything of interest.
using InstructionCode = int32_t;
using InstructionCode = uint32_t;
// Helpers for encoding / decoding InstructionCode into the fields needed
// for code generation. We encode the instruction, addressing mode, and flags
......
......@@ -807,8 +807,6 @@ class V8_EXPORT_PRIVATE Instruction final {
size_t output_count, InstructionOperand* outputs,
size_t input_count, InstructionOperand* inputs,
size_t temp_count, InstructionOperand* temps) {
// TODO(9872)
// DCHECK_LE(0, opcode);
DCHECK(output_count == 0 || outputs != nullptr);
DCHECK(input_count == 0 || inputs != nullptr);
DCHECK(temp_count == 0 || temps != nullptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment