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

Unified Diff: runtime/vm/assembler_x64.cc

Issue 10440099: Adding unary op optimizations. missing assembly operations/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.cc
===================================================================
--- runtime/vm/assembler_x64.cc (revision 8171)
+++ runtime/vm/assembler_x64.cc (working copy)
@@ -535,6 +535,17 @@
}
+void Assembler::xorpd(XmmRegister dst, const Address& src) {
+ ASSERT(dst <= XMM7);
+ AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+ EmitUint8(0x66);
+ EmitOperandREX(0, src, REX_NONE);
+ EmitUint8(0x0F);
+ EmitUint8(0x57);
+ EmitOperand(dst & 7, src);
+}
+
+
void Assembler::xchgl(Register dst, Register src) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
Operand operand(src);
@@ -1063,6 +1074,14 @@
}
+void Assembler::notq(Register reg) {
+ AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+ EmitRegisterREX(reg, REX_W);
+ EmitUint8(0xF7);
+ EmitUint8(0xD0 | (reg & 7));
+}
+
+
void Assembler::enter(const Immediate& imm) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
EmitUint8(0xC8);
@@ -1343,6 +1362,17 @@
}
+void Assembler::DoubleNegate(XmmRegister d) {
+ static const struct ALIGN16 {
+ uint64_t a;
+ uint64_t b;
+ } double_negate_constant =
+ {0x8000000000000000LL, 0x8000000000000000LL};
+ movq(TMP, Immediate(reinterpret_cast<intptr_t>(&double_negate_constant)));
+ xorpd(d, Address(TMP, 0));
+}
+
+
void Assembler::Stop(const char* message) {
int64_t message_address = reinterpret_cast<int64_t>(message);
if (FLAG_print_stop_message) {
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698