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

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

Issue 728103007: [x64] Recognize MOVSXBL. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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.h ('k') | no next file » | 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 src->link_to(pc_offset() - sizeof(int32_t)); 1376 src->link_to(pc_offset() - sizeof(int32_t));
1377 } else { 1377 } else {
1378 DCHECK(src->is_unused()); 1378 DCHECK(src->is_unused());
1379 int32_t current = pc_offset(); 1379 int32_t current = pc_offset();
1380 emitl(current); 1380 emitl(current);
1381 src->link_to(current); 1381 src->link_to(current);
1382 } 1382 }
1383 } 1383 }
1384 1384
1385 1385
1386 void Assembler::movsxbl(Register dst, Register src) {
1387 EnsureSpace ensure_space(this);
1388 if (!src.is_byte_register()) {
1389 // Register is not one of al, bl, cl, dl. Its encoding needs REX.
1390 emit_rex_32(dst, src);
1391 } else {
1392 emit_optional_rex_32(dst, src);
1393 }
1394 emit(0x0F);
1395 emit(0xBE);
1396 emit_modrm(dst, src);
1397 }
1398
1399
1386 void Assembler::movsxbl(Register dst, const Operand& src) { 1400 void Assembler::movsxbl(Register dst, const Operand& src) {
1387 EnsureSpace ensure_space(this); 1401 EnsureSpace ensure_space(this);
1388 emit_optional_rex_32(dst, src); 1402 emit_optional_rex_32(dst, src);
1389 emit(0x0F); 1403 emit(0x0F);
1390 emit(0xBE); 1404 emit(0xBE);
1391 emit_operand(dst, src); 1405 emit_operand(dst, src);
1392 } 1406 }
1393 1407
1394 1408
1395 void Assembler::movsxbq(Register dst, const Operand& src) { 1409 void Assembler::movsxbq(Register dst, const Operand& src) {
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after
3170 3184
3171 3185
3172 bool RelocInfo::IsInConstantPool() { 3186 bool RelocInfo::IsInConstantPool() {
3173 return false; 3187 return false;
3174 } 3188 }
3175 3189
3176 3190
3177 } } // namespace v8::internal 3191 } } // namespace v8::internal
3178 3192
3179 #endif // V8_TARGET_ARCH_X64 3193 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698