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

Side by Side Diff: src/arm/assembler-arm.cc

Issue 16082008: Increase sanity of integer division handling on ARM (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed Rodolph's comments Created 7 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/arm/code-stubs-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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 Condition cond) { 1361 Condition cond) {
1362 ASSERT(!dst.is(pc) && !src1.is(pc) && !src2.is(pc) && !srcA.is(pc)); 1362 ASSERT(!dst.is(pc) && !src1.is(pc) && !src2.is(pc) && !srcA.is(pc));
1363 emit(cond | B22 | B21 | dst.code()*B16 | srcA.code()*B12 | 1363 emit(cond | B22 | B21 | dst.code()*B16 | srcA.code()*B12 |
1364 src2.code()*B8 | B7 | B4 | src1.code()); 1364 src2.code()*B8 | B7 | B4 | src1.code());
1365 } 1365 }
1366 1366
1367 1367
1368 void Assembler::sdiv(Register dst, Register src1, Register src2, 1368 void Assembler::sdiv(Register dst, Register src1, Register src2,
1369 Condition cond) { 1369 Condition cond) {
1370 ASSERT(!dst.is(pc) && !src1.is(pc) && !src2.is(pc)); 1370 ASSERT(!dst.is(pc) && !src1.is(pc) && !src2.is(pc));
1371 ASSERT(IsEnabled(SUDIV));
1371 emit(cond | B26 | B25| B24 | B20 | dst.code()*B16 | 0xf * B12 | 1372 emit(cond | B26 | B25| B24 | B20 | dst.code()*B16 | 0xf * B12 |
1372 src2.code()*B8 | B4 | src1.code()); 1373 src2.code()*B8 | B4 | src1.code());
1373 } 1374 }
1374 1375
1375 1376
1376 void Assembler::mul(Register dst, Register src1, Register src2, 1377 void Assembler::mul(Register dst, Register src1, Register src2,
1377 SBit s, Condition cond) { 1378 SBit s, Condition cond) {
1378 ASSERT(!dst.is(pc) && !src1.is(pc) && !src2.is(pc)); 1379 ASSERT(!dst.is(pc) && !src1.is(pc) && !src2.is(pc));
1379 // dst goes in bits 16-19 for this instruction! 1380 // dst goes in bits 16-19 for this instruction!
1380 emit(cond | s | dst.code()*B16 | src2.code()*B8 | B7 | B4 | src1.code()); 1381 emit(cond | s | dst.code()*B16 | src2.code()*B8 | B7 | B4 | src1.code());
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
3101 3102
3102 // Since a constant pool was just emitted, move the check offset forward by 3103 // Since a constant pool was just emitted, move the check offset forward by
3103 // the standard interval. 3104 // the standard interval.
3104 next_buffer_check_ = pc_offset() + kCheckPoolInterval; 3105 next_buffer_check_ = pc_offset() + kCheckPoolInterval;
3105 } 3106 }
3106 3107
3107 3108
3108 } } // namespace v8::internal 3109 } } // namespace v8::internal
3109 3110
3110 #endif // V8_TARGET_ARCH_ARM 3111 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698