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

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

Issue 2078013: ARM: Fix generating two ldr instructions in place of ldrd.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 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/assembler-arm.h ('k') | no next file » | 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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 void Assembler::ldrsh(Register dst, const MemOperand& src, Condition cond) { 1352 void Assembler::ldrsh(Register dst, const MemOperand& src, Condition cond) {
1353 addrmod3(cond | L | B7 | S6 | H | B4, dst, src); 1353 addrmod3(cond | L | B7 | S6 | H | B4, dst, src);
1354 } 1354 }
1355 1355
1356 1356
1357 void Assembler::ldrd(Register dst, const MemOperand& src, Condition cond) { 1357 void Assembler::ldrd(Register dst, const MemOperand& src, Condition cond) {
1358 ASSERT(src.rm().is(no_reg)); 1358 ASSERT(src.rm().is(no_reg));
1359 #ifdef CAN_USE_ARMV7_INSTRUCTIONS 1359 #ifdef CAN_USE_ARMV7_INSTRUCTIONS
1360 addrmod3(cond | B7 | B6 | B4, dst, src); 1360 addrmod3(cond | B7 | B6 | B4, dst, src);
1361 #else 1361 #else
1362 ldr(dst, src, cond); 1362 // Generate two ldr instructions if ldrd is not available.
1363 MemOperand src1(src); 1363 MemOperand src1(src);
1364 src1.set_offset(src1.offset() + 4); 1364 src1.set_offset(src1.offset() + 4);
1365 Register dst1(dst); 1365 Register dst1(dst);
1366 dst1.code_ = dst1.code_ + 1; 1366 dst1.set_code(dst1.code() + 1);
1367 ldr(dst1, src1, cond); 1367 if (dst.is(src.rn())) {
1368 ldr(dst1, src1, cond);
1369 ldr(dst, src, cond);
1370 } else {
1371 ldr(dst, src, cond);
1372 ldr(dst1, src1, cond);
1373 }
1368 #endif 1374 #endif
1369 } 1375 }
1370 1376
1371 1377
1372 void Assembler::strd(Register src, const MemOperand& dst, Condition cond) { 1378 void Assembler::strd(Register src, const MemOperand& dst, Condition cond) {
1373 ASSERT(dst.rm().is(no_reg)); 1379 ASSERT(dst.rm().is(no_reg));
1374 #ifdef CAN_USE_ARMV7_INSTRUCTIONS 1380 #ifdef CAN_USE_ARMV7_INSTRUCTIONS
1375 addrmod3(cond | B7 | B6 | B5 | B4, src, dst); 1381 addrmod3(cond | B7 | B6 | B5 | B4, src, dst);
1376 #else 1382 #else
1377 str(src, dst, cond); 1383 // Generate two str instructions if strd is not available.
1378 MemOperand dst1(dst); 1384 MemOperand dst1(dst);
1379 dst1.set_offset(dst1.offset() + 4); 1385 dst1.set_offset(dst1.offset() + 4);
1380 Register src1(src); 1386 Register src1(src);
1381 src1.code_ = src1.code_ + 1; 1387 src1.set_code(src1.code() + 1);
1388 str(src, dst, cond);
1382 str(src1, dst1, cond); 1389 str(src1, dst1, cond);
1383 #endif 1390 #endif
1384 } 1391 }
1385 1392
1386 // Load/Store multiple instructions. 1393 // Load/Store multiple instructions.
1387 void Assembler::ldm(BlockAddrMode am, 1394 void Assembler::ldm(BlockAddrMode am,
1388 Register base, 1395 Register base,
1389 RegList dst, 1396 RegList dst,
1390 Condition cond) { 1397 Condition cond) {
1391 // ABI stack constraint: ldmxx base, {..sp..} base != sp is not restartable. 1398 // ABI stack constraint: ldmxx base, {..sp..} base != sp is not restartable.
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 2261
2255 // Since a constant pool was just emitted, move the check offset forward by 2262 // Since a constant pool was just emitted, move the check offset forward by
2256 // the standard interval. 2263 // the standard interval.
2257 next_buffer_check_ = pc_offset() + kCheckConstInterval; 2264 next_buffer_check_ = pc_offset() + kCheckConstInterval;
2258 } 2265 }
2259 2266
2260 2267
2261 } } // namespace v8::internal 2268 } } // namespace v8::internal
2262 2269
2263 #endif // V8_TARGET_ARCH_ARM && V8_ARM_VARIANT_ARM 2270 #endif // V8_TARGET_ARCH_ARM && V8_ARM_VARIANT_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698