Use %ull here.
[llvm/stm8.git] / lib / Target / X86 / Utils / X86ShuffleDecode.h
blobb18f6703309619ef43be5ffeb6279c1401ee10a0
1 //===-- X86ShuffleDecode.h - X86 shuffle decode logic -----------*-C++-*---===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // Define several functions to decode x86 specific shuffle semantics into a
11 // generic vector mask.
13 //===----------------------------------------------------------------------===//
15 #ifndef X86_SHUFFLE_DECODE_H
16 #define X86_SHUFFLE_DECODE_H
18 #include "llvm/ADT/SmallVector.h"
19 #include "llvm/CodeGen/ValueTypes.h"
21 //===----------------------------------------------------------------------===//
22 // Vector Mask Decoding
23 //===----------------------------------------------------------------------===//
25 namespace llvm {
26 enum {
27 SM_SentinelZero = ~0U
30 void DecodeINSERTPSMask(unsigned Imm, SmallVectorImpl<unsigned> &ShuffleMask);
32 // <3,1> or <6,7,2,3>
33 void DecodeMOVHLPSMask(unsigned NElts,
34 SmallVectorImpl<unsigned> &ShuffleMask);
36 // <0,2> or <0,1,4,5>
37 void DecodeMOVLHPSMask(unsigned NElts,
38 SmallVectorImpl<unsigned> &ShuffleMask);
40 void DecodePSHUFMask(unsigned NElts, unsigned Imm,
41 SmallVectorImpl<unsigned> &ShuffleMask);
43 void DecodePSHUFHWMask(unsigned Imm,
44 SmallVectorImpl<unsigned> &ShuffleMask);
46 void DecodePSHUFLWMask(unsigned Imm,
47 SmallVectorImpl<unsigned> &ShuffleMask);
49 void DecodePUNPCKLBWMask(unsigned NElts,
50 SmallVectorImpl<unsigned> &ShuffleMask);
52 void DecodePUNPCKLWDMask(unsigned NElts,
53 SmallVectorImpl<unsigned> &ShuffleMask);
55 void DecodePUNPCKLDQMask(unsigned NElts,
56 SmallVectorImpl<unsigned> &ShuffleMask);
58 void DecodePUNPCKLQDQMask(unsigned NElts,
59 SmallVectorImpl<unsigned> &ShuffleMask);
61 void DecodePUNPCKLMask(EVT VT,
62 SmallVectorImpl<unsigned> &ShuffleMask);
64 void DecodePUNPCKHMask(unsigned NElts,
65 SmallVectorImpl<unsigned> &ShuffleMask);
67 void DecodeSHUFPSMask(unsigned NElts, unsigned Imm,
68 SmallVectorImpl<unsigned> &ShuffleMask);
70 void DecodeUNPCKHPMask(unsigned NElts,
71 SmallVectorImpl<unsigned> &ShuffleMask);
73 void DecodeUNPCKLPSMask(unsigned NElts,
74 SmallVectorImpl<unsigned> &ShuffleMask);
76 void DecodeUNPCKLPDMask(unsigned NElts,
77 SmallVectorImpl<unsigned> &ShuffleMask);
79 /// DecodeUNPCKLPMask - This decodes the shuffle masks for unpcklps/unpcklpd
80 /// etc. VT indicates the type of the vector allowing it to handle different
81 /// datatypes and vector widths.
82 void DecodeUNPCKLPMask(EVT VT,
83 SmallVectorImpl<unsigned> &ShuffleMask);
85 } // llvm namespace
87 #endif