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

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

Issue 545155: Add vstr and vldr floating point load and store to ARM assembler, disassemble... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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') | src/arm/constants-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 (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 12 matching lines...) Expand all
23 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 23 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 24 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 28 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 30 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31 // OF THE POSSIBILITY OF SUCH DAMAGE. 31 // OF THE POSSIBILITY OF SUCH DAMAGE.
32 32
33 // The original source code covered by the above license above has been modified 33 // The original source code covered by the above license above has been
34 // significantly by Google Inc. 34 // modified significantly by Google Inc.
35 // Copyright 2006-2008 the V8 project authors. All rights reserved. 35 // Copyright 2010 the V8 project authors. All rights reserved.
36 36
37 #include "v8.h" 37 #include "v8.h"
38 38
39 #include "arm/assembler-arm-inl.h" 39 #include "arm/assembler-arm-inl.h"
40 #include "serialize.h" 40 #include "serialize.h"
41 41
42 namespace v8 { 42 namespace v8 {
43 namespace internal { 43 namespace internal {
44 44
45 // Safe default is no features. 45 // Safe default is no features.
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 void Assembler::stc2(Coprocessor coproc, 1364 void Assembler::stc2(Coprocessor coproc,
1365 CRegister crd, 1365 CRegister crd,
1366 Register rn, 1366 Register rn,
1367 int option, 1367 int option,
1368 LFlag l) { // v5 and above 1368 LFlag l) { // v5 and above
1369 stc(coproc, crd, rn, option, l, static_cast<Condition>(nv)); 1369 stc(coproc, crd, rn, option, l, static_cast<Condition>(nv));
1370 } 1370 }
1371 1371
1372 1372
1373 // Support for VFP. 1373 // Support for VFP.
1374 void Assembler::vldr(const DwVfpRegister dst,
1375 const Register base,
1376 int offset,
1377 const Condition cond) {
1378 // Ddst = MEM(Rbase + offset).
1379 // Instruction details available in ARM DDI 0406A, A8-628.
1380 // cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) |
1381 // Vdst(15-12) | 1011(11-8) | offset
1382 ASSERT(CpuFeatures::IsEnabled(VFP3));
1383 ASSERT(offset % 4 == 0);
1384 emit(cond | 0xD9*B20 | base.code()*B16 | dst.code()*B12 |
1385 0xB*B8 | ((offset / 4) & 255));
1386 }
1387
1388
1389 void Assembler::vstr(const DwVfpRegister src,
1390 const Register base,
1391 int offset,
1392 const Condition cond) {
1393 // MEM(Rbase + offset) = Dsrc.
1394 // Instruction details available in ARM DDI 0406A, A8-786.
1395 // cond(31-28) | 1101(27-24)| 1000(23-20) | | Rbase(19-16) |
1396 // Vsrc(15-12) | 1011(11-8) | (offset/4)
1397 ASSERT(CpuFeatures::IsEnabled(VFP3));
1398 ASSERT(offset % 4 == 0);
1399 emit(cond | 0xD8*B20 | base.code()*B16 | src.code()*B12 |
1400 0xB*B8 | ((offset / 4) & 255));
1401 }
1402
1403
1374 void Assembler::vmov(const DwVfpRegister dst, 1404 void Assembler::vmov(const DwVfpRegister dst,
1375 const Register src1, 1405 const Register src1,
1376 const Register src2, 1406 const Register src2,
1377 const Condition cond) { 1407 const Condition cond) {
1378 // Dm = <Rt,Rt2>. 1408 // Dm = <Rt,Rt2>.
1379 // Instruction details available in ARM DDI 0406A, A8-646. 1409 // Instruction details available in ARM DDI 0406A, A8-646.
1380 // cond(31-28) | 1100(27-24)| 010(23-21) | op=0(20) | Rt2(19-16) | 1410 // cond(31-28) | 1100(27-24)| 010(23-21) | op=0(20) | Rt2(19-16) |
1381 // Rt(15-12) | 1011(11-8) | 00(7-6) | M(5) | 1(4) | Vm 1411 // Rt(15-12) | 1011(11-8) | 00(7-6) | M(5) | 1(4) | Vm
1382 ASSERT(CpuFeatures::IsEnabled(VFP3)); 1412 ASSERT(CpuFeatures::IsEnabled(VFP3));
1383 ASSERT(!src1.is(pc) && !src2.is(pc)); 1413 ASSERT(!src1.is(pc) && !src2.is(pc));
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 bind(&after_pool); 1842 bind(&after_pool);
1813 } 1843 }
1814 1844
1815 // Since a constant pool was just emitted, move the check offset forward by 1845 // Since a constant pool was just emitted, move the check offset forward by
1816 // the standard interval. 1846 // the standard interval.
1817 next_buffer_check_ = pc_offset() + kCheckConstInterval; 1847 next_buffer_check_ = pc_offset() + kCheckConstInterval;
1818 } 1848 }
1819 1849
1820 1850
1821 } } // namespace v8::internal 1851 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/constants-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698