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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/ia32/ic-ia32.cc ('k') | src/ia32/lithium-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 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 } 2022 }
2023 2023
2024 2024
2025 void LCodeGen::DoCmpT(LCmpT* instr) { 2025 void LCodeGen::DoCmpT(LCmpT* instr) {
2026 Token::Value op = instr->op(); 2026 Token::Value op = instr->op();
2027 2027
2028 Handle<Code> ic = CompareIC::GetUninitialized(op); 2028 Handle<Code> ic = CompareIC::GetUninitialized(op);
2029 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2029 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2030 2030
2031 Condition condition = ComputeCompareCondition(op); 2031 Condition condition = ComputeCompareCondition(op);
2032 if (op == Token::GT || op == Token::LTE) {
2033 condition = ReverseCondition(condition);
2034 }
2035 Label true_value, done; 2032 Label true_value, done;
2036 __ test(eax, Operand(eax)); 2033 __ test(eax, Operand(eax));
2037 __ j(condition, &true_value, Label::kNear); 2034 __ j(condition, &true_value, Label::kNear);
2038 __ mov(ToRegister(instr->result()), factory()->false_value()); 2035 __ mov(ToRegister(instr->result()), factory()->false_value());
2039 __ jmp(&done, Label::kNear); 2036 __ jmp(&done, Label::kNear);
2040 __ bind(&true_value); 2037 __ bind(&true_value);
2041 __ mov(ToRegister(instr->result()), factory()->true_value()); 2038 __ mov(ToRegister(instr->result()), factory()->true_value());
2042 __ bind(&done); 2039 __ bind(&done);
2043 } 2040 }
2044 2041
(...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after
4523 env->deoptimization_index()); 4520 env->deoptimization_index());
4524 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4521 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4525 } 4522 }
4526 4523
4527 4524
4528 #undef __ 4525 #undef __
4529 4526
4530 } } // namespace v8::internal 4527 } } // namespace v8::internal
4531 4528
4532 #endif // V8_TARGET_ARCH_IA32 4529 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698