| Index: src/compiler/instruction.h
|
| diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
|
| index 5d5e6813a782c5de83df3467165ca75a88a5f8cf..48dbdf20e70fdd6bf9f8b83991edf6417ef8ca1c 100644
|
| --- a/src/compiler/instruction.h
|
| +++ b/src/compiler/instruction.h
|
| @@ -454,7 +454,7 @@
|
| return FlagsConditionField::decode(opcode());
|
| }
|
|
|
| - // TODO(titzer): make call into a flag.
|
| + // TODO(titzer): make control and call into flags.
|
| static Instruction* New(Zone* zone, InstructionCode opcode) {
|
| return New(zone, opcode, 0, NULL, 0, NULL, 0, NULL);
|
| }
|
| @@ -476,10 +476,17 @@
|
| opcode, output_count, outputs, input_count, inputs, temp_count, temps);
|
| }
|
|
|
| + // TODO(titzer): another holdover from lithium days; register allocator
|
| + // should not need to know about control instructions.
|
| + Instruction* MarkAsControl() {
|
| + bit_field_ = IsControlField::update(bit_field_, true);
|
| + return this;
|
| + }
|
| Instruction* MarkAsCall() {
|
| bit_field_ = IsCallField::update(bit_field_, true);
|
| return this;
|
| }
|
| + bool IsControl() const { return IsControlField::decode(bit_field_); }
|
| bool IsCall() const { return IsCallField::decode(bit_field_); }
|
| bool NeedsPointerMap() const { return IsCall(); }
|
| bool HasPointerMap() const { return pointer_map_ != NULL; }
|
| @@ -521,7 +528,8 @@
|
| explicit Instruction(InstructionCode opcode)
|
| : opcode_(opcode),
|
| bit_field_(OutputCountField::encode(0) | InputCountField::encode(0) |
|
| - TempCountField::encode(0) | IsCallField::encode(false)),
|
| + TempCountField::encode(0) | IsCallField::encode(false) |
|
| + IsControlField::encode(false)),
|
| pointer_map_(NULL) {}
|
|
|
| Instruction(InstructionCode opcode, size_t output_count,
|
| @@ -532,7 +540,7 @@
|
| bit_field_(OutputCountField::encode(output_count) |
|
| InputCountField::encode(input_count) |
|
| TempCountField::encode(temp_count) |
|
| - IsCallField::encode(false)),
|
| + IsCallField::encode(false) | IsControlField::encode(false)),
|
| pointer_map_(NULL) {
|
| for (size_t i = 0; i < output_count; ++i) {
|
| operands_[i] = outputs[i];
|
| @@ -550,6 +558,7 @@
|
| typedef BitField<size_t, 8, 16> InputCountField;
|
| typedef BitField<size_t, 24, 6> TempCountField;
|
| typedef BitField<bool, 30, 1> IsCallField;
|
| + typedef BitField<bool, 31, 1> IsControlField;
|
|
|
| InstructionCode opcode_;
|
| uint32_t bit_field_;
|
|
|