From 548428d955f6e68a09626c208d2e316d18f366a9 Mon Sep 17 00:00:00 2001 From: "jochen@chromium.org" Date: Mon, 6 Oct 2014 10:46:15 +0000 Subject: [PATCH] Make V8 compile with Win64 dbg BUG=chromium:420538 R=dcarney@chromium.org LOG=n Review URL: https://codereview.chromium.org/634493002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/allocation.cc | 2 +- src/compiler/instruction-selector.cc | 21 ++++++++++++--------- src/compiler/x64/code-generator-x64.cc | 2 +- src/compiler/x64/instruction-selector-x64.cc | 8 ++++---- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/allocation.cc b/src/allocation.cc index cae1c10..96fd71f 100644 --- a/src/allocation.cc +++ b/src/allocation.cc @@ -85,7 +85,7 @@ char* StrNDup(const char* str, int n) { void* AlignedAlloc(size_t size, size_t alignment) { DCHECK_LE(V8_ALIGNOF(void*), alignment); - DCHECK(base::bits::IsPowerOfTwo32(alignment)); + DCHECK(base::bits::IsPowerOfTwo64(alignment)); void* ptr; #if V8_OS_WIN ptr = _aligned_malloc(size, alignment); diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc index 09a8e01..1b2ea04 100644 --- a/src/compiler/instruction-selector.cc +++ b/src/compiler/instruction-selector.cc @@ -32,8 +32,8 @@ void InstructionSelector::SelectInstructions() { for (BasicBlockVectorIter i = blocks->begin(); i != blocks->end(); ++i) { BasicBlock* block = *i; if (!block->IsLoopHeader()) continue; - DCHECK_NE(0, block->PredecessorCount()); - DCHECK_NE(1, block->PredecessorCount()); + DCHECK_NE(0, static_cast(block->PredecessorCount())); + DCHECK_NE(1, static_cast(block->PredecessorCount())); for (BasicBlock::const_iterator j = block->begin(); j != block->end(); ++j) { Node* phi = *j; @@ -253,9 +253,11 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer, bool call_code_immediate, bool call_address_immediate) { OperandGenerator g(this); - DCHECK_EQ(call->op()->OutputCount(), buffer->descriptor->ReturnCount()); - DCHECK_EQ(OperatorProperties::GetValueInputCount(call->op()), - buffer->input_count() + buffer->frame_state_count()); + DCHECK_EQ(call->op()->OutputCount(), + static_cast(buffer->descriptor->ReturnCount())); + DCHECK_EQ( + OperatorProperties::GetValueInputCount(call->op()), + static_cast(buffer->input_count() + buffer->frame_state_count())); if (buffer->descriptor->ReturnCount() > 0) { // Collect the projections that represent multiple outputs from this call. @@ -303,7 +305,7 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer, buffer->descriptor->GetInputType(0))); break; } - DCHECK_EQ(1, buffer->instruction_args.size()); + DCHECK_EQ(1, static_cast(buffer->instruction_args.size())); // If the call needs a frame state, we insert the state information as // follows (n is the number of value inputs to the frame state): @@ -1059,9 +1061,10 @@ void InstructionSelector::AddFrameStateInputs( DCHECK_EQ(IrOpcode::kStateValues, locals->op()->opcode()); DCHECK_EQ(IrOpcode::kStateValues, stack->op()->opcode()); - DCHECK_EQ(descriptor->parameters_count(), parameters->InputCount()); - DCHECK_EQ(descriptor->locals_count(), locals->InputCount()); - DCHECK_EQ(descriptor->stack_count(), stack->InputCount()); + DCHECK_EQ(static_cast(descriptor->parameters_count()), + parameters->InputCount()); + DCHECK_EQ(static_cast(descriptor->locals_count()), locals->InputCount()); + DCHECK_EQ(static_cast(descriptor->stack_count()), stack->InputCount()); OperandGenerator g(this); for (int i = 0; i < static_cast(descriptor->parameters_count()); i++) { diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc index 6f9d68f..de8956e 100644 --- a/src/compiler/x64/code-generator-x64.cc +++ b/src/compiler/x64/code-generator-x64.cc @@ -651,7 +651,7 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr, // Materialize a full 64-bit 1 or 0 value. The result register is always the // last output of the instruction. Label check; - DCHECK_NE(0, instr->OutputCount()); + DCHECK_NE(0, static_cast(instr->OutputCount())); Register reg = i.OutputRegister(static_cast(instr->OutputCount() - 1)); Condition cc = no_condition; switch (condition) { diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc index f744a2c..7f9e40a 100644 --- a/src/compiler/x64/instruction-selector-x64.cc +++ b/src/compiler/x64/instruction-selector-x64.cc @@ -105,10 +105,10 @@ class AddressingModeMatcher { } if (displacement_operand_ != NULL) { // Pure displacement mode not supported by x64. - DCHECK_NE(input_count, 0); + DCHECK_NE(static_cast(input_count), 0); inputs[input_count++] = displacement_operand_; } - DCHECK_NE(input_count, 0); + DCHECK_NE(static_cast(input_count), 0); return input_count; } @@ -262,8 +262,8 @@ static void VisitBinop(InstructionSelector* selector, Node* node, outputs[output_count++] = g.DefineAsRegister(cont->result()); } - DCHECK_NE(0, input_count); - DCHECK_NE(0, output_count); + DCHECK_NE(0, static_cast(input_count)); + DCHECK_NE(0, static_cast(output_count)); DCHECK_GE(arraysize(inputs), input_count); DCHECK_GE(arraysize(outputs), output_count); -- 2.7.4