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

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

Issue 2829032: Make use of VFP to convert/write 32bits int to heapnumbers. Extended... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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 | src/arm/codegen-arm.cc » ('j') | src/arm/codegen-arm.cc » ('J')
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 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 void Assembler::vldr(const DwVfpRegister dst, 1756 void Assembler::vldr(const DwVfpRegister dst,
1757 const Register base, 1757 const Register base,
1758 int offset, 1758 int offset,
1759 const Condition cond) { 1759 const Condition cond) {
1760 // Ddst = MEM(Rbase + offset). 1760 // Ddst = MEM(Rbase + offset).
1761 // Instruction details available in ARM DDI 0406A, A8-628. 1761 // Instruction details available in ARM DDI 0406A, A8-628.
1762 // cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) | 1762 // cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) |
1763 // Vdst(15-12) | 1011(11-8) | offset 1763 // Vdst(15-12) | 1011(11-8) | offset
1764 ASSERT(CpuFeatures::IsEnabled(VFP3)); 1764 ASSERT(CpuFeatures::IsEnabled(VFP3));
1765 ASSERT(offset % 4 == 0); 1765 ASSERT(offset % 4 == 0);
1766 ASSERT((offset / 4) < 256); 1766 ASSERT(((offset / 4) < 256) && ((-offset / 4) < 256));
1767 emit(cond | 0xD9*B20 | base.code()*B16 | dst.code()*B12 | 1767
1768 // Handle negative offsets.
1769 int sign = 0xD9;
1770 if (offset < 0) {
1771 offset = -offset;
1772 sign = 0xD1;
1773 }
1774
1775 emit(cond | sign*B20 | base.code()*B16 | dst.code()*B12 |
1768 0xB*B8 | ((offset / 4) & 255)); 1776 0xB*B8 | ((offset / 4) & 255));
1769 } 1777 }
1770 1778
1771 1779
1772 void Assembler::vldr(const SwVfpRegister dst, 1780 void Assembler::vldr(const SwVfpRegister dst,
1773 const Register base, 1781 const Register base,
1774 int offset, 1782 int offset,
1775 const Condition cond) { 1783 const Condition cond) {
1776 // Sdst = MEM(Rbase + offset). 1784 // Sdst = MEM(Rbase + offset).
1777 // Instruction details available in ARM DDI 0406A, A8-628. 1785 // Instruction details available in ARM DDI 0406A, A8-628.
1778 // cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) | 1786 // cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) |
1779 // Vdst(15-12) | 1010(11-8) | offset 1787 // Vdst(15-12) | 1010(11-8) | offset
1780 ASSERT(CpuFeatures::IsEnabled(VFP3)); 1788 ASSERT(CpuFeatures::IsEnabled(VFP3));
1781 ASSERT(offset % 4 == 0); 1789 ASSERT(offset % 4 == 0);
1782 ASSERT((offset / 4) < 256); 1790 ASSERT(((offset / 4) < 256) && ((-offset / 4) < 256));
1783 emit(cond | 0xD9*B20 | base.code()*B16 | dst.code()*B12 | 1791
1792 // Handle negative offsets.
1793 int sign = 0xD9;
1794 if (offset < 0) {
1795 offset = -offset;
1796 sign = 0xD1;
1797 }
1798
1799 emit(cond | sign*B20 | base.code()*B16 | dst.code()*B12 |
1784 0xA*B8 | ((offset / 4) & 255)); 1800 0xA*B8 | ((offset / 4) & 255));
1785 } 1801 }
1786 1802
1787 1803
1788 void Assembler::vstr(const DwVfpRegister src, 1804 void Assembler::vstr(const DwVfpRegister src,
1789 const Register base, 1805 const Register base,
1790 int offset, 1806 int offset,
1791 const Condition cond) { 1807 const Condition cond) {
1792 // MEM(Rbase + offset) = Dsrc. 1808 // MEM(Rbase + offset) = Dsrc.
1793 // Instruction details available in ARM DDI 0406A, A8-786. 1809 // Instruction details available in ARM DDI 0406A, A8-786.
1794 // cond(31-28) | 1101(27-24)| 1000(23-20) | | Rbase(19-16) | 1810 // cond(31-28) | 1101(27-24)| 1000(23-20) | | Rbase(19-16) |
1795 // Vsrc(15-12) | 1011(11-8) | (offset/4) 1811 // Vsrc(15-12) | 1011(11-8) | (offset/4)
1796 ASSERT(CpuFeatures::IsEnabled(VFP3)); 1812 ASSERT(CpuFeatures::IsEnabled(VFP3));
1797 ASSERT(offset % 4 == 0); 1813 ASSERT(offset % 4 == 0);
1798 ASSERT((offset / 4) < 256); 1814 ASSERT(((offset / 4) < 256) && ((-offset / 4) < 256));
1799 emit(cond | 0xD8*B20 | base.code()*B16 | src.code()*B12 | 1815
1816 // Handle negative offsets.
1817 int sign = 0xD8;
1818 if (offset < 0) {
1819 offset = -offset;
1820 sign = 0xD0;
1821 }
1822
1823 emit(cond | sign*B20 | base.code()*B16 | src.code()*B12 |
1800 0xB*B8 | ((offset / 4) & 255)); 1824 0xB*B8 | ((offset / 4) & 255));
1801 } 1825 }
1802 1826
1803 1827
1804 void Assembler::vmov(const DwVfpRegister dst, 1828 void Assembler::vmov(const DwVfpRegister dst,
1805 const Register src1, 1829 const Register src1,
1806 const Register src2, 1830 const Register src2,
1807 const Condition cond) { 1831 const Condition cond) {
1808 // Dm = <Rt,Rt2>. 1832 // Dm = <Rt,Rt2>.
1809 // Instruction details available in ARM DDI 0406A, A8-646. 1833 // Instruction details available in ARM DDI 0406A, A8-646.
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 2421
2398 // Since a constant pool was just emitted, move the check offset forward by 2422 // Since a constant pool was just emitted, move the check offset forward by
2399 // the standard interval. 2423 // the standard interval.
2400 next_buffer_check_ = pc_offset() + kCheckConstInterval; 2424 next_buffer_check_ = pc_offset() + kCheckConstInterval;
2401 } 2425 }
2402 2426
2403 2427
2404 } } // namespace v8::internal 2428 } } // namespace v8::internal
2405 2429
2406 #endif // V8_TARGET_ARCH_ARM 2430 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/codegen-arm.cc » ('j') | src/arm/codegen-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698