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

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

Issue 23691067: Remove unused HIsNumberAndBranch instruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 __ BranchF(chunk_->GetAssemblyLabel(false_block), NULL, 2060 __ BranchF(chunk_->GetAssemblyLabel(false_block), NULL,
2061 condition, src1, src2); 2061 condition, src1, src2);
2062 } 2062 }
2063 2063
2064 2064
2065 void LCodeGen::DoDebugBreak(LDebugBreak* instr) { 2065 void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
2066 __ stop("LDebugBreak"); 2066 __ stop("LDebugBreak");
2067 } 2067 }
2068 2068
2069 2069
2070 void LCodeGen::DoIsNumberAndBranch(LIsNumberAndBranch* instr) {
2071 Representation r = instr->hydrogen()->value()->representation();
2072 if (r.IsSmiOrInteger32() || r.IsDouble()) {
2073 EmitBranch(instr, al, zero_reg, Operand(zero_reg));
2074 } else {
2075 ASSERT(r.IsTagged());
2076 Register reg = ToRegister(instr->value());
2077 HType type = instr->hydrogen()->value()->type();
2078 if (type.IsTaggedNumber()) {
2079 EmitBranch(instr, al, zero_reg, Operand(zero_reg));
2080 }
2081 __ JumpIfSmi(reg, instr->TrueLabel(chunk_));
2082 __ lw(scratch0(), FieldMemOperand(reg, HeapObject::kMapOffset));
2083 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex);
2084 EmitBranch(instr, eq, scratch0(), Operand(at));
2085 }
2086 }
2087
2088
2089 void LCodeGen::DoBranch(LBranch* instr) { 2070 void LCodeGen::DoBranch(LBranch* instr) {
2090 Representation r = instr->hydrogen()->value()->representation(); 2071 Representation r = instr->hydrogen()->value()->representation();
2091 if (r.IsInteger32() || r.IsSmi()) { 2072 if (r.IsInteger32() || r.IsSmi()) {
2092 ASSERT(!info()->IsStub()); 2073 ASSERT(!info()->IsStub());
2093 Register reg = ToRegister(instr->value()); 2074 Register reg = ToRegister(instr->value());
2094 EmitBranch(instr, ne, reg, Operand(zero_reg)); 2075 EmitBranch(instr, ne, reg, Operand(zero_reg));
2095 } else if (r.IsDouble()) { 2076 } else if (r.IsDouble()) {
2096 ASSERT(!info()->IsStub()); 2077 ASSERT(!info()->IsStub());
2097 DoubleRegister reg = ToDoubleRegister(instr->value()); 2078 DoubleRegister reg = ToDoubleRegister(instr->value());
2098 // Test the double value. Zero and NaN are false. 2079 // Test the double value. Zero and NaN are false.
(...skipping 3688 matching lines...) Expand 10 before | Expand all | Expand 10 after
5787 __ Subu(scratch, result, scratch); 5768 __ Subu(scratch, result, scratch);
5788 __ lw(result, FieldMemOperand(scratch, 5769 __ lw(result, FieldMemOperand(scratch,
5789 FixedArray::kHeaderSize - kPointerSize)); 5770 FixedArray::kHeaderSize - kPointerSize));
5790 __ bind(&done); 5771 __ bind(&done);
5791 } 5772 }
5792 5773
5793 5774
5794 #undef __ 5775 #undef __
5795 5776
5796 } } // namespace v8::internal 5777 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698