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 6312059: ARM: Add multiplication and modulus to the type recording binary operation st... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 10 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/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('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 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 // the right hand side. 1046 // the right hand side.
1047 __ cmp(scratch, right); 1047 __ cmp(scratch, right);
1048 __ mov(result, scratch, LeaveCC, lt); 1048 __ mov(result, scratch, LeaveCC, lt);
1049 __ b(lt, &done); 1049 __ b(lt, &done);
1050 // If not, reduce the left hand side by the right hand 1050 // If not, reduce the left hand side by the right hand
1051 // side and check again. 1051 // side and check again.
1052 if (i < kUnfolds - 1) __ sub(scratch, scratch, right); 1052 if (i < kUnfolds - 1) __ sub(scratch, scratch, right);
1053 } 1053 }
1054 1054
1055 // Check for power of two on the right hand side. 1055 // Check for power of two on the right hand side.
1056 __ sub(scratch, right, Operand(1), SetCC); 1056 __ JumpIfNotPowerOfTwoOrZero(right, scratch, &call_stub);
1057 __ b(mi, &call_stub); 1057 // Perform modulo operation (scratch contains right - 1).
1058 __ tst(scratch, right);
1059 __ b(ne, &call_stub);
1060 // Perform modulo operation.
1061 __ and_(result, scratch, Operand(left)); 1058 __ and_(result, scratch, Operand(left));
1062 1059
1063 __ bind(&call_stub); 1060 __ bind(&call_stub);
1064 // Call the generic stub. The numbers in r0 and r1 have 1061 // Call the generic stub. The numbers in r0 and r1 have
1065 // to be tagged to Smis. If that is not possible, deoptimize. 1062 // to be tagged to Smis. If that is not possible, deoptimize.
1066 DeferredModI* deferred = new DeferredModI(this, instr); 1063 DeferredModI* deferred = new DeferredModI(this, instr);
1067 __ TrySmiTag(left, &deoptimize, scratch); 1064 __ TrySmiTag(left, &deoptimize, scratch);
1068 __ TrySmiTag(right, &deoptimize, scratch); 1065 __ TrySmiTag(right, &deoptimize, scratch);
1069 1066
1070 __ b(al, deferred->entry()); 1067 __ b(al, deferred->entry());
(...skipping 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after
3690 3687
3691 3688
3692 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 3689 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
3693 Abort("DoOsrEntry unimplemented."); 3690 Abort("DoOsrEntry unimplemented.");
3694 } 3691 }
3695 3692
3696 3693
3697 #undef __ 3694 #undef __
3698 3695
3699 } } // namespace v8::internal 3696 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698