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

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

Issue 6020014: Fix comparison bug on ARM.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: 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 | « 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 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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 int false_block = chunk_->LookupDestination(instr->false_block_id()); 1070 int false_block = chunk_->LookupDestination(instr->false_block_id());
1071 1071
1072 Representation r = instr->hydrogen()->representation(); 1072 Representation r = instr->hydrogen()->representation();
1073 if (r.IsInteger32()) { 1073 if (r.IsInteger32()) {
1074 Register reg = ToRegister(instr->input()); 1074 Register reg = ToRegister(instr->input());
1075 __ cmp(reg, Operand(0)); 1075 __ cmp(reg, Operand(0));
1076 EmitBranch(true_block, false_block, nz); 1076 EmitBranch(true_block, false_block, nz);
1077 } else if (r.IsDouble()) { 1077 } else if (r.IsDouble()) {
1078 DoubleRegister reg = ToDoubleRegister(instr->input()); 1078 DoubleRegister reg = ToDoubleRegister(instr->input());
1079 __ vcmp(reg, 0.0); 1079 __ vcmp(reg, 0.0);
1080 __ vmrs(pc); // Move vector status bits to normal status bits.
1080 EmitBranch(true_block, false_block, ne); 1081 EmitBranch(true_block, false_block, ne);
1081 } else { 1082 } else {
1082 ASSERT(r.IsTagged()); 1083 ASSERT(r.IsTagged());
1083 Register reg = ToRegister(instr->input()); 1084 Register reg = ToRegister(instr->input());
1084 if (instr->hydrogen()->type().IsBoolean()) { 1085 if (instr->hydrogen()->type().IsBoolean()) {
1085 __ LoadRoot(ip, Heap::kTrueValueRootIndex); 1086 __ LoadRoot(ip, Heap::kTrueValueRootIndex);
1086 __ cmp(reg, ip); 1087 __ cmp(reg, ip);
1087 EmitBranch(true_block, false_block, eq); 1088 EmitBranch(true_block, false_block, eq);
1088 } else { 1089 } else {
1089 Label* true_label = chunk_->GetAssemblyLabel(true_block); 1090 Label* true_label = chunk_->GetAssemblyLabel(true_block);
(...skipping 17 matching lines...) Expand all
1107 Label call_stub; 1108 Label call_stub;
1108 DoubleRegister dbl_scratch = d0; 1109 DoubleRegister dbl_scratch = d0;
1109 Register scratch = scratch0(); 1110 Register scratch = scratch0();
1110 __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset)); 1111 __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset));
1111 __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex); 1112 __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex);
1112 __ cmp(scratch, Operand(ip)); 1113 __ cmp(scratch, Operand(ip));
1113 __ b(ne, &call_stub); 1114 __ b(ne, &call_stub);
1114 __ sub(ip, reg, Operand(kHeapObjectTag)); 1115 __ sub(ip, reg, Operand(kHeapObjectTag));
1115 __ vldr(dbl_scratch, ip, HeapNumber::kValueOffset); 1116 __ vldr(dbl_scratch, ip, HeapNumber::kValueOffset);
1116 __ vcmp(dbl_scratch, 0.0); 1117 __ vcmp(dbl_scratch, 0.0);
1118 __ vmrs(pc); // Move vector status bits to normal status bits.
1117 __ b(eq, false_label); 1119 __ b(eq, false_label);
1118 __ b(true_label); 1120 __ b(true_label);
1119 1121
1120 // The conversion stub doesn't cause garbage collections so it's 1122 // The conversion stub doesn't cause garbage collections so it's
1121 // safe to not record a safepoint after the call. 1123 // safe to not record a safepoint after the call.
1122 __ bind(&call_stub); 1124 __ bind(&call_stub);
1123 ToBooleanStub stub(reg); 1125 ToBooleanStub stub(reg);
1124 RegList saved_regs = kJSCallerSaved | kCalleeSaved; 1126 RegList saved_regs = kJSCallerSaved | kCalleeSaved;
1125 __ stm(db_w, sp, saved_regs); 1127 __ stm(db_w, sp, saved_regs);
1126 __ CallStub(&stub); 1128 __ CallStub(&stub);
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 2366
2365 2367
2366 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 2368 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
2367 Abort("DoOsrEntry unimplemented."); 2369 Abort("DoOsrEntry unimplemented.");
2368 } 2370 }
2369 2371
2370 2372
2371 #undef __ 2373 #undef __
2372 2374
2373 } } // namespace v8::internal 2375 } } // 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