Commit 0213f7ac authored by jochen@chromium.org's avatar jochen@chromium.org

A64: Update DoAllocate() to use a W register for the size

Inputs should always be 32bit

BUG=none
R=m.m.capewell@googlemail.com, ulan@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/167123004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4058894c
...@@ -1505,8 +1505,9 @@ void LCodeGen::DoAllocate(LAllocate* instr) { ...@@ -1505,8 +1505,9 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
__ Allocate(size, result, temp1, temp2, deferred->entry(), flags); __ Allocate(size, result, temp1, temp2, deferred->entry(), flags);
} else { } else {
Register size = ToRegister(instr->size()); Register size = ToRegister32(instr->size());
__ Allocate(size, result, temp1, temp2, deferred->entry(), flags); __ Sxtw(size.X(), size);
__ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags);
} }
__ Bind(deferred->exit()); __ Bind(deferred->exit());
...@@ -1516,7 +1517,7 @@ void LCodeGen::DoAllocate(LAllocate* instr) { ...@@ -1516,7 +1517,7 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
__ Mov(temp1, size - kPointerSize); __ Mov(temp1, size - kPointerSize);
} else { } else {
__ Sub(temp1, ToRegister(instr->size()), kPointerSize); __ Sub(temp1.W(), ToRegister32(instr->size()), kPointerSize);
} }
__ Sub(result, result, kHeapObjectTag); __ Sub(result, result, kHeapObjectTag);
...@@ -1545,7 +1546,7 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) { ...@@ -1545,7 +1546,7 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
if (instr->size()->IsConstantOperand()) { if (instr->size()->IsConstantOperand()) {
__ Mov(size, Operand(ToSmi(LConstantOperand::cast(instr->size())))); __ Mov(size, Operand(ToSmi(LConstantOperand::cast(instr->size()))));
} else { } else {
__ SmiTag(size, ToRegister(instr->size())); __ SmiTag(size, ToRegister32(instr->size()).X());
} }
int flags = AllocateDoubleAlignFlag::encode( int flags = AllocateDoubleAlignFlag::encode(
instr->hydrogen()->MustAllocateDoubleAligned()); instr->hydrogen()->MustAllocateDoubleAligned());
......
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