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

Side by Side Diff: src/x64/assembler-x64-inl.h

Issue 1994083003: Adding x64 simd assembler support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | test/cctest/test-disasm-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ 5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_
6 #define V8_X64_ASSEMBLER_X64_INL_H_ 6 #define V8_X64_ASSEMBLER_X64_INL_H_
7 7
8 #include "src/x64/assembler-x64.h" 8 #include "src/x64/assembler-x64.h"
9 9
10 #include "src/base/cpu.h" 10 #include "src/base/cpu.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 void Assembler::emit_optional_rex_32(Register reg, XMMRegister base) { 172 void Assembler::emit_optional_rex_32(Register reg, XMMRegister base) {
173 byte rex_bits = (reg.code() & 0x8) >> 1 | (base.code() & 0x8) >> 3; 173 byte rex_bits = (reg.code() & 0x8) >> 1 | (base.code() & 0x8) >> 3;
174 if (rex_bits != 0) emit(0x40 | rex_bits); 174 if (rex_bits != 0) emit(0x40 | rex_bits);
175 } 175 }
176 176
177 177
178 void Assembler::emit_optional_rex_32(Register rm_reg) { 178 void Assembler::emit_optional_rex_32(Register rm_reg) {
179 if (rm_reg.high_bit()) emit(0x41); 179 if (rm_reg.high_bit()) emit(0x41);
180 } 180 }
181 181
182 182 void Assembler::emit_optional_rex_32(XMMRegister reg) {
183 void Assembler::emit_optional_rex_32(XMMRegister rm_reg) { 183 byte rex_bits = (reg.code() & 0x8) >> 1;
184 if (rm_reg.high_bit()) emit(0x41); 184 if (rex_bits != 0) emit(0x40 | rex_bits);
185 } 185 }
186 186
187
188 void Assembler::emit_optional_rex_32(const Operand& op) { 187 void Assembler::emit_optional_rex_32(const Operand& op) {
189 if (op.rex_ != 0) emit(0x40 | op.rex_); 188 if (op.rex_ != 0) emit(0x40 | op.rex_);
190 } 189 }
191 190
192 191
193 // byte 1 of 3-byte VEX 192 // byte 1 of 3-byte VEX
194 void Assembler::emit_vex3_byte1(XMMRegister reg, XMMRegister rm, 193 void Assembler::emit_vex3_byte1(XMMRegister reg, XMMRegister rm,
195 LeadingOpcode m) { 194 LeadingOpcode m) {
196 byte rxb = ~((reg.high_bit() << 2) | rm.high_bit()) << 5; 195 byte rxb = ~((reg.high_bit() << 2) | rm.high_bit()) << 5;
197 emit(rxb | m); 196 emit(rxb | m);
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 void Operand::set_disp64(int64_t disp) { 609 void Operand::set_disp64(int64_t disp) {
611 DCHECK_EQ(1, len_); 610 DCHECK_EQ(1, len_);
612 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); 611 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]);
613 *p = disp; 612 *p = disp;
614 len_ += sizeof(disp); 613 len_ += sizeof(disp);
615 } 614 }
616 } // namespace internal 615 } // namespace internal
617 } // namespace v8 616 } // namespace v8
618 617
619 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 618 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698