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

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

Issue 6197003: ARM: Always use the overflow flag to check for NaNs participating in a floati... (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 | « src/arm/assembler-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('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 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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 if (r.IsInteger32()) { 1075 if (r.IsInteger32()) {
1076 Register reg = ToRegister(instr->input()); 1076 Register reg = ToRegister(instr->input());
1077 __ cmp(reg, Operand(0)); 1077 __ cmp(reg, Operand(0));
1078 EmitBranch(true_block, false_block, nz); 1078 EmitBranch(true_block, false_block, nz);
1079 } else if (r.IsDouble()) { 1079 } else if (r.IsDouble()) {
1080 DoubleRegister reg = ToDoubleRegister(instr->input()); 1080 DoubleRegister reg = ToDoubleRegister(instr->input());
1081 Register scratch = scratch0(); 1081 Register scratch = scratch0();
1082 1082
1083 // Test the double value. Zero and NaN are false. 1083 // Test the double value. Zero and NaN are false.
1084 __ VFPCompareAndLoadFlags(reg, 0.0, scratch); 1084 __ VFPCompareAndLoadFlags(reg, 0.0, scratch);
1085 __ tst(scratch, Operand(kVFPZConditionFlagBit | kVFPInvalidExceptionBit)); 1085 __ tst(scratch, Operand(kVFPZConditionFlagBit | kVFPVConditionFlagBit));
1086 EmitBranch(true_block, false_block, ne); 1086 EmitBranch(true_block, false_block, ne);
1087 } else { 1087 } else {
1088 ASSERT(r.IsTagged()); 1088 ASSERT(r.IsTagged());
1089 Register reg = ToRegister(instr->input()); 1089 Register reg = ToRegister(instr->input());
1090 if (instr->hydrogen()->type().IsBoolean()) { 1090 if (instr->hydrogen()->type().IsBoolean()) {
1091 __ LoadRoot(ip, Heap::kTrueValueRootIndex); 1091 __ LoadRoot(ip, Heap::kTrueValueRootIndex);
1092 __ cmp(reg, ip); 1092 __ cmp(reg, ip);
1093 EmitBranch(true_block, false_block, eq); 1093 EmitBranch(true_block, false_block, eq);
1094 } else { 1094 } else {
1095 Label* true_label = chunk_->GetAssemblyLabel(true_block); 1095 Label* true_label = chunk_->GetAssemblyLabel(true_block);
(...skipping 17 matching lines...) Expand all
1113 Label call_stub; 1113 Label call_stub;
1114 DoubleRegister dbl_scratch = d0; 1114 DoubleRegister dbl_scratch = d0;
1115 Register scratch = scratch0(); 1115 Register scratch = scratch0();
1116 __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset)); 1116 __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset));
1117 __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex); 1117 __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex);
1118 __ cmp(scratch, Operand(ip)); 1118 __ cmp(scratch, Operand(ip));
1119 __ b(ne, &call_stub); 1119 __ b(ne, &call_stub);
1120 __ sub(ip, reg, Operand(kHeapObjectTag)); 1120 __ sub(ip, reg, Operand(kHeapObjectTag));
1121 __ vldr(dbl_scratch, ip, HeapNumber::kValueOffset); 1121 __ vldr(dbl_scratch, ip, HeapNumber::kValueOffset);
1122 __ VFPCompareAndLoadFlags(dbl_scratch, 0.0, scratch); 1122 __ VFPCompareAndLoadFlags(dbl_scratch, 0.0, scratch);
1123 __ tst(scratch, Operand(kVFPZConditionFlagBit | kVFPInvalidExceptionBit)); 1123 __ tst(scratch, Operand(kVFPZConditionFlagBit | kVFPVConditionFlagBit));
1124 __ b(ne, false_label); 1124 __ b(ne, false_label);
1125 __ b(true_label); 1125 __ b(true_label);
1126 1126
1127 // The conversion stub doesn't cause garbage collections so it's 1127 // The conversion stub doesn't cause garbage collections so it's
1128 // safe to not record a safepoint after the call. 1128 // safe to not record a safepoint after the call.
1129 __ bind(&call_stub); 1129 __ bind(&call_stub);
1130 ToBooleanStub stub(reg); 1130 ToBooleanStub stub(reg);
1131 RegList saved_regs = kJSCallerSaved | kCalleeSaved; 1131 RegList saved_regs = kJSCallerSaved | kCalleeSaved;
1132 __ stm(db_w, sp, saved_regs); 1132 __ stm(db_w, sp, saved_regs);
1133 __ CallStub(&stub); 1133 __ CallStub(&stub);
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
2646 2646
2647 2647
2648 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 2648 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
2649 Abort("DoOsrEntry unimplemented."); 2649 Abort("DoOsrEntry unimplemented.");
2650 } 2650 }
2651 2651
2652 2652
2653 #undef __ 2653 #undef __
2654 2654
2655 } } // namespace v8::internal 2655 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698