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

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

Issue 8275035: Fix evaluation order of GT and LTE operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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') | src/ia32/full-codegen-ia32.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 2169
2170 2170
2171 void LCodeGen::DoCmpT(LCmpT* instr) { 2171 void LCodeGen::DoCmpT(LCmpT* instr) {
2172 Token::Value op = instr->op(); 2172 Token::Value op = instr->op();
2173 2173
2174 Handle<Code> ic = CompareIC::GetUninitialized(op); 2174 Handle<Code> ic = CompareIC::GetUninitialized(op);
2175 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2175 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2176 __ cmp(r0, Operand(0)); // This instruction also signals no smi code inlined. 2176 __ cmp(r0, Operand(0)); // This instruction also signals no smi code inlined.
2177 2177
2178 Condition condition = ComputeCompareCondition(op); 2178 Condition condition = ComputeCompareCondition(op);
2179 if (op == Token::GT || op == Token::LTE) {
2180 condition = ReverseCondition(condition);
2181 }
2182 __ LoadRoot(ToRegister(instr->result()), 2179 __ LoadRoot(ToRegister(instr->result()),
2183 Heap::kTrueValueRootIndex, 2180 Heap::kTrueValueRootIndex,
2184 condition); 2181 condition);
2185 __ LoadRoot(ToRegister(instr->result()), 2182 __ LoadRoot(ToRegister(instr->result()),
2186 Heap::kFalseValueRootIndex, 2183 Heap::kFalseValueRootIndex,
2187 NegateCondition(condition)); 2184 NegateCondition(condition));
2188 } 2185 }
2189 2186
2190 2187
2191 void LCodeGen::DoReturn(LReturn* instr) { 2188 void LCodeGen::DoReturn(LReturn* instr) {
(...skipping 2408 matching lines...) Expand 10 before | Expand all | Expand 10 after
4600 ASSERT(osr_pc_offset_ == -1); 4597 ASSERT(osr_pc_offset_ == -1);
4601 osr_pc_offset_ = masm()->pc_offset(); 4598 osr_pc_offset_ = masm()->pc_offset();
4602 } 4599 }
4603 4600
4604 4601
4605 4602
4606 4603
4607 #undef __ 4604 #undef __
4608 4605
4609 } } // namespace v8::internal 4606 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698