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/IceAssemblerX86BaseImpl.h

Issue 1909013002: Subzero. X86. Lowers shufflevector using xmm instructions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fixes 80-col Created 4 years, 8 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 //===- subzero/src/IceAssemblerX86BaseImpl.h - base x86 assembler -*- C++ -*-=// 1 //===- subzero/src/IceAssemblerX86BaseImpl.h - base x86 assembler -*- C++ -*-=//
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 // 5 //
6 // Modified by the Subzero authors. 6 // Modified by the Subzero authors.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // The Subzero Code Generator 10 // The Subzero Code Generator
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 emitRex(RexTypeIrrelevant, src, dst); 1558 emitRex(RexTypeIrrelevant, src, dst);
1559 emitUint8(0x0F); 1559 emitUint8(0x0F);
1560 emitUint8(0x70); 1560 emitUint8(0x70);
1561 static constexpr RelocOffsetT OffsetFromNextInstruction = 1; 1561 static constexpr RelocOffsetT OffsetFromNextInstruction = 1;
1562 emitOperand(gprEncoding(dst), src, OffsetFromNextInstruction); 1562 emitOperand(gprEncoding(dst), src, OffsetFromNextInstruction);
1563 assert(imm.is_uint8()); 1563 assert(imm.is_uint8());
1564 emitUint8(imm.value()); 1564 emitUint8(imm.value());
1565 } 1565 }
1566 1566
1567 template <typename TraitsType> 1567 template <typename TraitsType>
1568 void AssemblerX86Base<TraitsType>::punpckldq(Type, XmmRegister Dst,
1569 XmmRegister Src) {
1570 AssemblerBuffer::EnsureCapacity ensured(&Buffer);
1571 emitUint8(0x66);
1572 emitRexRB(RexTypeIrrelevant, Dst, Src);
1573 emitUint8(0x0F);
1574 emitUint8(0x62);
1575 emitXmmRegisterOperand(Dst, Src);
1576 }
1577
1578 template <typename TraitsType>
1579 void AssemblerX86Base<TraitsType>::punpckldq(Type, XmmRegister Dst,
1580 const Address &Src) {
1581 AssemblerBuffer::EnsureCapacity ensured(&Buffer);
1582 emitUint8(0x66);
1583 emitAddrSizeOverridePrefix();
1584 emitRex(RexTypeIrrelevant, Src, Dst);
1585 emitUint8(0x0F);
1586 emitUint8(0x62);
1587 emitOperand(gprEncoding(Dst), Src);
1588 }
1589
1590 template <typename TraitsType>
1568 void AssemblerX86Base<TraitsType>::shufps(Type /* Ty */, XmmRegister dst, 1591 void AssemblerX86Base<TraitsType>::shufps(Type /* Ty */, XmmRegister dst,
1569 XmmRegister src, 1592 XmmRegister src,
1570 const Immediate &imm) { 1593 const Immediate &imm) {
1571 AssemblerBuffer::EnsureCapacity ensured(&Buffer); 1594 AssemblerBuffer::EnsureCapacity ensured(&Buffer);
1572 emitRexRB(RexTypeIrrelevant, dst, src); 1595 emitRexRB(RexTypeIrrelevant, dst, src);
1573 emitUint8(0x0F); 1596 emitUint8(0x0F);
1574 emitUint8(0xC6); 1597 emitUint8(0xC6);
1575 emitXmmRegisterOperand(dst, src); 1598 emitXmmRegisterOperand(dst, src);
1576 assert(imm.is_uint8()); 1599 assert(imm.is_uint8());
1577 emitUint8(imm.value()); 1600 emitUint8(imm.value());
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after
3535 (void)shifter; 3558 (void)shifter;
3536 if (Ty == IceType_i16) 3559 if (Ty == IceType_i16)
3537 emitOperandSizeOverride(); 3560 emitOperandSizeOverride();
3538 emitRexB(Ty, operand.rm()); 3561 emitRexB(Ty, operand.rm());
3539 emitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3); 3562 emitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3);
3540 emitOperand(rm, operand); 3563 emitOperand(rm, operand);
3541 } 3564 }
3542 3565
3543 } // end of namespace X86NAMESPACE 3566 } // end of namespace X86NAMESPACE
3544 } // end of namespace Ice 3567 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698