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

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

Issue 2220483003: [x64] Zero/sign-extend loads to 64-bit registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed a couple of wrong assertions. Created 4 years, 4 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
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/x64/assembler-x64.h" 5 #include "src/x64/assembler-x64.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #if V8_TARGET_ARCH_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 1579
1580 1580
1581 void Assembler::movsxbq(Register dst, const Operand& src) { 1581 void Assembler::movsxbq(Register dst, const Operand& src) {
1582 EnsureSpace ensure_space(this); 1582 EnsureSpace ensure_space(this);
1583 emit_rex_64(dst, src); 1583 emit_rex_64(dst, src);
1584 emit(0x0F); 1584 emit(0x0F);
1585 emit(0xBE); 1585 emit(0xBE);
1586 emit_operand(dst, src); 1586 emit_operand(dst, src);
1587 } 1587 }
1588 1588
1589 void Assembler::movsxbq(Register dst, Register src) {
1590 EnsureSpace ensure_space(this);
1591 emit_rex_64(dst, src);
1592 emit(0x0F);
1593 emit(0xBE);
1594 emit_modrm(dst, src);
1595 }
1589 1596
1590 void Assembler::movsxwl(Register dst, Register src) { 1597 void Assembler::movsxwl(Register dst, Register src) {
1591 EnsureSpace ensure_space(this); 1598 EnsureSpace ensure_space(this);
1592 emit_optional_rex_32(dst, src); 1599 emit_optional_rex_32(dst, src);
1593 emit(0x0F); 1600 emit(0x0F);
1594 emit(0xBF); 1601 emit(0xBF);
1595 emit_modrm(dst, src); 1602 emit_modrm(dst, src);
1596 } 1603 }
1597 1604
1598 1605
1599 void Assembler::movsxwl(Register dst, const Operand& src) { 1606 void Assembler::movsxwl(Register dst, const Operand& src) {
1600 EnsureSpace ensure_space(this); 1607 EnsureSpace ensure_space(this);
1601 emit_optional_rex_32(dst, src); 1608 emit_optional_rex_32(dst, src);
1602 emit(0x0F); 1609 emit(0x0F);
1603 emit(0xBF); 1610 emit(0xBF);
1604 emit_operand(dst, src); 1611 emit_operand(dst, src);
1605 } 1612 }
1606 1613
1607 1614
1608 void Assembler::movsxwq(Register dst, const Operand& src) { 1615 void Assembler::movsxwq(Register dst, const Operand& src) {
1609 EnsureSpace ensure_space(this); 1616 EnsureSpace ensure_space(this);
1610 emit_rex_64(dst, src); 1617 emit_rex_64(dst, src);
1611 emit(0x0F); 1618 emit(0x0F);
1612 emit(0xBF); 1619 emit(0xBF);
1613 emit_operand(dst, src); 1620 emit_operand(dst, src);
1614 } 1621 }
1615 1622
1623 void Assembler::movsxwq(Register dst, Register src) {
1624 EnsureSpace ensure_space(this);
1625 emit_rex_64(dst, src);
1626 emit(0x0F);
1627 emit(0xBF);
1628 emit_modrm(dst, src);
1629 }
1616 1630
1617 void Assembler::movsxlq(Register dst, Register src) { 1631 void Assembler::movsxlq(Register dst, Register src) {
1618 EnsureSpace ensure_space(this); 1632 EnsureSpace ensure_space(this);
1619 emit_rex_64(dst, src); 1633 emit_rex_64(dst, src);
1620 emit(0x63); 1634 emit(0x63);
1621 emit_modrm(dst, src); 1635 emit_modrm(dst, src);
1622 } 1636 }
1623 1637
1624 1638
1625 void Assembler::movsxlq(Register dst, const Operand& src) { 1639 void Assembler::movsxlq(Register dst, const Operand& src) {
(...skipping 2985 matching lines...) Expand 10 before | Expand all | Expand 10 after
4611 4625
4612 bool RelocInfo::IsInConstantPool() { 4626 bool RelocInfo::IsInConstantPool() {
4613 return false; 4627 return false;
4614 } 4628 }
4615 4629
4616 4630
4617 } // namespace internal 4631 } // namespace internal
4618 } // namespace v8 4632 } // namespace v8
4619 4633
4620 #endif // V8_TARGET_ARCH_X64 4634 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | test/unittests/compiler/x64/instruction-selector-x64-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698