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

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

Issue 7097015: Add missing branches in code generated for LModI with power-of-2 divisor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 | src/ia32/lithium-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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 881
882 Label positive_dividend, done; 882 Label positive_dividend, done;
883 __ cmp(dividend, Operand(0)); 883 __ cmp(dividend, Operand(0));
884 __ b(pl, &positive_dividend); 884 __ b(pl, &positive_dividend);
885 __ rsb(dividend, dividend, Operand(0)); 885 __ rsb(dividend, dividend, Operand(0));
886 __ and_(dividend, dividend, Operand(divisor - 1)); 886 __ and_(dividend, dividend, Operand(divisor - 1));
887 __ rsb(dividend, dividend, Operand(0), SetCC); 887 __ rsb(dividend, dividend, Operand(0), SetCC);
888 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { 888 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
889 __ b(ne, &done); 889 __ b(ne, &done);
890 DeoptimizeIf(al, instr->environment()); 890 DeoptimizeIf(al, instr->environment());
891 } else {
892 __ b(al, &done);
Mads Ager (chromium) 2011/06/15 19:53:31 Just use '__ b(&done);'?
891 } 893 }
892 __ bind(&positive_dividend); 894 __ bind(&positive_dividend);
893 __ and_(dividend, dividend, Operand(divisor - 1)); 895 __ and_(dividend, dividend, Operand(divisor - 1));
894 __ bind(&done); 896 __ bind(&done);
895 return; 897 return;
896 } 898 }
897 899
898 // These registers hold untagged 32 bit values. 900 // These registers hold untagged 32 bit values.
899 Register left = ToRegister(instr->InputAt(0)); 901 Register left = ToRegister(instr->InputAt(0));
900 Register right = ToRegister(instr->InputAt(1)); 902 Register right = ToRegister(instr->InputAt(1));
(...skipping 3687 matching lines...) Expand 10 before | Expand all | Expand 10 after
4588 ASSERT(osr_pc_offset_ == -1); 4590 ASSERT(osr_pc_offset_ == -1);
4589 osr_pc_offset_ = masm()->pc_offset(); 4591 osr_pc_offset_ = masm()->pc_offset();
4590 } 4592 }
4591 4593
4592 4594
4593 4595
4594 4596
4595 #undef __ 4597 #undef __
4596 4598
4597 } } // namespace v8::internal 4599 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698