OLD | NEW |
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" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
10 #include "vm/memory_region.h" | 10 #include "vm/memory_region.h" |
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 | 1166 |
1167 | 1167 |
1168 void Assembler::pxor(XmmRegister dst, XmmRegister src) { | 1168 void Assembler::pxor(XmmRegister dst, XmmRegister src) { |
1169 ASSERT(src <= XMM15); | 1169 ASSERT(src <= XMM15); |
1170 ASSERT(dst <= XMM15); | 1170 ASSERT(dst <= XMM15); |
1171 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 1171 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
1172 EmitUint8(0x66); | 1172 EmitUint8(0x66); |
1173 EmitREX_RB(dst, src); | 1173 EmitREX_RB(dst, src); |
1174 EmitUint8(0x0F); | 1174 EmitUint8(0x0F); |
1175 EmitUint8(0xEF); | 1175 EmitUint8(0xEF); |
1176 EmitXmmRegisterOperand(dst, src); | 1176 EmitXmmRegisterOperand(dst & 7, src); |
1177 } | 1177 } |
1178 | 1178 |
1179 | 1179 |
1180 void Assembler::roundsd(XmmRegister dst, XmmRegister src, RoundingMode mode) { | 1180 void Assembler::roundsd(XmmRegister dst, XmmRegister src, RoundingMode mode) { |
1181 ASSERT(src <= XMM15); | 1181 ASSERT(src <= XMM15); |
1182 ASSERT(dst <= XMM15); | 1182 ASSERT(dst <= XMM15); |
1183 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 1183 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
1184 EmitUint8(0x66); | 1184 EmitUint8(0x66); |
1185 EmitREX_RB(dst, src); | 1185 EmitREX_RB(dst, src); |
1186 EmitUint8(0x0F); | 1186 EmitUint8(0x0F); |
1187 EmitUint8(0x3A); | 1187 EmitUint8(0x3A); |
1188 EmitUint8(0x0B); | 1188 EmitUint8(0x0B); |
1189 EmitXmmRegisterOperand(dst, src); | 1189 EmitXmmRegisterOperand(dst & 7, src); |
1190 // Mask precision exeption. | 1190 // Mask precision exeption. |
1191 EmitUint8(static_cast<uint8_t>(mode) | 0x8); | 1191 EmitUint8(static_cast<uint8_t>(mode) | 0x8); |
1192 } | 1192 } |
1193 | 1193 |
1194 | 1194 |
1195 void Assembler::fldl(const Address& src) { | 1195 void Assembler::fldl(const Address& src) { |
1196 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 1196 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
1197 EmitUint8(0xDD); | 1197 EmitUint8(0xDD); |
1198 EmitOperand(0, src); | 1198 EmitOperand(0, src); |
1199 } | 1199 } |
(...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2879 | 2879 |
2880 | 2880 |
2881 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2881 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
2882 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 2882 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
2883 return xmm_reg_names[reg]; | 2883 return xmm_reg_names[reg]; |
2884 } | 2884 } |
2885 | 2885 |
2886 } // namespace dart | 2886 } // namespace dart |
2887 | 2887 |
2888 #endif // defined TARGET_ARCH_X64 | 2888 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |