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

Side by Side Diff: runtime/vm/assembler_ia32.cc

Issue 1089003002: Implement bigint shift intrinsics on IA32. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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 | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_ia32_test.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 void Assembler::sarl(Register operand, Register shifter) { 1764 void Assembler::sarl(Register operand, Register shifter) {
1765 EmitGenericShift(7, Operand(operand), shifter); 1765 EmitGenericShift(7, Operand(operand), shifter);
1766 } 1766 }
1767 1767
1768 1768
1769 void Assembler::sarl(const Address& address, Register shifter) { 1769 void Assembler::sarl(const Address& address, Register shifter) {
1770 EmitGenericShift(7, Operand(address), shifter); 1770 EmitGenericShift(7, Operand(address), shifter);
1771 } 1771 }
1772 1772
1773 1773
1774 void Assembler::shldl(Register dst, Register src) { 1774 void Assembler::shldl(Register dst, Register src, Register shifter) {
1775 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1775 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1776 ASSERT(shifter == ECX);
1776 EmitUint8(0x0F); 1777 EmitUint8(0x0F);
1777 EmitUint8(0xA5); 1778 EmitUint8(0xA5);
1778 EmitRegisterOperand(src, dst); 1779 EmitRegisterOperand(src, dst);
1779 } 1780 }
1780 1781
1781 1782
1782 void Assembler::shldl(Register dst, Register src, const Immediate& imm) { 1783 void Assembler::shldl(Register dst, Register src, const Immediate& imm) {
1783 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1784 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1784 ASSERT(imm.is_int8()); 1785 ASSERT(imm.is_int8());
1785 EmitUint8(0x0F); 1786 EmitUint8(0x0F);
1786 EmitUint8(0xA4); 1787 EmitUint8(0xA4);
1787 EmitRegisterOperand(src, dst); 1788 EmitRegisterOperand(src, dst);
1788 EmitUint8(imm.value() & 0xFF); 1789 EmitUint8(imm.value() & 0xFF);
1789 } 1790 }
1790 1791
1791 1792
1792 void Assembler::shldl(const Address& operand, Register src) { 1793 void Assembler::shldl(const Address& operand, Register src, Register shifter) {
1793 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1794 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1795 ASSERT(shifter == ECX);
1794 EmitUint8(0x0F); 1796 EmitUint8(0x0F);
1795 EmitUint8(0xA5); 1797 EmitUint8(0xA5);
1796 EmitOperand(src, Operand(operand)); 1798 EmitOperand(src, Operand(operand));
1797 } 1799 }
1798 1800
1799 1801
1800 void Assembler::shrdl(Register dst, Register src) { 1802 void Assembler::shrdl(Register dst, Register src, Register shifter) {
1801 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1803 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1804 ASSERT(shifter == ECX);
1802 EmitUint8(0x0F); 1805 EmitUint8(0x0F);
1803 EmitUint8(0xAD); 1806 EmitUint8(0xAD);
1804 EmitRegisterOperand(src, dst); 1807 EmitRegisterOperand(src, dst);
1805 } 1808 }
1806 1809
1807 1810
1808 void Assembler::shrdl(Register dst, Register src, const Immediate& imm) { 1811 void Assembler::shrdl(Register dst, Register src, const Immediate& imm) {
1809 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1812 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1810 ASSERT(imm.is_int8()); 1813 ASSERT(imm.is_int8());
1811 EmitUint8(0x0F); 1814 EmitUint8(0x0F);
1812 EmitUint8(0xAC); 1815 EmitUint8(0xAC);
1813 EmitRegisterOperand(src, dst); 1816 EmitRegisterOperand(src, dst);
1814 EmitUint8(imm.value() & 0xFF); 1817 EmitUint8(imm.value() & 0xFF);
1815 } 1818 }
1816 1819
1817 1820
1818 void Assembler::shrdl(const Address& dst, Register src) { 1821 void Assembler::shrdl(const Address& dst, Register src, Register shifter) {
1819 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1822 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1823 ASSERT(shifter == ECX);
1820 EmitUint8(0x0F); 1824 EmitUint8(0x0F);
1821 EmitUint8(0xAD); 1825 EmitUint8(0xAD);
1822 EmitOperand(src, Operand(dst)); 1826 EmitOperand(src, Operand(dst));
1823 } 1827 }
1824 1828
1825 1829
1826 void Assembler::negl(Register reg) { 1830 void Assembler::negl(Register reg) {
1827 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1831 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1828 EmitUint8(0xF7); 1832 EmitUint8(0xF7);
1829 EmitOperand(3, Operand(reg)); 1833 EmitOperand(3, Operand(reg));
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
3101 3105
3102 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3106 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3103 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3107 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3104 return xmm_reg_names[reg]; 3108 return xmm_reg_names[reg];
3105 } 3109 }
3106 3110
3107 3111
3108 } // namespace dart 3112 } // namespace dart
3109 3113
3110 #endif // defined TARGET_ARCH_IA32 3114 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698