Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: src/a64/lithium-codegen-a64.cc

Issue 170363002: A64: Fix register usage in LCodeGen::ArgumentsLength (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 __ Ldr(result, 1641 __ Ldr(result,
1642 MemOperand(previous_fp, StandardFrameConstants::kContextOffset)); 1642 MemOperand(previous_fp, StandardFrameConstants::kContextOffset));
1643 __ Cmp(result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 1643 __ Cmp(result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
1644 __ Csel(result, fp, previous_fp, ne); 1644 __ Csel(result, fp, previous_fp, ne);
1645 } 1645 }
1646 } 1646 }
1647 1647
1648 1648
1649 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { 1649 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) {
1650 Register elements = ToRegister(instr->elements()); 1650 Register elements = ToRegister(instr->elements());
1651 Register result = ToRegister(instr->result()); 1651 Register result = ToRegister32(instr->result());
1652 Label done; 1652 Label done;
1653 1653
1654 // If no arguments adaptor frame the number of arguments is fixed. 1654 // If no arguments adaptor frame the number of arguments is fixed.
1655 __ Cmp(fp, elements); 1655 __ Cmp(fp, elements);
1656 __ Mov(result, scope()->num_parameters()); 1656 __ Mov(result, scope()->num_parameters());
1657 __ B(eq, &done); 1657 __ B(eq, &done);
1658 1658
1659 // Arguments adaptor frame present. Get argument length from there. 1659 // Arguments adaptor frame present. Get argument length from there.
1660 __ Ldr(result, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 1660 __ Ldr(result.X(), MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
1661 __ Ldrsw(result, 1661 __ Ldr(result,
1662 UntagSmiMemOperand(result, 1662 UntagSmiMemOperand(result.X(),
1663 ArgumentsAdaptorFrameConstants::kLengthOffset)); 1663 ArgumentsAdaptorFrameConstants::kLengthOffset));
1664 1664
1665 // Argument length is in result register. 1665 // Argument length is in result register.
1666 __ Bind(&done); 1666 __ Bind(&done);
1667 } 1667 }
1668 1668
1669 1669
1670 void LCodeGen::DoArithmeticD(LArithmeticD* instr) { 1670 void LCodeGen::DoArithmeticD(LArithmeticD* instr) {
1671 DoubleRegister left = ToDoubleRegister(instr->left()); 1671 DoubleRegister left = ToDoubleRegister(instr->left());
1672 DoubleRegister right = ToDoubleRegister(instr->right()); 1672 DoubleRegister right = ToDoubleRegister(instr->right());
1673 DoubleRegister result = ToDoubleRegister(instr->result()); 1673 DoubleRegister result = ToDoubleRegister(instr->result());
(...skipping 4041 matching lines...) Expand 10 before | Expand all | Expand 10 after
5715 __ Bind(&out_of_object); 5715 __ Bind(&out_of_object);
5716 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5716 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5717 // Index is equal to negated out of object property index plus 1. 5717 // Index is equal to negated out of object property index plus 1.
5718 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5718 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5719 __ Ldr(result, FieldMemOperand(result, 5719 __ Ldr(result, FieldMemOperand(result,
5720 FixedArray::kHeaderSize - kPointerSize)); 5720 FixedArray::kHeaderSize - kPointerSize));
5721 __ Bind(&done); 5721 __ Bind(&done);
5722 } 5722 }
5723 5723
5724 } } // namespace v8::internal 5724 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698