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

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

Issue 10807066: Add assertions to limit register count for VSTM and VLDM. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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 | 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 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 // cond(31-28) | 110(27-25)| PUDW0(24-20) | Rbase(19-16) | 1848 // cond(31-28) | 110(27-25)| PUDW0(24-20) | Rbase(19-16) |
1849 // first(15-12) | 1011(11-8) | (count * 2) 1849 // first(15-12) | 1011(11-8) | (count * 2)
1850 ASSERT(CpuFeatures::IsEnabled(VFP3)); 1850 ASSERT(CpuFeatures::IsEnabled(VFP3));
1851 ASSERT_LE(first.code(), last.code()); 1851 ASSERT_LE(first.code(), last.code());
1852 ASSERT(am == ia || am == ia_w || am == db_w); 1852 ASSERT(am == ia || am == ia_w || am == db_w);
1853 ASSERT(!base.is(pc)); 1853 ASSERT(!base.is(pc));
1854 1854
1855 int sd, d; 1855 int sd, d;
1856 first.split_code(&sd, &d); 1856 first.split_code(&sd, &d);
1857 int count = last.code() - first.code() + 1; 1857 int count = last.code() - first.code() + 1;
1858 ASSERT(count <= 16);
1858 emit(cond | B27 | B26 | am | d*B22 | base.code()*B16 | sd*B12 | 1859 emit(cond | B27 | B26 | am | d*B22 | base.code()*B16 | sd*B12 |
1859 0xB*B8 | count*2); 1860 0xB*B8 | count*2);
1860 } 1861 }
1861 1862
1862 void Assembler::vldm(BlockAddrMode am, 1863 void Assembler::vldm(BlockAddrMode am,
1863 Register base, 1864 Register base,
1864 SwVfpRegister first, 1865 SwVfpRegister first,
1865 SwVfpRegister last, 1866 SwVfpRegister last,
1866 Condition cond) { 1867 Condition cond) {
1867 // Instruction details available in ARM DDI 0406A, A8-626. 1868 // Instruction details available in ARM DDI 0406A, A8-626.
1868 // cond(31-28) | 110(27-25)| PUDW1(24-20) | Rbase(19-16) | 1869 // cond(31-28) | 110(27-25)| PUDW1(24-20) | Rbase(19-16) |
1869 // first(15-12) | 1010(11-8) | (count/2) 1870 // first(15-12) | 1010(11-8) | (count/2)
1870 ASSERT(CpuFeatures::IsEnabled(VFP3)); 1871 ASSERT(CpuFeatures::IsEnabled(VFP3));
1871 ASSERT_LE(first.code(), last.code()); 1872 ASSERT_LE(first.code(), last.code());
1872 ASSERT(am == ia || am == ia_w || am == db_w); 1873 ASSERT(am == ia || am == ia_w || am == db_w);
1873 ASSERT(!base.is(pc)); 1874 ASSERT(!base.is(pc));
1874 1875
1875 int sd, d; 1876 int sd, d;
1876 first.split_code(&sd, &d); 1877 first.split_code(&sd, &d);
1877 int count = last.code() - first.code() + 1; 1878 int count = last.code() - first.code() + 1;
1879 ASSERT(count <= 16);
1878 emit(cond | B27 | B26 | am | d*B22 | B20 | base.code()*B16 | sd*B12 | 1880 emit(cond | B27 | B26 | am | d*B22 | B20 | base.code()*B16 | sd*B12 |
1879 0xA*B8 | count); 1881 0xA*B8 | count);
1880 } 1882 }
1881 1883
1882 1884
1883 void Assembler::vstm(BlockAddrMode am, 1885 void Assembler::vstm(BlockAddrMode am,
1884 Register base, 1886 Register base,
1885 SwVfpRegister first, 1887 SwVfpRegister first,
1886 SwVfpRegister last, 1888 SwVfpRegister last,
1887 Condition cond) { 1889 Condition cond) {
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 2671
2670 // Since a constant pool was just emitted, move the check offset forward by 2672 // Since a constant pool was just emitted, move the check offset forward by
2671 // the standard interval. 2673 // the standard interval.
2672 next_buffer_check_ = pc_offset() + kCheckPoolInterval; 2674 next_buffer_check_ = pc_offset() + kCheckPoolInterval;
2673 } 2675 }
2674 2676
2675 2677
2676 } } // namespace v8::internal 2678 } } // namespace v8::internal
2677 2679
2678 #endif // V8_TARGET_ARCH_ARM 2680 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698