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

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

Issue 6040008: ARM: Support DoCheckInstanceType in lithium codegenerator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove use of ip and unused temp register. Created 9 years, 11 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/arm/lithium-arm.cc ('k') | 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 2149
2150 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { 2150 void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
2151 LOperand* input = instr->input(); 2151 LOperand* input = instr->input();
2152 ASSERT(input->IsRegister()); 2152 ASSERT(input->IsRegister());
2153 __ tst(ToRegister(input), Operand(kSmiTagMask)); 2153 __ tst(ToRegister(input), Operand(kSmiTagMask));
2154 DeoptimizeIf(instr->condition(), instr->environment()); 2154 DeoptimizeIf(instr->condition(), instr->environment());
2155 } 2155 }
2156 2156
2157 2157
2158 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 2158 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
2159 Abort("DoCheckInstanceType unimplemented."); 2159 Register input = ToRegister(instr->input());
2160 Register scratch = scratch0();
2161 InstanceType first = instr->hydrogen()->first();
2162 InstanceType last = instr->hydrogen()->last();
2163
2164 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset));
2165 __ ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
2166 __ cmp(scratch, Operand(first));
2167
2168 // If there is only one type in the interval check for equality.
2169 if (first == last) {
2170 DeoptimizeIf(ne, instr->environment());
2171 } else {
2172 DeoptimizeIf(lo, instr->environment());
2173 // Omit check for the last type.
2174 if (last != LAST_TYPE) {
2175 __ cmp(scratch, Operand(last));
2176 DeoptimizeIf(hi, instr->environment());
2177 }
2178 }
2160 } 2179 }
2161 2180
2162 2181
2163 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 2182 void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
2164 ASSERT(instr->input()->IsRegister()); 2183 ASSERT(instr->input()->IsRegister());
2165 Register reg = ToRegister(instr->input()); 2184 Register reg = ToRegister(instr->input());
2166 __ cmp(reg, Operand(instr->hydrogen()->target())); 2185 __ cmp(reg, Operand(instr->hydrogen()->target()));
2167 DeoptimizeIf(ne, instr->environment()); 2186 DeoptimizeIf(ne, instr->environment());
2168 } 2187 }
2169 2188
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
2462 2481
2463 2482
2464 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 2483 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
2465 Abort("DoOsrEntry unimplemented."); 2484 Abort("DoOsrEntry unimplemented.");
2466 } 2485 }
2467 2486
2468 2487
2469 #undef __ 2488 #undef __
2470 2489
2471 } } // namespace v8::internal 2490 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698