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

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

Issue 148323010: A64: Replace EmitBranch(instr, al) with unconditional branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Real fix 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 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 1730
1731 if (type.IsBoolean()) { 1731 if (type.IsBoolean()) {
1732 ASSERT(!info()->IsStub()); 1732 ASSERT(!info()->IsStub());
1733 __ CompareRoot(value, Heap::kTrueValueRootIndex); 1733 __ CompareRoot(value, Heap::kTrueValueRootIndex);
1734 EmitBranch(instr, eq); 1734 EmitBranch(instr, eq);
1735 } else if (type.IsSmi()) { 1735 } else if (type.IsSmi()) {
1736 ASSERT(!info()->IsStub()); 1736 ASSERT(!info()->IsStub());
1737 EmitCompareAndBranch(instr, ne, value, Operand(Smi::FromInt(0))); 1737 EmitCompareAndBranch(instr, ne, value, Operand(Smi::FromInt(0)));
1738 } else if (type.IsJSArray()) { 1738 } else if (type.IsJSArray()) {
1739 ASSERT(!info()->IsStub()); 1739 ASSERT(!info()->IsStub());
1740 EmitBranch(instr, al); 1740 EmitGoto(instr->TrueDestination(chunk()));
1741 } else if (type.IsHeapNumber()) { 1741 } else if (type.IsHeapNumber()) {
1742 ASSERT(!info()->IsStub()); 1742 ASSERT(!info()->IsStub());
1743 __ Ldr(double_scratch(), FieldMemOperand(value, 1743 __ Ldr(double_scratch(), FieldMemOperand(value,
1744 HeapNumber::kValueOffset)); 1744 HeapNumber::kValueOffset));
1745 // Test the double value. Zero and NaN are false. 1745 // Test the double value. Zero and NaN are false.
1746 EmitBranchIfNonZeroNumber(instr, double_scratch(), double_scratch()); 1746 EmitBranchIfNonZeroNumber(instr, double_scratch(), double_scratch());
1747 } else if (type.IsString()) { 1747 } else if (type.IsString()) {
1748 ASSERT(!info()->IsStub()); 1748 ASSERT(!info()->IsStub());
1749 Register temp = ToRegister(instr->temp1()); 1749 Register temp = ToRegister(instr->temp1());
1750 __ Ldr(temp, FieldMemOperand(value, String::kLengthOffset)); 1750 __ Ldr(temp, FieldMemOperand(value, String::kLengthOffset));
(...skipping 3985 matching lines...) Expand 10 before | Expand all | Expand 10 after
5736 __ Bind(&out_of_object); 5736 __ Bind(&out_of_object);
5737 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5737 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5738 // Index is equal to negated out of object property index plus 1. 5738 // Index is equal to negated out of object property index plus 1.
5739 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5739 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5740 __ Ldr(result, FieldMemOperand(result, 5740 __ Ldr(result, FieldMemOperand(result,
5741 FixedArray::kHeaderSize - kPointerSize)); 5741 FixedArray::kHeaderSize - kPointerSize));
5742 __ Bind(&done); 5742 __ Bind(&done);
5743 } 5743 }
5744 5744
5745 } } // namespace v8::internal 5745 } } // 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