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
This commit is contained in:
jochen@chromium.org 2014-02-18 08:59:06 +00:00
parent 4058894c50
commit 0213f7acb4

View File

@ -1505,8 +1505,9 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
__ Allocate(size, result, temp1, temp2, deferred->entry(), flags);
} else {
Register size = ToRegister(instr->size());
__ Allocate(size, result, temp1, temp2, deferred->entry(), flags);
Register size = ToRegister32(instr->size());
__ Sxtw(size.X(), size);
__ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags);
}
__ Bind(deferred->exit());
@ -1516,7 +1517,7 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
__ Mov(temp1, size - kPointerSize);
} else {
__ Sub(temp1, ToRegister(instr->size()), kPointerSize);
__ Sub(temp1.W(), ToRegister32(instr->size()), kPointerSize);
}
__ Sub(result, result, kHeapObjectTag);
@ -1545,7 +1546,7 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
if (instr->size()->IsConstantOperand()) {
__ Mov(size, Operand(ToSmi(LConstantOperand::cast(instr->size()))));
} else {
__ SmiTag(size, ToRegister(instr->size()));
__ SmiTag(size, ToRegister32(instr->size()).X());
}
int flags = AllocateDoubleAlignFlag::encode(
instr->hydrogen()->MustAllocateDoubleAligned());