John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1 | // SwiftShader Software Renderer
|
| 2 | //
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 3 | // Copyright(c) 2005-2012 TransGaming Inc.
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 4 | //
|
| 5 | // All rights reserved. No part of this software may be copied, distributed, transmitted,
|
| 6 | // transcribed, stored in a retrieval system, translated into any human or computer
|
| 7 | // language by any means, or disclosed to third parties without the explicit written
|
| 8 | // agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
|
| 9 | // or implied, including but not limited to any patent rights, are granted to you.
|
| 10 | //
|
| 11 |
|
| 12 | #ifndef sw_Nucleus_hpp
|
| 13 | #define sw_Nucleus_hpp
|
| 14 |
|
| 15 | #include "Common/Types.hpp"
|
Nicolas Capens | b7ea984 | 2015-04-01 10:54:59 -0400 | [diff] [blame] | 16 | #include "Common/MutexLock.hpp"
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 17 |
|
| 18 | #include <stdarg.h>
|
| 19 | #include <vector>
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 20 | #include <stdio.h>
|
| 21 | #include <wchar.h>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 22 |
|
| 23 | #undef abs
|
| 24 | #undef max
|
| 25 | #undef min
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 26 | #undef Bool
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 27 |
|
| 28 | namespace llvm
|
| 29 | {
|
| 30 | class Function;
|
| 31 | class Module;
|
| 32 | class BasicBlock;
|
| 33 | class Value;
|
| 34 | class Constant;
|
| 35 | class ConstantInt;
|
| 36 | class ConstantFP;
|
| 37 | class Type;
|
| 38 | class Argument;
|
| 39 | class GlobalVariable;
|
| 40 | class GlobalValue;
|
| 41 | class ExecutionEngine;
|
| 42 | class LLVMContext;
|
| 43 | }
|
| 44 |
|
| 45 | namespace sw
|
| 46 | {
|
| 47 | enum Optimization
|
| 48 | {
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 49 | Disabled = 0,
|
| 50 | InstructionCombining = 1,
|
| 51 | CFGSimplification = 2,
|
| 52 | LICM = 3,
|
| 53 | AggressiveDCE = 4,
|
| 54 | GVN = 5,
|
| 55 | Reassociate = 6,
|
| 56 | DeadStoreElimination = 7,
|
| 57 | SCCP = 8,
|
| 58 | ScalarReplAggregates = 9,
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 59 |
|
| 60 | OptimizationCount
|
| 61 | };
|
| 62 |
|
| 63 | extern Optimization optimization[10];
|
| 64 |
|
Nicolas Capens | d946e0a | 2014-06-26 11:31:08 -0400 | [diff] [blame] | 65 | class Routine;
|
Nicolas Capens | 2fb4110 | 2014-06-26 10:11:50 -0400 | [diff] [blame] | 66 | class RoutineManager;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 67 | class Builder;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 68 |
|
| 69 | class Nucleus
|
| 70 | {
|
| 71 | public:
|
| 72 | Nucleus();
|
| 73 |
|
| 74 | virtual ~Nucleus();
|
| 75 |
|
| 76 | Routine *acquireRoutine(const wchar_t *name, bool runOptimizations = true);
|
| 77 |
|
| 78 | static void setFunction(llvm::Function *function);
|
| 79 |
|
| 80 | static llvm::Module *getModule();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 81 | static llvm::Function *getFunction();
|
| 82 | static llvm::LLVMContext *getContext();
|
| 83 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 84 | static llvm::Value *allocateStackVariable(llvm::Type *type, int arraySize = 0);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 85 | static llvm::BasicBlock *createBasicBlock();
|
| 86 | static llvm::BasicBlock *getInsertBlock();
|
| 87 | static void setInsertBlock(llvm::BasicBlock *basicBlock);
|
| 88 | static llvm::BasicBlock *getPredecessor(llvm::BasicBlock *basicBlock);
|
| 89 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 90 | static llvm::Function *createFunction(llvm::Type *ReturnType, std::vector<llvm::Type*> &Params);
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 91 | static llvm::Value *getArgument(llvm::Function *function, unsigned int index);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 92 |
|
| 93 | // Terminators
|
| 94 | static llvm::Value *createRetVoid();
|
| 95 | static llvm::Value *createRet(llvm::Value *V);
|
| 96 | static llvm::Value *createBr(llvm::BasicBlock *dest);
|
| 97 | static llvm::Value *createCondBr(llvm::Value *cond, llvm::BasicBlock *ifTrue, llvm::BasicBlock *ifFalse);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 98 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 99 | // Binary operators
|
| 100 | static llvm::Value *createAdd(llvm::Value *lhs, llvm::Value *rhs);
|
| 101 | static llvm::Value *createSub(llvm::Value *lhs, llvm::Value *rhs);
|
| 102 | static llvm::Value *createMul(llvm::Value *lhs, llvm::Value *rhs);
|
| 103 | static llvm::Value *createUDiv(llvm::Value *lhs, llvm::Value *rhs);
|
| 104 | static llvm::Value *createSDiv(llvm::Value *lhs, llvm::Value *rhs);
|
| 105 | static llvm::Value *createFAdd(llvm::Value *lhs, llvm::Value *rhs);
|
| 106 | static llvm::Value *createFSub(llvm::Value *lhs, llvm::Value *rhs);
|
| 107 | static llvm::Value *createFMul(llvm::Value *lhs, llvm::Value *rhs);
|
| 108 | static llvm::Value *createFDiv(llvm::Value *lhs, llvm::Value *rhs);
|
| 109 | static llvm::Value *createURem(llvm::Value *lhs, llvm::Value *rhs);
|
| 110 | static llvm::Value *createSRem(llvm::Value *lhs, llvm::Value *rhs);
|
| 111 | static llvm::Value *createFRem(llvm::Value *lhs, llvm::Value *rhs);
|
| 112 | static llvm::Value *createShl(llvm::Value *lhs, llvm::Value *rhs);
|
| 113 | static llvm::Value *createLShr(llvm::Value *lhs, llvm::Value *rhs);
|
| 114 | static llvm::Value *createAShr(llvm::Value *lhs, llvm::Value *rhs);
|
| 115 | static llvm::Value *createAnd(llvm::Value *lhs, llvm::Value *rhs);
|
| 116 | static llvm::Value *createOr(llvm::Value *lhs, llvm::Value *rhs);
|
| 117 | static llvm::Value *createXor(llvm::Value *lhs, llvm::Value *rhs);
|
| 118 | static llvm::Value *createNeg(llvm::Value *V);
|
| 119 | static llvm::Value *createFNeg(llvm::Value *V);
|
| 120 | static llvm::Value *createNot(llvm::Value *V);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 121 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 122 | // Memory instructions
|
| 123 | static llvm::Value *createLoad(llvm::Value *ptr, bool isVolatile = false, unsigned int align = 0);
|
| 124 | static llvm::Value *createStore(llvm::Value *value, llvm::Value *ptr, bool isVolatile = false, unsigned int align = 0);
|
| 125 | static llvm::Value *createGEP(llvm::Value *ptr, llvm::Value *index);
|
| 126 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 127 | // Atomic instructions
|
| 128 | static llvm::Value *createAtomicAdd(llvm::Value *ptr, llvm::Value *value);
|
| 129 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 130 | // Cast/Conversion Operators
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 131 | static llvm::Value *createTrunc(llvm::Value *V, llvm::Type *destType);
|
| 132 | static llvm::Value *createZExt(llvm::Value *V, llvm::Type *destType);
|
| 133 | static llvm::Value *createSExt(llvm::Value *V, llvm::Type *destType);
|
| 134 | static llvm::Value *createFPToUI(llvm::Value *V, llvm::Type *destType);
|
| 135 | static llvm::Value *createFPToSI(llvm::Value *V, llvm::Type *destType);
|
| 136 | static llvm::Value *createUIToFP(llvm::Value *V, llvm::Type *destType);
|
| 137 | static llvm::Value *createSIToFP(llvm::Value *V, llvm::Type *destType);
|
| 138 | static llvm::Value *createFPTrunc(llvm::Value *V, llvm::Type *destType);
|
| 139 | static llvm::Value *createFPExt(llvm::Value *V, llvm::Type *destType);
|
| 140 | static llvm::Value *createPtrToInt(llvm::Value *V, llvm::Type *destType);
|
| 141 | static llvm::Value *createIntToPtr(llvm::Value *V, llvm::Type *destType);
|
| 142 | static llvm::Value *createBitCast(llvm::Value *V, llvm::Type *destType);
|
| 143 | static llvm::Value *createIntCast(llvm::Value *V, llvm::Type *destType, bool isSigned);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 144 |
|
| 145 | // Compare instructions
|
| 146 | static llvm::Value *createICmpEQ(llvm::Value *lhs, llvm::Value *rhs);
|
| 147 | static llvm::Value *createICmpNE(llvm::Value *lhs, llvm::Value *rhs);
|
| 148 | static llvm::Value *createICmpUGT(llvm::Value *lhs, llvm::Value *rhs);
|
| 149 | static llvm::Value *createICmpUGE(llvm::Value *lhs, llvm::Value *rhs);
|
| 150 | static llvm::Value *createICmpULT(llvm::Value *lhs, llvm::Value *rhs);
|
| 151 | static llvm::Value *createICmpULE(llvm::Value *lhs, llvm::Value *rhs);
|
| 152 | static llvm::Value *createICmpSGT(llvm::Value *lhs, llvm::Value *rhs);
|
| 153 | static llvm::Value *createICmpSGE(llvm::Value *lhs, llvm::Value *rhs);
|
| 154 | static llvm::Value *createICmpSLT(llvm::Value *lhs, llvm::Value *rhs);
|
| 155 | static llvm::Value *createICmpSLE(llvm::Value *lhs, llvm::Value *rhs);
|
| 156 | static llvm::Value *createFCmpOEQ(llvm::Value *lhs, llvm::Value *rhs);
|
| 157 | static llvm::Value *createFCmpOGT(llvm::Value *lhs, llvm::Value *rhs);
|
| 158 | static llvm::Value *createFCmpOGE(llvm::Value *lhs, llvm::Value *rhs);
|
| 159 | static llvm::Value *createFCmpOLT(llvm::Value *lhs, llvm::Value *rhs);
|
| 160 | static llvm::Value *createFCmpOLE(llvm::Value *lhs, llvm::Value *rhs);
|
| 161 | static llvm::Value *createFCmpONE(llvm::Value *lhs, llvm::Value *rhs);
|
| 162 | static llvm::Value *createFCmpORD(llvm::Value *lhs, llvm::Value *rhs);
|
| 163 | static llvm::Value *createFCmpUNO(llvm::Value *lhs, llvm::Value *rhs);
|
| 164 | static llvm::Value *createFCmpUEQ(llvm::Value *lhs, llvm::Value *rhs);
|
| 165 | static llvm::Value *createFCmpUGT(llvm::Value *lhs, llvm::Value *rhs);
|
| 166 | static llvm::Value *createFCmpUGE(llvm::Value *lhs, llvm::Value *rhs);
|
| 167 | static llvm::Value *createFCmpULT(llvm::Value *lhs, llvm::Value *rhs);
|
| 168 | static llvm::Value *createFCmpULE(llvm::Value *lhs, llvm::Value *rhs);
|
| 169 | static llvm::Value *createFCmpUNE(llvm::Value *lhs, llvm::Value *rhs);
|
| 170 |
|
| 171 | // Call instructions
|
| 172 | static llvm::Value *createCall(llvm::Value *callee);
|
| 173 | static llvm::Value *createCall(llvm::Value *callee, llvm::Value *Arg);
|
| 174 | static llvm::Value *createCall(llvm::Value *callee, llvm::Value *Arg1, llvm::Value *Arg2);
|
| 175 | static llvm::Value *createCall(llvm::Value *callee, llvm::Value *Arg1, llvm::Value *Arg2, llvm::Value *Arg3);
|
| 176 | static llvm::Value *createCall(llvm::Value *callee, llvm::Value *Arg1, llvm::Value *Arg2, llvm::Value *Arg3,llvm::Value *Arg4);
|
| 177 |
|
| 178 | // Vector instructions
|
| 179 | static llvm::Value *createExtractElement(llvm::Value *vector, int index);
|
| 180 | static llvm::Value *createInsertElement(llvm::Value *vector, llvm::Value *element, int index);
|
| 181 | static llvm::Value *createShuffleVector(llvm::Value *V1, llvm::Value *V2, llvm::Value *mask);
|
| 182 |
|
| 183 | // Other instructions
|
| 184 | static llvm::Value *createSelect(llvm::Value *C, llvm::Value *ifTrue, llvm::Value *ifFalse);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 185 | static llvm::Value *createSwitch(llvm::Value *V, llvm::BasicBlock *Dest, unsigned NumCases);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 186 | static void addSwitchCase(llvm::Value *Switch, int Case, llvm::BasicBlock *Branch);
|
| 187 | static llvm::Value *createUnreachable();
|
| 188 |
|
| 189 | // Derived instructions
|
| 190 | static llvm::Value *createSwizzle(llvm::Value *val, unsigned char select);
|
| 191 | static llvm::Value *createMask(llvm::Value *lhs, llvm::Value *rhs, unsigned char select);
|
| 192 |
|
| 193 | // Global values
|
| 194 | static const llvm::GlobalValue *getGlobalValueAtAddress(void *Addr);
|
| 195 | static void addGlobalMapping(const llvm::GlobalValue *GV, void *Addr);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 196 | static llvm::GlobalValue *createGlobalValue(llvm::Type *Ty, bool isConstant, unsigned int Align);
|
| 197 | static llvm::Type *getPointerType(llvm::Type *ElementType);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 198 |
|
| 199 | // Constant values
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 200 | static llvm::Constant *createNullValue(llvm::Type *Ty);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 201 | static llvm::ConstantInt *createConstantInt(int64_t i);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 202 | static llvm::ConstantInt *createConstantInt(int i);
|
| 203 | static llvm::ConstantInt *createConstantInt(unsigned int i);
|
| 204 | static llvm::ConstantInt *createConstantBool(bool b);
|
| 205 | static llvm::ConstantInt *createConstantByte(signed char i);
|
| 206 | static llvm::ConstantInt *createConstantByte(unsigned char i);
|
| 207 | static llvm::ConstantInt *createConstantShort(short i);
|
| 208 | static llvm::ConstantInt *createConstantShort(unsigned short i);
|
| 209 | static llvm::Constant *createConstantFloat(float x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 210 | static llvm::Value *createNullPointer(llvm::Type *Ty);
|
| 211 | static llvm::Value *createConstantVector(llvm::Constant *const *Vals, unsigned NumVals);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 212 |
|
| 213 | private:
|
| 214 | void optimize();
|
| 215 |
|
| 216 | static llvm::ExecutionEngine *executionEngine;
|
| 217 | static Builder *builder;
|
| 218 | static llvm::Function *function;
|
| 219 | static llvm::LLVMContext *context;
|
| 220 | static llvm::Module *module;
|
Nicolas Capens | 2fb4110 | 2014-06-26 10:11:50 -0400 | [diff] [blame] | 221 | static RoutineManager *routineManager;
|
Nicolas Capens | b7ea984 | 2015-04-01 10:54:59 -0400 | [diff] [blame] | 222 |
|
| 223 | static BackoffLock codegenMutex;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 224 | };
|
| 225 |
|
| 226 | class Byte;
|
| 227 | class SByte;
|
| 228 | class Byte4;
|
| 229 | class SByte4;
|
| 230 | class Byte8;
|
| 231 | class SByte8;
|
| 232 | class Byte16;
|
| 233 | class SByte16;
|
| 234 | class Short;
|
| 235 | class UShort;
|
| 236 | class Short4;
|
| 237 | class UShort4;
|
| 238 | class Short8;
|
| 239 | class UShort8;
|
| 240 | class Int;
|
| 241 | class UInt;
|
| 242 | class Int2;
|
| 243 | class UInt2;
|
| 244 | class Int4;
|
| 245 | class UInt4;
|
| 246 | class Long;
|
| 247 | class Long1;
|
| 248 | class Long2;
|
| 249 | class Float;
|
| 250 | class Float2;
|
| 251 | class Float4;
|
| 252 |
|
| 253 | class Void
|
| 254 | {
|
| 255 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 256 | static llvm::Type *getType();
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 257 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 258 | static bool isVoid()
|
| 259 | {
|
| 260 | return true;
|
| 261 | }
|
| 262 |
|
| 263 | typedef void ctype;
|
| 264 | };
|
| 265 |
|
| 266 | template<class T>
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 267 | class RValue;
|
| 268 |
|
| 269 | template<class T>
|
| 270 | class Pointer;
|
| 271 |
|
| 272 | class LValue
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 273 | {
|
| 274 | public:
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 275 | LValue(llvm::Type *type, int arraySize = 0);
|
| 276 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 277 | static bool isVoid()
|
| 278 | {
|
| 279 | return false;
|
| 280 | }
|
| 281 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 282 | llvm::Value *loadValue(unsigned int alignment = 0) const;
|
| 283 | llvm::Value *storeValue(llvm::Value *value, unsigned int alignment = 0) const;
|
| 284 | llvm::Value *getAddress(llvm::Value *index) const;
|
| 285 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 286 | protected:
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 287 | llvm::Value *address;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 288 | };
|
| 289 |
|
| 290 | template<class T>
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 291 | class Variable : public LValue
|
| 292 | {
|
| 293 | public:
|
| 294 | Variable(int arraySize = 0);
|
| 295 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 296 | RValue<Pointer<T>> operator&();
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 297 | };
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 298 |
|
| 299 | template<class T>
|
| 300 | class Reference
|
| 301 | {
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 302 | public:
|
| 303 | explicit Reference(llvm::Value *pointer, int alignment = 1);
|
| 304 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 305 | RValue<T> operator=(RValue<T> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 306 | RValue<T> operator=(const Reference<T> &ref) const;
|
| 307 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 308 | RValue<T> operator+=(RValue<T> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 309 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 310 | llvm::Value *loadValue() const;
|
| 311 | int getAlignment() const;
|
| 312 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 313 | private:
|
| 314 | llvm::Value *address;
|
| 315 |
|
| 316 | const int alignment;
|
| 317 | };
|
| 318 |
|
| 319 | template<class T>
|
| 320 | struct IntLiteral
|
| 321 | {
|
| 322 | struct type;
|
| 323 | };
|
| 324 |
|
| 325 | template<> struct
|
| 326 | IntLiteral<Int>
|
| 327 | {
|
| 328 | typedef int type;
|
| 329 | };
|
| 330 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 331 | template<> struct
|
| 332 | IntLiteral<UInt>
|
| 333 | {
|
| 334 | typedef unsigned int type;
|
| 335 | };
|
| 336 |
|
| 337 | template<> struct
|
| 338 | IntLiteral<Long>
|
| 339 | {
|
| 340 | typedef int64_t type;
|
| 341 | };
|
| 342 |
|
| 343 | template<class T>
|
| 344 | struct FloatLiteral
|
| 345 | {
|
| 346 | struct type;
|
| 347 | };
|
| 348 |
|
| 349 | template<> struct
|
| 350 | FloatLiteral<Float>
|
| 351 | {
|
| 352 | typedef float type;
|
| 353 | };
|
| 354 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 355 | template<class T>
|
| 356 | class RValue
|
| 357 | {
|
| 358 | public:
|
| 359 | explicit RValue(llvm::Value *rvalue);
|
| 360 |
|
| 361 | RValue(const T &lvalue);
|
| 362 | RValue(typename IntLiteral<T>::type i);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 363 | RValue(typename FloatLiteral<T>::type f);
|
| 364 | RValue(const Reference<T> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 365 |
|
Nicolas Capens | 698633a | 2015-02-04 00:16:13 -0500 | [diff] [blame] | 366 | RValue<T> &operator=(const RValue<T>&) = delete;
|
| 367 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 368 | llvm::Value *value; // FIXME: Make private
|
| 369 | };
|
| 370 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 371 | template<typename T>
|
| 372 | struct Argument
|
| 373 | {
|
| 374 | explicit Argument(llvm::Value *value) : value(value) {}
|
| 375 |
|
| 376 | llvm::Value *value;
|
| 377 | };
|
| 378 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 379 | class MMX : public Variable<MMX>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 380 | {
|
| 381 | public:
|
| 382 | static llvm::Type *getType();
|
| 383 | };
|
| 384 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 385 | class Bool : public Variable<Bool>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 386 | {
|
| 387 | public:
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 388 | Bool(Argument<Bool> argument);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 389 |
|
| 390 | Bool();
|
| 391 | Bool(bool x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 392 | Bool(RValue<Bool> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 393 | Bool(const Bool &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 394 | Bool(const Reference<Bool> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 395 |
|
| 396 | // RValue<Bool> operator=(bool rhs) const; // FIXME: Implement
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 397 | RValue<Bool> operator=(RValue<Bool> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 398 | RValue<Bool> operator=(const Bool &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 399 | RValue<Bool> operator=(const Reference<Bool> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 400 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 401 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 402 | };
|
| 403 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 404 | RValue<Bool> operator!(RValue<Bool> val);
|
| 405 | RValue<Bool> operator&&(RValue<Bool> lhs, RValue<Bool> rhs);
|
| 406 | RValue<Bool> operator||(RValue<Bool> lhs, RValue<Bool> rhs);
|
| 407 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 408 | class Byte : public Variable<Byte>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 409 | {
|
| 410 | public:
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 411 | Byte(Argument<Byte> argument);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 412 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 413 | explicit Byte(RValue<Int> cast);
|
Alexis Hetu | 77dfab4 | 2015-11-23 13:31:22 -0500 | [diff] [blame] | 414 | explicit Byte(RValue<UInt> cast);
|
| 415 | explicit Byte(RValue<UShort> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 416 |
|
| 417 | Byte();
|
| 418 | Byte(int x);
|
| 419 | Byte(unsigned char x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 420 | Byte(RValue<Byte> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 421 | Byte(const Byte &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 422 | Byte(const Reference<Byte> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 423 |
|
| 424 | // RValue<Byte> operator=(unsigned char rhs) const; // FIXME: Implement
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 425 | RValue<Byte> operator=(RValue<Byte> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 426 | RValue<Byte> operator=(const Byte &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 427 | RValue<Byte> operator=(const Reference<Byte> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 428 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 429 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 430 | };
|
| 431 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 432 | RValue<Byte> operator+(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 433 | RValue<Byte> operator-(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 434 | RValue<Byte> operator*(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 435 | RValue<Byte> operator/(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 436 | RValue<Byte> operator%(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 437 | RValue<Byte> operator&(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 438 | RValue<Byte> operator|(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 439 | RValue<Byte> operator^(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 440 | RValue<Byte> operator<<(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 441 | RValue<Byte> operator>>(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 442 | RValue<Byte> operator+=(const Byte &lhs, RValue<Byte> rhs);
|
| 443 | RValue<Byte> operator-=(const Byte &lhs, RValue<Byte> rhs);
|
| 444 | RValue<Byte> operator*=(const Byte &lhs, RValue<Byte> rhs);
|
| 445 | RValue<Byte> operator/=(const Byte &lhs, RValue<Byte> rhs);
|
| 446 | RValue<Byte> operator%=(const Byte &lhs, RValue<Byte> rhs);
|
| 447 | RValue<Byte> operator&=(const Byte &lhs, RValue<Byte> rhs);
|
| 448 | RValue<Byte> operator|=(const Byte &lhs, RValue<Byte> rhs);
|
| 449 | RValue<Byte> operator^=(const Byte &lhs, RValue<Byte> rhs);
|
| 450 | RValue<Byte> operator<<=(const Byte &lhs, RValue<Byte> rhs);
|
| 451 | RValue<Byte> operator>>=(const Byte &lhs, RValue<Byte> rhs);
|
| 452 | RValue<Byte> operator+(RValue<Byte> val);
|
| 453 | RValue<Byte> operator-(RValue<Byte> val);
|
| 454 | RValue<Byte> operator~(RValue<Byte> val);
|
| 455 | RValue<Byte> operator++(const Byte &val, int); // Post-increment
|
| 456 | const Byte &operator++(const Byte &val); // Pre-increment
|
| 457 | RValue<Byte> operator--(const Byte &val, int); // Post-decrement
|
| 458 | const Byte &operator--(const Byte &val); // Pre-decrement
|
| 459 | RValue<Bool> operator<(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 460 | RValue<Bool> operator<=(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 461 | RValue<Bool> operator>(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 462 | RValue<Bool> operator>=(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 463 | RValue<Bool> operator!=(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 464 | RValue<Bool> operator==(RValue<Byte> lhs, RValue<Byte> rhs);
|
| 465 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 466 | class SByte : public Variable<SByte>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 467 | {
|
| 468 | public:
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 469 | SByte(Argument<SByte> argument);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 470 |
|
Alexis Hetu | 77dfab4 | 2015-11-23 13:31:22 -0500 | [diff] [blame] | 471 | explicit SByte(RValue<Int> cast);
|
| 472 | explicit SByte(RValue<Short> cast);
|
| 473 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 474 | SByte();
|
| 475 | SByte(signed char x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 476 | SByte(RValue<SByte> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 477 | SByte(const SByte &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 478 | SByte(const Reference<SByte> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 479 |
|
| 480 | // RValue<SByte> operator=(signed char rhs) const; // FIXME: Implement
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 481 | RValue<SByte> operator=(RValue<SByte> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 482 | RValue<SByte> operator=(const SByte &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 483 | RValue<SByte> operator=(const Reference<SByte> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 484 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 485 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 486 | };
|
| 487 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 488 | RValue<SByte> operator+(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 489 | RValue<SByte> operator-(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 490 | RValue<SByte> operator*(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 491 | RValue<SByte> operator/(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 492 | RValue<SByte> operator%(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 493 | RValue<SByte> operator&(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 494 | RValue<SByte> operator|(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 495 | RValue<SByte> operator^(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 496 | RValue<SByte> operator<<(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 497 | RValue<SByte> operator>>(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 498 | RValue<SByte> operator+=(const SByte &lhs, RValue<SByte> rhs);
|
| 499 | RValue<SByte> operator-=(const SByte &lhs, RValue<SByte> rhs);
|
| 500 | RValue<SByte> operator*=(const SByte &lhs, RValue<SByte> rhs);
|
| 501 | RValue<SByte> operator/=(const SByte &lhs, RValue<SByte> rhs);
|
| 502 | RValue<SByte> operator%=(const SByte &lhs, RValue<SByte> rhs);
|
| 503 | RValue<SByte> operator&=(const SByte &lhs, RValue<SByte> rhs);
|
| 504 | RValue<SByte> operator|=(const SByte &lhs, RValue<SByte> rhs);
|
| 505 | RValue<SByte> operator^=(const SByte &lhs, RValue<SByte> rhs);
|
| 506 | RValue<SByte> operator<<=(const SByte &lhs, RValue<SByte> rhs);
|
| 507 | RValue<SByte> operator>>=(const SByte &lhs, RValue<SByte> rhs);
|
| 508 | RValue<SByte> operator+(RValue<SByte> val);
|
| 509 | RValue<SByte> operator-(RValue<SByte> val);
|
| 510 | RValue<SByte> operator~(RValue<SByte> val);
|
| 511 | RValue<SByte> operator++(const SByte &val, int); // Post-increment
|
| 512 | const SByte &operator++(const SByte &val); // Pre-increment
|
| 513 | RValue<SByte> operator--(const SByte &val, int); // Post-decrement
|
| 514 | const SByte &operator--(const SByte &val); // Pre-decrement
|
| 515 | RValue<Bool> operator<(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 516 | RValue<Bool> operator<=(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 517 | RValue<Bool> operator>(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 518 | RValue<Bool> operator>=(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 519 | RValue<Bool> operator!=(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 520 | RValue<Bool> operator==(RValue<SByte> lhs, RValue<SByte> rhs);
|
| 521 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 522 | class Short : public Variable<Short>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 523 | {
|
| 524 | public:
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 525 | Short(Argument<Short> argument);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 526 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 527 | explicit Short(RValue<Int> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 528 |
|
| 529 | Short();
|
| 530 | Short(short x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 531 | Short(RValue<Short> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 532 | Short(const Short &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 533 | Short(const Reference<Short> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 534 |
|
| 535 | // RValue<Short> operator=(short rhs) const; // FIXME: Implement
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 536 | RValue<Short> operator=(RValue<Short> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 537 | RValue<Short> operator=(const Short &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 538 | RValue<Short> operator=(const Reference<Short> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 539 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 540 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 541 | };
|
| 542 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 543 | RValue<Short> operator+(RValue<Short> lhs, RValue<Short> rhs);
|
| 544 | RValue<Short> operator-(RValue<Short> lhs, RValue<Short> rhs);
|
| 545 | RValue<Short> operator*(RValue<Short> lhs, RValue<Short> rhs);
|
| 546 | RValue<Short> operator/(RValue<Short> lhs, RValue<Short> rhs);
|
| 547 | RValue<Short> operator%(RValue<Short> lhs, RValue<Short> rhs);
|
| 548 | RValue<Short> operator&(RValue<Short> lhs, RValue<Short> rhs);
|
| 549 | RValue<Short> operator|(RValue<Short> lhs, RValue<Short> rhs);
|
| 550 | RValue<Short> operator^(RValue<Short> lhs, RValue<Short> rhs);
|
| 551 | RValue<Short> operator<<(RValue<Short> lhs, RValue<Short> rhs);
|
| 552 | RValue<Short> operator>>(RValue<Short> lhs, RValue<Short> rhs);
|
| 553 | RValue<Short> operator+=(const Short &lhs, RValue<Short> rhs);
|
| 554 | RValue<Short> operator-=(const Short &lhs, RValue<Short> rhs);
|
| 555 | RValue<Short> operator*=(const Short &lhs, RValue<Short> rhs);
|
| 556 | RValue<Short> operator/=(const Short &lhs, RValue<Short> rhs);
|
| 557 | RValue<Short> operator%=(const Short &lhs, RValue<Short> rhs);
|
| 558 | RValue<Short> operator&=(const Short &lhs, RValue<Short> rhs);
|
| 559 | RValue<Short> operator|=(const Short &lhs, RValue<Short> rhs);
|
| 560 | RValue<Short> operator^=(const Short &lhs, RValue<Short> rhs);
|
| 561 | RValue<Short> operator<<=(const Short &lhs, RValue<Short> rhs);
|
| 562 | RValue<Short> operator>>=(const Short &lhs, RValue<Short> rhs);
|
| 563 | RValue<Short> operator+(RValue<Short> val);
|
| 564 | RValue<Short> operator-(RValue<Short> val);
|
| 565 | RValue<Short> operator~(RValue<Short> val);
|
| 566 | RValue<Short> operator++(const Short &val, int); // Post-increment
|
| 567 | const Short &operator++(const Short &val); // Pre-increment
|
| 568 | RValue<Short> operator--(const Short &val, int); // Post-decrement
|
| 569 | const Short &operator--(const Short &val); // Pre-decrement
|
| 570 | RValue<Bool> operator<(RValue<Short> lhs, RValue<Short> rhs);
|
| 571 | RValue<Bool> operator<=(RValue<Short> lhs, RValue<Short> rhs);
|
| 572 | RValue<Bool> operator>(RValue<Short> lhs, RValue<Short> rhs);
|
| 573 | RValue<Bool> operator>=(RValue<Short> lhs, RValue<Short> rhs);
|
| 574 | RValue<Bool> operator!=(RValue<Short> lhs, RValue<Short> rhs);
|
| 575 | RValue<Bool> operator==(RValue<Short> lhs, RValue<Short> rhs);
|
| 576 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 577 | class UShort : public Variable<UShort>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 578 | {
|
| 579 | public:
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 580 | UShort(Argument<UShort> argument);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 581 |
|
Alexis Hetu | 77dfab4 | 2015-11-23 13:31:22 -0500 | [diff] [blame] | 582 | explicit UShort(RValue<UInt> cast);
|
Alexis Hetu | 75b650f | 2015-11-19 17:40:15 -0500 | [diff] [blame] | 583 | explicit UShort(RValue<Int> cast);
|
Alexis Hetu | 77dfab4 | 2015-11-23 13:31:22 -0500 | [diff] [blame] | 584 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 585 | UShort();
|
| 586 | UShort(unsigned short x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 587 | UShort(RValue<UShort> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 588 | UShort(const UShort &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 589 | UShort(const Reference<UShort> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 590 |
|
| 591 | // RValue<UShort> operator=(unsigned short rhs) const; // FIXME: Implement
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 592 | RValue<UShort> operator=(RValue<UShort> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 593 | RValue<UShort> operator=(const UShort &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 594 | RValue<UShort> operator=(const Reference<UShort> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 595 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 596 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 597 | };
|
| 598 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 599 | RValue<UShort> operator+(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 600 | RValue<UShort> operator-(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 601 | RValue<UShort> operator*(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 602 | RValue<UShort> operator/(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 603 | RValue<UShort> operator%(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 604 | RValue<UShort> operator&(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 605 | RValue<UShort> operator|(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 606 | RValue<UShort> operator^(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 607 | RValue<UShort> operator<<(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 608 | RValue<UShort> operator>>(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 609 | RValue<UShort> operator+=(const UShort &lhs, RValue<UShort> rhs);
|
| 610 | RValue<UShort> operator-=(const UShort &lhs, RValue<UShort> rhs);
|
| 611 | RValue<UShort> operator*=(const UShort &lhs, RValue<UShort> rhs);
|
| 612 | RValue<UShort> operator/=(const UShort &lhs, RValue<UShort> rhs);
|
| 613 | RValue<UShort> operator%=(const UShort &lhs, RValue<UShort> rhs);
|
| 614 | RValue<UShort> operator&=(const UShort &lhs, RValue<UShort> rhs);
|
| 615 | RValue<UShort> operator|=(const UShort &lhs, RValue<UShort> rhs);
|
| 616 | RValue<UShort> operator^=(const UShort &lhs, RValue<UShort> rhs);
|
| 617 | RValue<UShort> operator<<=(const UShort &lhs, RValue<UShort> rhs);
|
| 618 | RValue<UShort> operator>>=(const UShort &lhs, RValue<UShort> rhs);
|
| 619 | RValue<UShort> operator+(RValue<UShort> val);
|
| 620 | RValue<UShort> operator-(RValue<UShort> val);
|
| 621 | RValue<UShort> operator~(RValue<UShort> val);
|
| 622 | RValue<UShort> operator++(const UShort &val, int); // Post-increment
|
| 623 | const UShort &operator++(const UShort &val); // Pre-increment
|
| 624 | RValue<UShort> operator--(const UShort &val, int); // Post-decrement
|
| 625 | const UShort &operator--(const UShort &val); // Pre-decrement
|
| 626 | RValue<Bool> operator<(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 627 | RValue<Bool> operator<=(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 628 | RValue<Bool> operator>(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 629 | RValue<Bool> operator>=(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 630 | RValue<Bool> operator!=(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 631 | RValue<Bool> operator==(RValue<UShort> lhs, RValue<UShort> rhs);
|
| 632 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 633 | class Byte4 : public Variable<Byte4>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 634 | {
|
| 635 | public:
|
| 636 | // Byte4();
|
| 637 | // Byte4(int x, int y, int z, int w);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 638 | // Byte4(RValue<Byte4> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 639 | // Byte4(const Byte4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 640 | // Byte4(const Reference<Byte4> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 641 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 642 | // RValue<Byte4> operator=(RValue<Byte4> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 643 | // RValue<Byte4> operator=(const Byte4 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 644 | // RValue<Byte4> operator=(const Reference<Byte4> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 645 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 646 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 647 | };
|
| 648 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 649 | // RValue<Byte4> operator+(RValue<Byte4> lhs, RValue<Byte4> rhs);
|
| 650 | // RValue<Byte4> operator-(RValue<Byte4> lhs, RValue<Byte4> rhs);
|
| 651 | // RValue<Byte4> operator*(RValue<Byte4> lhs, RValue<Byte4> rhs);
|
| 652 | // RValue<Byte4> operator/(RValue<Byte4> lhs, RValue<Byte4> rhs);
|
| 653 | // RValue<Byte4> operator%(RValue<Byte4> lhs, RValue<Byte4> rhs);
|
| 654 | // RValue<Byte4> operator&(RValue<Byte4> lhs, RValue<Byte4> rhs);
|
| 655 | // RValue<Byte4> operator|(RValue<Byte4> lhs, RValue<Byte4> rhs);
|
| 656 | // RValue<Byte4> operator^(RValue<Byte4> lhs, RValue<Byte4> rhs);
|
| 657 | // RValue<Byte4> operator<<(RValue<Byte4> lhs, RValue<Byte4> rhs);
|
| 658 | // RValue<Byte4> operator>>(RValue<Byte4> lhs, RValue<Byte4> rhs);
|
| 659 | // RValue<Byte4> operator+=(const Byte4 &lhs, RValue<Byte4> rhs);
|
| 660 | // RValue<Byte4> operator-=(const Byte4 &lhs, RValue<Byte4> rhs);
|
| 661 | // RValue<Byte4> operator*=(const Byte4 &lhs, RValue<Byte4> rhs);
|
| 662 | // RValue<Byte4> operator/=(const Byte4 &lhs, RValue<Byte4> rhs);
|
| 663 | // RValue<Byte4> operator%=(const Byte4 &lhs, RValue<Byte4> rhs);
|
| 664 | // RValue<Byte4> operator&=(const Byte4 &lhs, RValue<Byte4> rhs);
|
| 665 | // RValue<Byte4> operator|=(const Byte4 &lhs, RValue<Byte4> rhs);
|
| 666 | // RValue<Byte4> operator^=(const Byte4 &lhs, RValue<Byte4> rhs);
|
| 667 | // RValue<Byte4> operator<<=(const Byte4 &lhs, RValue<Byte4> rhs);
|
| 668 | // RValue<Byte4> operator>>=(const Byte4 &lhs, RValue<Byte4> rhs);
|
| 669 | // RValue<Byte4> operator+(RValue<Byte4> val);
|
| 670 | // RValue<Byte4> operator-(RValue<Byte4> val);
|
| 671 | // RValue<Byte4> operator~(RValue<Byte4> val);
|
| 672 | // RValue<Byte4> operator++(const Byte4 &val, int); // Post-increment
|
| 673 | // const Byte4 &operator++(const Byte4 &val); // Pre-increment
|
| 674 | // RValue<Byte4> operator--(const Byte4 &val, int); // Post-decrement
|
| 675 | // const Byte4 &operator--(const Byte4 &val); // Pre-decrement
|
| 676 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 677 | class SByte4 : public Variable<SByte4>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 678 | {
|
| 679 | public:
|
| 680 | // SByte4();
|
| 681 | // SByte4(int x, int y, int z, int w);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 682 | // SByte4(RValue<SByte4> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 683 | // SByte4(const SByte4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 684 | // SByte4(const Reference<SByte4> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 685 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 686 | // RValue<SByte4> operator=(RValue<SByte4> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 687 | // RValue<SByte4> operator=(const SByte4 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 688 | // RValue<SByte4> operator=(const Reference<SByte4> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 689 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 690 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 691 | };
|
| 692 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 693 | // RValue<SByte4> operator+(RValue<SByte4> lhs, RValue<SByte4> rhs);
|
| 694 | // RValue<SByte4> operator-(RValue<SByte4> lhs, RValue<SByte4> rhs);
|
| 695 | // RValue<SByte4> operator*(RValue<SByte4> lhs, RValue<SByte4> rhs);
|
| 696 | // RValue<SByte4> operator/(RValue<SByte4> lhs, RValue<SByte4> rhs);
|
| 697 | // RValue<SByte4> operator%(RValue<SByte4> lhs, RValue<SByte4> rhs);
|
| 698 | // RValue<SByte4> operator&(RValue<SByte4> lhs, RValue<SByte4> rhs);
|
| 699 | // RValue<SByte4> operator|(RValue<SByte4> lhs, RValue<SByte4> rhs);
|
| 700 | // RValue<SByte4> operator^(RValue<SByte4> lhs, RValue<SByte4> rhs);
|
| 701 | // RValue<SByte4> operator<<(RValue<SByte4> lhs, RValue<SByte4> rhs);
|
| 702 | // RValue<SByte4> operator>>(RValue<SByte4> lhs, RValue<SByte4> rhs);
|
| 703 | // RValue<SByte4> operator+=(const SByte4 &lhs, RValue<SByte4> rhs);
|
| 704 | // RValue<SByte4> operator-=(const SByte4 &lhs, RValue<SByte4> rhs);
|
| 705 | // RValue<SByte4> operator*=(const SByte4 &lhs, RValue<SByte4> rhs);
|
| 706 | // RValue<SByte4> operator/=(const SByte4 &lhs, RValue<SByte4> rhs);
|
| 707 | // RValue<SByte4> operator%=(const SByte4 &lhs, RValue<SByte4> rhs);
|
| 708 | // RValue<SByte4> operator&=(const SByte4 &lhs, RValue<SByte4> rhs);
|
| 709 | // RValue<SByte4> operator|=(const SByte4 &lhs, RValue<SByte4> rhs);
|
| 710 | // RValue<SByte4> operator^=(const SByte4 &lhs, RValue<SByte4> rhs);
|
| 711 | // RValue<SByte4> operator<<=(const SByte4 &lhs, RValue<SByte4> rhs);
|
| 712 | // RValue<SByte4> operator>>=(const SByte4 &lhs, RValue<SByte4> rhs);
|
| 713 | // RValue<SByte4> operator+(RValue<SByte4> val);
|
| 714 | // RValue<SByte4> operator-(RValue<SByte4> val);
|
| 715 | // RValue<SByte4> operator~(RValue<SByte4> val);
|
| 716 | // RValue<SByte4> operator++(const SByte4 &val, int); // Post-increment
|
| 717 | // const SByte4 &operator++(const SByte4 &val); // Pre-increment
|
| 718 | // RValue<SByte4> operator--(const SByte4 &val, int); // Post-decrement
|
| 719 | // const SByte4 &operator--(const SByte4 &val); // Pre-decrement
|
| 720 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 721 | class Byte8 : public Variable<Byte8>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 722 | {
|
| 723 | public:
|
| 724 | Byte8();
|
| 725 | Byte8(byte x0, byte x1, byte x2, byte x3, byte x4, byte x5, byte x6, byte x7);
|
| 726 | Byte8(int64_t x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 727 | Byte8(RValue<Byte8> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 728 | Byte8(const Byte8 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 729 | Byte8(const Reference<Byte8> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 730 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 731 | RValue<Byte8> operator=(RValue<Byte8> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 732 | RValue<Byte8> operator=(const Byte8 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 733 | RValue<Byte8> operator=(const Reference<Byte8> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 734 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 735 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 736 | };
|
| 737 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 738 | RValue<Byte8> operator+(RValue<Byte8> lhs, RValue<Byte8> rhs);
|
| 739 | RValue<Byte8> operator-(RValue<Byte8> lhs, RValue<Byte8> rhs);
|
| 740 | // RValue<Byte8> operator*(RValue<Byte8> lhs, RValue<Byte8> rhs);
|
| 741 | // RValue<Byte8> operator/(RValue<Byte8> lhs, RValue<Byte8> rhs);
|
| 742 | // RValue<Byte8> operator%(RValue<Byte8> lhs, RValue<Byte8> rhs);
|
| 743 | RValue<Byte8> operator&(RValue<Byte8> lhs, RValue<Byte8> rhs);
|
| 744 | RValue<Byte8> operator|(RValue<Byte8> lhs, RValue<Byte8> rhs);
|
| 745 | RValue<Byte8> operator^(RValue<Byte8> lhs, RValue<Byte8> rhs);
|
| 746 | // RValue<Byte8> operator<<(RValue<Byte8> lhs, RValue<Byte8> rhs);
|
| 747 | // RValue<Byte8> operator>>(RValue<Byte8> lhs, RValue<Byte8> rhs);
|
| 748 | RValue<Byte8> operator+=(const Byte8 &lhs, RValue<Byte8> rhs);
|
| 749 | RValue<Byte8> operator-=(const Byte8 &lhs, RValue<Byte8> rhs);
|
| 750 | // RValue<Byte8> operator*=(const Byte8 &lhs, RValue<Byte8> rhs);
|
| 751 | // RValue<Byte8> operator/=(const Byte8 &lhs, RValue<Byte8> rhs);
|
| 752 | // RValue<Byte8> operator%=(const Byte8 &lhs, RValue<Byte8> rhs);
|
| 753 | RValue<Byte8> operator&=(const Byte8 &lhs, RValue<Byte8> rhs);
|
| 754 | RValue<Byte8> operator|=(const Byte8 &lhs, RValue<Byte8> rhs);
|
| 755 | RValue<Byte8> operator^=(const Byte8 &lhs, RValue<Byte8> rhs);
|
| 756 | // RValue<Byte8> operator<<=(const Byte8 &lhs, RValue<Byte8> rhs);
|
| 757 | // RValue<Byte8> operator>>=(const Byte8 &lhs, RValue<Byte8> rhs);
|
| 758 | // RValue<Byte8> operator+(RValue<Byte8> val);
|
| 759 | // RValue<Byte8> operator-(RValue<Byte8> val);
|
| 760 | RValue<Byte8> operator~(RValue<Byte8> val);
|
| 761 | // RValue<Byte8> operator++(const Byte8 &val, int); // Post-increment
|
| 762 | // const Byte8 &operator++(const Byte8 &val); // Pre-increment
|
| 763 | // RValue<Byte8> operator--(const Byte8 &val, int); // Post-decrement
|
| 764 | // const Byte8 &operator--(const Byte8 &val); // Pre-decrement
|
| 765 |
|
| 766 | RValue<Byte8> AddSat(RValue<Byte8> x, RValue<Byte8> y);
|
| 767 | RValue<Byte8> SubSat(RValue<Byte8> x, RValue<Byte8> y);
|
| 768 | RValue<Short4> Unpack(RValue<Byte4> x);
|
| 769 | RValue<Short4> UnpackLow(RValue<Byte8> x, RValue<Byte8> y);
|
| 770 | RValue<Short4> UnpackHigh(RValue<Byte8> x, RValue<Byte8> y);
|
| 771 | RValue<Int> SignMask(RValue<Byte8> x);
|
| 772 | // RValue<Byte8> CmpGT(RValue<Byte8> x, RValue<Byte8> y);
|
| 773 | RValue<Byte8> CmpEQ(RValue<Byte8> x, RValue<Byte8> y);
|
| 774 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 775 | class SByte8 : public Variable<SByte8>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 776 | {
|
| 777 | public:
|
| 778 | SByte8();
|
| 779 | SByte8(byte x0, byte x1, byte x2, byte x3, byte x4, byte x5, byte x6, byte x7);
|
| 780 | SByte8(int64_t x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 781 | SByte8(RValue<SByte8> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 782 | SByte8(const SByte8 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 783 | SByte8(const Reference<SByte8> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 784 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 785 | RValue<SByte8> operator=(RValue<SByte8> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 786 | RValue<SByte8> operator=(const SByte8 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 787 | RValue<SByte8> operator=(const Reference<SByte8> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 788 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 789 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 790 | };
|
| 791 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 792 | RValue<SByte8> operator+(RValue<SByte8> lhs, RValue<SByte8> rhs);
|
| 793 | RValue<SByte8> operator-(RValue<SByte8> lhs, RValue<SByte8> rhs);
|
| 794 | // RValue<SByte8> operator*(RValue<SByte8> lhs, RValue<SByte8> rhs);
|
| 795 | // RValue<SByte8> operator/(RValue<SByte8> lhs, RValue<SByte8> rhs);
|
| 796 | // RValue<SByte8> operator%(RValue<SByte8> lhs, RValue<SByte8> rhs);
|
| 797 | RValue<SByte8> operator&(RValue<SByte8> lhs, RValue<SByte8> rhs);
|
| 798 | RValue<SByte8> operator|(RValue<SByte8> lhs, RValue<SByte8> rhs);
|
| 799 | RValue<SByte8> operator^(RValue<SByte8> lhs, RValue<SByte8> rhs);
|
| 800 | // RValue<SByte8> operator<<(RValue<SByte8> lhs, RValue<SByte8> rhs);
|
| 801 | // RValue<SByte8> operator>>(RValue<SByte8> lhs, RValue<SByte8> rhs);
|
| 802 | RValue<SByte8> operator+=(const SByte8 &lhs, RValue<SByte8> rhs);
|
| 803 | RValue<SByte8> operator-=(const SByte8 &lhs, RValue<SByte8> rhs);
|
| 804 | // RValue<SByte8> operator*=(const SByte8 &lhs, RValue<SByte8> rhs);
|
| 805 | // RValue<SByte8> operator/=(const SByte8 &lhs, RValue<SByte8> rhs);
|
| 806 | // RValue<SByte8> operator%=(const SByte8 &lhs, RValue<SByte8> rhs);
|
| 807 | RValue<SByte8> operator&=(const SByte8 &lhs, RValue<SByte8> rhs);
|
| 808 | RValue<SByte8> operator|=(const SByte8 &lhs, RValue<SByte8> rhs);
|
| 809 | RValue<SByte8> operator^=(const SByte8 &lhs, RValue<SByte8> rhs);
|
| 810 | // RValue<SByte8> operator<<=(const SByte8 &lhs, RValue<SByte8> rhs);
|
| 811 | // RValue<SByte8> operator>>=(const SByte8 &lhs, RValue<SByte8> rhs);
|
| 812 | // RValue<SByte8> operator+(RValue<SByte8> val);
|
| 813 | // RValue<SByte8> operator-(RValue<SByte8> val);
|
| 814 | RValue<SByte8> operator~(RValue<SByte8> val);
|
| 815 | // RValue<SByte8> operator++(const SByte8 &val, int); // Post-increment
|
| 816 | // const SByte8 &operator++(const SByte8 &val); // Pre-increment
|
| 817 | // RValue<SByte8> operator--(const SByte8 &val, int); // Post-decrement
|
| 818 | // const SByte8 &operator--(const SByte8 &val); // Pre-decrement
|
| 819 |
|
| 820 | RValue<SByte8> AddSat(RValue<SByte8> x, RValue<SByte8> y);
|
| 821 | RValue<SByte8> SubSat(RValue<SByte8> x, RValue<SByte8> y);
|
| 822 | RValue<Short4> UnpackLow(RValue<SByte8> x, RValue<SByte8> y);
|
| 823 | RValue<Short4> UnpackHigh(RValue<SByte8> x, RValue<SByte8> y);
|
| 824 | RValue<Int> SignMask(RValue<SByte8> x);
|
| 825 | RValue<Byte8> CmpGT(RValue<SByte8> x, RValue<SByte8> y);
|
| 826 | RValue<Byte8> CmpEQ(RValue<SByte8> x, RValue<SByte8> y);
|
| 827 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 828 | class Byte16 : public Variable<Byte16>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 829 | {
|
| 830 | public:
|
| 831 | // Byte16();
|
| 832 | // Byte16(int x, int y, int z, int w);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 833 | Byte16(RValue<Byte16> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 834 | Byte16(const Byte16 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 835 | Byte16(const Reference<Byte16> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 836 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 837 | RValue<Byte16> operator=(RValue<Byte16> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 838 | RValue<Byte16> operator=(const Byte16 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 839 | RValue<Byte16> operator=(const Reference<Byte16> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 840 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 841 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 842 | };
|
| 843 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 844 | // RValue<Byte16> operator+(RValue<Byte16> lhs, RValue<Byte16> rhs);
|
| 845 | // RValue<Byte16> operator-(RValue<Byte16> lhs, RValue<Byte16> rhs);
|
| 846 | // RValue<Byte16> operator*(RValue<Byte16> lhs, RValue<Byte16> rhs);
|
| 847 | // RValue<Byte16> operator/(RValue<Byte16> lhs, RValue<Byte16> rhs);
|
| 848 | // RValue<Byte16> operator%(RValue<Byte16> lhs, RValue<Byte16> rhs);
|
| 849 | // RValue<Byte16> operator&(RValue<Byte16> lhs, RValue<Byte16> rhs);
|
| 850 | // RValue<Byte16> operator|(RValue<Byte16> lhs, RValue<Byte16> rhs);
|
| 851 | // RValue<Byte16> operator^(RValue<Byte16> lhs, RValue<Byte16> rhs);
|
| 852 | // RValue<Byte16> operator<<(RValue<Byte16> lhs, RValue<Byte16> rhs);
|
| 853 | // RValue<Byte16> operator>>(RValue<Byte16> lhs, RValue<Byte16> rhs);
|
| 854 | // RValue<Byte16> operator+=(const Byte16 &lhs, RValue<Byte16> rhs);
|
| 855 | // RValue<Byte16> operator-=(const Byte16 &lhs, RValue<Byte16> rhs);
|
| 856 | // RValue<Byte16> operator*=(const Byte16 &lhs, RValue<Byte16> rhs);
|
| 857 | // RValue<Byte16> operator/=(const Byte16 &lhs, RValue<Byte16> rhs);
|
| 858 | // RValue<Byte16> operator%=(const Byte16 &lhs, RValue<Byte16> rhs);
|
| 859 | // RValue<Byte16> operator&=(const Byte16 &lhs, RValue<Byte16> rhs);
|
| 860 | // RValue<Byte16> operator|=(const Byte16 &lhs, RValue<Byte16> rhs);
|
| 861 | // RValue<Byte16> operator^=(const Byte16 &lhs, RValue<Byte16> rhs);
|
| 862 | // RValue<Byte16> operator<<=(const Byte16 &lhs, RValue<Byte16> rhs);
|
| 863 | // RValue<Byte16> operator>>=(const Byte16 &lhs, RValue<Byte16> rhs);
|
| 864 | // RValue<Byte16> operator+(RValue<Byte16> val);
|
| 865 | // RValue<Byte16> operator-(RValue<Byte16> val);
|
| 866 | // RValue<Byte16> operator~(RValue<Byte16> val);
|
| 867 | // RValue<Byte16> operator++(const Byte16 &val, int); // Post-increment
|
| 868 | // const Byte16 &operator++(const Byte16 &val); // Pre-increment
|
| 869 | // RValue<Byte16> operator--(const Byte16 &val, int); // Post-decrement
|
| 870 | // const Byte16 &operator--(const Byte16 &val); // Pre-decrement
|
| 871 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 872 | class SByte16 : public Variable<SByte16>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 873 | {
|
| 874 | public:
|
| 875 | // SByte16();
|
| 876 | // SByte16(int x, int y, int z, int w);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 877 | // SByte16(RValue<SByte16> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 878 | // SByte16(const SByte16 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 879 | // SByte16(const Reference<SByte16> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 880 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 881 | // RValue<SByte16> operator=(RValue<SByte16> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 882 | // RValue<SByte16> operator=(const SByte16 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 883 | // RValue<SByte16> operator=(const Reference<SByte16> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 884 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 885 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 886 | };
|
| 887 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 888 | // RValue<SByte16> operator+(RValue<SByte16> lhs, RValue<SByte16> rhs);
|
| 889 | // RValue<SByte16> operator-(RValue<SByte16> lhs, RValue<SByte16> rhs);
|
| 890 | // RValue<SByte16> operator*(RValue<SByte16> lhs, RValue<SByte16> rhs);
|
| 891 | // RValue<SByte16> operator/(RValue<SByte16> lhs, RValue<SByte16> rhs);
|
| 892 | // RValue<SByte16> operator%(RValue<SByte16> lhs, RValue<SByte16> rhs);
|
| 893 | // RValue<SByte16> operator&(RValue<SByte16> lhs, RValue<SByte16> rhs);
|
| 894 | // RValue<SByte16> operator|(RValue<SByte16> lhs, RValue<SByte16> rhs);
|
| 895 | // RValue<SByte16> operator^(RValue<SByte16> lhs, RValue<SByte16> rhs);
|
| 896 | // RValue<SByte16> operator<<(RValue<SByte16> lhs, RValue<SByte16> rhs);
|
| 897 | // RValue<SByte16> operator>>(RValue<SByte16> lhs, RValue<SByte16> rhs);
|
| 898 | // RValue<SByte16> operator+=(const SByte16 &lhs, RValue<SByte16> rhs);
|
| 899 | // RValue<SByte16> operator-=(const SByte16 &lhs, RValue<SByte16> rhs);
|
| 900 | // RValue<SByte16> operator*=(const SByte16 &lhs, RValue<SByte16> rhs);
|
| 901 | // RValue<SByte16> operator/=(const SByte16 &lhs, RValue<SByte16> rhs);
|
| 902 | // RValue<SByte16> operator%=(const SByte16 &lhs, RValue<SByte16> rhs);
|
| 903 | // RValue<SByte16> operator&=(const SByte16 &lhs, RValue<SByte16> rhs);
|
| 904 | // RValue<SByte16> operator|=(const SByte16 &lhs, RValue<SByte16> rhs);
|
| 905 | // RValue<SByte16> operator^=(const SByte16 &lhs, RValue<SByte16> rhs);
|
| 906 | // RValue<SByte16> operator<<=(const SByte16 &lhs, RValue<SByte16> rhs);
|
| 907 | // RValue<SByte16> operator>>=(const SByte16 &lhs, RValue<SByte16> rhs);
|
| 908 | // RValue<SByte16> operator+(RValue<SByte16> val);
|
| 909 | // RValue<SByte16> operator-(RValue<SByte16> val);
|
| 910 | // RValue<SByte16> operator~(RValue<SByte16> val);
|
| 911 | // RValue<SByte16> operator++(const SByte16 &val, int); // Post-increment
|
| 912 | // const SByte16 &operator++(const SByte16 &val); // Pre-increment
|
| 913 | // RValue<SByte16> operator--(const SByte16 &val, int); // Post-decrement
|
| 914 | // const SByte16 &operator--(const SByte16 &val); // Pre-decrement
|
| 915 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 916 | class Short4 : public Variable<Short4>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 917 | {
|
| 918 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 919 | explicit Short4(RValue<Int> cast);
|
| 920 | explicit Short4(RValue<Int4> cast);
|
| 921 | // explicit Short4(RValue<Float> cast);
|
| 922 | explicit Short4(RValue<Float4> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 923 |
|
| 924 | Short4();
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 925 | Short4(short xyzw);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 926 | Short4(short x, short y, short z, short w);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 927 | Short4(RValue<Short4> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 928 | Short4(const Short4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 929 | Short4(const Reference<Short4> &rhs);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 930 | Short4(RValue<UShort4> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 931 | Short4(const UShort4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 932 | Short4(const Reference<UShort4> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 933 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 934 | RValue<Short4> operator=(RValue<Short4> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 935 | RValue<Short4> operator=(const Short4 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 936 | RValue<Short4> operator=(const Reference<Short4> &rhs) const;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 937 | RValue<Short4> operator=(RValue<UShort4> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 938 | RValue<Short4> operator=(const UShort4 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 939 | RValue<Short4> operator=(const Reference<UShort4> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 940 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 941 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 942 | };
|
| 943 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 944 | RValue<Short4> operator+(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 945 | RValue<Short4> operator-(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 946 | RValue<Short4> operator*(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 947 | // RValue<Short4> operator/(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 948 | // RValue<Short4> operator%(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 949 | RValue<Short4> operator&(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 950 | RValue<Short4> operator|(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 951 | RValue<Short4> operator^(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 952 | RValue<Short4> operator<<(RValue<Short4> lhs, unsigned char rhs);
|
| 953 | RValue<Short4> operator>>(RValue<Short4> lhs, unsigned char rhs);
|
| 954 | RValue<Short4> operator<<(RValue<Short4> lhs, RValue<Long1> rhs);
|
| 955 | RValue<Short4> operator>>(RValue<Short4> lhs, RValue<Long1> rhs);
|
| 956 | RValue<Short4> operator+=(const Short4 &lhs, RValue<Short4> rhs);
|
| 957 | RValue<Short4> operator-=(const Short4 &lhs, RValue<Short4> rhs);
|
| 958 | RValue<Short4> operator*=(const Short4 &lhs, RValue<Short4> rhs);
|
| 959 | // RValue<Short4> operator/=(const Short4 &lhs, RValue<Short4> rhs);
|
| 960 | // RValue<Short4> operator%=(const Short4 &lhs, RValue<Short4> rhs);
|
| 961 | RValue<Short4> operator&=(const Short4 &lhs, RValue<Short4> rhs);
|
| 962 | RValue<Short4> operator|=(const Short4 &lhs, RValue<Short4> rhs);
|
| 963 | RValue<Short4> operator^=(const Short4 &lhs, RValue<Short4> rhs);
|
| 964 | RValue<Short4> operator<<=(const Short4 &lhs, unsigned char rhs);
|
| 965 | RValue<Short4> operator>>=(const Short4 &lhs, unsigned char rhs);
|
| 966 | RValue<Short4> operator<<=(const Short4 &lhs, RValue<Long1> rhs);
|
| 967 | RValue<Short4> operator>>=(const Short4 &lhs, RValue<Long1> rhs);
|
| 968 | // RValue<Short4> operator+(RValue<Short4> val);
|
| 969 | RValue<Short4> operator-(RValue<Short4> val);
|
| 970 | RValue<Short4> operator~(RValue<Short4> val);
|
| 971 | // RValue<Short4> operator++(const Short4 &val, int); // Post-increment
|
| 972 | // const Short4 &operator++(const Short4 &val); // Pre-increment
|
| 973 | // RValue<Short4> operator--(const Short4 &val, int); // Post-decrement
|
| 974 | // const Short4 &operator--(const Short4 &val); // Pre-decrement
|
| 975 | // RValue<Bool> operator<(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 976 | // RValue<Bool> operator<=(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 977 | // RValue<Bool> operator>(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 978 | // RValue<Bool> operator>=(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 979 | // RValue<Bool> operator!=(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 980 | // RValue<Bool> operator==(RValue<Short4> lhs, RValue<Short4> rhs);
|
| 981 |
|
| 982 | RValue<Short4> RoundShort4(RValue<Float4> cast);
|
| 983 | RValue<Short4> Max(RValue<Short4> x, RValue<Short4> y);
|
| 984 | RValue<Short4> Min(RValue<Short4> x, RValue<Short4> y);
|
| 985 | RValue<Short4> AddSat(RValue<Short4> x, RValue<Short4> y);
|
| 986 | RValue<Short4> SubSat(RValue<Short4> x, RValue<Short4> y);
|
| 987 | RValue<Short4> MulHigh(RValue<Short4> x, RValue<Short4> y);
|
| 988 | RValue<Int2> MulAdd(RValue<Short4> x, RValue<Short4> y);
|
| 989 | RValue<SByte8> Pack(RValue<Short4> x, RValue<Short4> y);
|
| 990 | RValue<Int2> UnpackLow(RValue<Short4> x, RValue<Short4> y);
|
| 991 | RValue<Int2> UnpackHigh(RValue<Short4> x, RValue<Short4> y);
|
| 992 | RValue<Short4> Swizzle(RValue<Short4> x, unsigned char select);
|
| 993 | RValue<Short4> Insert(RValue<Short4> val, RValue<Short> element, int i);
|
| 994 | RValue<Short> Extract(RValue<Short4> val, int i);
|
| 995 | RValue<Short4> CmpGT(RValue<Short4> x, RValue<Short4> y);
|
| 996 | RValue<Short4> CmpEQ(RValue<Short4> x, RValue<Short4> y);
|
| 997 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 998 | class UShort4 : public Variable<UShort4>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 999 | {
|
| 1000 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1001 | explicit UShort4(RValue<Int4> cast);
|
| 1002 | explicit UShort4(RValue<Float4> cast, bool saturate = false);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1003 |
|
| 1004 | UShort4();
|
| 1005 | UShort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1006 | UShort4(RValue<UShort4> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1007 | UShort4(const UShort4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1008 | UShort4(const Reference<UShort4> &rhs);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1009 | UShort4(RValue<Short4> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1010 | UShort4(const Short4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1011 | UShort4(const Reference<Short4> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1012 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1013 | RValue<UShort4> operator=(RValue<UShort4> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1014 | RValue<UShort4> operator=(const UShort4 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1015 | RValue<UShort4> operator=(const Reference<UShort4> &rhs) const;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1016 | RValue<UShort4> operator=(RValue<Short4> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1017 | RValue<UShort4> operator=(const Short4 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1018 | RValue<UShort4> operator=(const Reference<Short4> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1019 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1020 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1021 | };
|
| 1022 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1023 | RValue<UShort4> operator+(RValue<UShort4> lhs, RValue<UShort4> rhs);
|
| 1024 | RValue<UShort4> operator-(RValue<UShort4> lhs, RValue<UShort4> rhs);
|
| 1025 | RValue<UShort4> operator*(RValue<UShort4> lhs, RValue<UShort4> rhs);
|
| 1026 | // RValue<UShort4> operator/(RValue<UShort4> lhs, RValue<UShort4> rhs);
|
| 1027 | // RValue<UShort4> operator%(RValue<UShort4> lhs, RValue<UShort4> rhs);
|
| 1028 | // RValue<UShort4> operator&(RValue<UShort4> lhs, RValue<UShort4> rhs);
|
| 1029 | // RValue<UShort4> operator|(RValue<UShort4> lhs, RValue<UShort4> rhs);
|
| 1030 | // RValue<UShort4> operator^(RValue<UShort4> lhs, RValue<UShort4> rhs);
|
| 1031 | RValue<UShort4> operator<<(RValue<UShort4> lhs, unsigned char rhs);
|
| 1032 | RValue<UShort4> operator>>(RValue<UShort4> lhs, unsigned char rhs);
|
| 1033 | RValue<UShort4> operator<<(RValue<UShort4> lhs, RValue<Long1> rhs);
|
| 1034 | RValue<UShort4> operator>>(RValue<UShort4> lhs, RValue<Long1> rhs);
|
| 1035 | // RValue<UShort4> operator+=(const UShort4 &lhs, RValue<UShort4> rhs);
|
| 1036 | // RValue<UShort4> operator-=(const UShort4 &lhs, RValue<UShort4> rhs);
|
| 1037 | // RValue<UShort4> operator*=(const UShort4 &lhs, RValue<UShort4> rhs);
|
| 1038 | // RValue<UShort4> operator/=(const UShort4 &lhs, RValue<UShort4> rhs);
|
| 1039 | // RValue<UShort4> operator%=(const UShort4 &lhs, RValue<UShort4> rhs);
|
| 1040 | // RValue<UShort4> operator&=(const UShort4 &lhs, RValue<UShort4> rhs);
|
| 1041 | // RValue<UShort4> operator|=(const UShort4 &lhs, RValue<UShort4> rhs);
|
| 1042 | // RValue<UShort4> operator^=(const UShort4 &lhs, RValue<UShort4> rhs);
|
| 1043 | RValue<UShort4> operator<<=(const UShort4 &lhs, unsigned char rhs);
|
| 1044 | RValue<UShort4> operator>>=(const UShort4 &lhs, unsigned char rhs);
|
| 1045 | RValue<UShort4> operator<<=(const UShort4 &lhs, RValue<Long1> rhs);
|
| 1046 | RValue<UShort4> operator>>=(const UShort4 &lhs, RValue<Long1> rhs);
|
| 1047 | // RValue<UShort4> operator+(RValue<UShort4> val);
|
| 1048 | // RValue<UShort4> operator-(RValue<UShort4> val);
|
| 1049 | RValue<UShort4> operator~(RValue<UShort4> val);
|
| 1050 | // RValue<UShort4> operator++(const UShort4 &val, int); // Post-increment
|
| 1051 | // const UShort4 &operator++(const UShort4 &val); // Pre-increment
|
| 1052 | // RValue<UShort4> operator--(const UShort4 &val, int); // Post-decrement
|
| 1053 | // const UShort4 &operator--(const UShort4 &val); // Pre-decrement
|
| 1054 |
|
| 1055 | RValue<UShort4> Max(RValue<UShort4> x, RValue<UShort4> y);
|
| 1056 | RValue<UShort4> Min(RValue<UShort4> x, RValue<UShort4> y);
|
| 1057 | RValue<UShort4> AddSat(RValue<UShort4> x, RValue<UShort4> y);
|
| 1058 | RValue<UShort4> SubSat(RValue<UShort4> x, RValue<UShort4> y);
|
| 1059 | RValue<UShort4> MulHigh(RValue<UShort4> x, RValue<UShort4> y);
|
| 1060 | RValue<UShort4> Average(RValue<UShort4> x, RValue<UShort4> y);
|
| 1061 | RValue<Byte8> Pack(RValue<UShort4> x, RValue<UShort4> y);
|
| 1062 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1063 | class Short8 : public Variable<Short8>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1064 | {
|
| 1065 | public:
|
| 1066 | // Short8();
|
| 1067 | Short8(short c0, short c1, short c2, short c3, short c4, short c5, short c6, short c7);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1068 | Short8(RValue<Short8> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1069 | // Short8(const Short8 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1070 | // Short8(const Reference<Short8> &rhs);
|
Nicolas Capens | 62abb55 | 2016-01-05 12:03:47 -0500 | [diff] [blame] | 1071 | Short8(RValue<Short4> lo, RValue<Short4> hi);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1072 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1073 | // RValue<Short8> operator=(RValue<Short8> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1074 | // RValue<Short8> operator=(const Short8 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1075 | // RValue<Short8> operator=(const Reference<Short8> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1076 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1077 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1078 | };
|
| 1079 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1080 | RValue<Short8> operator+(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1081 | // RValue<Short8> operator-(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1082 | // RValue<Short8> operator*(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1083 | // RValue<Short8> operator/(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1084 | // RValue<Short8> operator%(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1085 | RValue<Short8> operator&(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1086 | // RValue<Short8> operator|(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1087 | // RValue<Short8> operator^(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1088 | RValue<Short8> operator<<(RValue<Short8> lhs, unsigned char rhs);
|
| 1089 | RValue<Short8> operator>>(RValue<Short8> lhs, unsigned char rhs);
|
| 1090 | // RValue<Short8> operator<<(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1091 | // RValue<Short8> operator>>(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1092 | // RValue<Short8> operator+=(const Short8 &lhs, RValue<Short8> rhs);
|
| 1093 | // RValue<Short8> operator-=(const Short8 &lhs, RValue<Short8> rhs);
|
| 1094 | // RValue<Short8> operator*=(const Short8 &lhs, RValue<Short8> rhs);
|
| 1095 | // RValue<Short8> operator/=(const Short8 &lhs, RValue<Short8> rhs);
|
| 1096 | // RValue<Short8> operator%=(const Short8 &lhs, RValue<Short8> rhs);
|
| 1097 | // RValue<Short8> operator&=(const Short8 &lhs, RValue<Short8> rhs);
|
| 1098 | // RValue<Short8> operator|=(const Short8 &lhs, RValue<Short8> rhs);
|
| 1099 | // RValue<Short8> operator^=(const Short8 &lhs, RValue<Short8> rhs);
|
| 1100 | // RValue<Short8> operator<<=(const Short8 &lhs, RValue<Short8> rhs);
|
| 1101 | // RValue<Short8> operator>>=(const Short8 &lhs, RValue<Short8> rhs);
|
| 1102 | // RValue<Short8> operator+(RValue<Short8> val);
|
| 1103 | // RValue<Short8> operator-(RValue<Short8> val);
|
| 1104 | // RValue<Short8> operator~(RValue<Short8> val);
|
| 1105 | // RValue<Short8> operator++(const Short8 &val, int); // Post-increment
|
| 1106 | // const Short8 &operator++(const Short8 &val); // Pre-increment
|
| 1107 | // RValue<Short8> operator--(const Short8 &val, int); // Post-decrement
|
| 1108 | // const Short8 &operator--(const Short8 &val); // Pre-decrement
|
| 1109 | // RValue<Bool> operator<(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1110 | // RValue<Bool> operator<=(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1111 | // RValue<Bool> operator>(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1112 | // RValue<Bool> operator>=(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1113 | // RValue<Bool> operator!=(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1114 | // RValue<Bool> operator==(RValue<Short8> lhs, RValue<Short8> rhs);
|
| 1115 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1116 | RValue<Short8> MulHigh(RValue<Short8> x, RValue<Short8> y);
|
| 1117 | RValue<Int4> MulAdd(RValue<Short8> x, RValue<Short8> y);
|
| 1118 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1119 | class UShort8 : public Variable<UShort8>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1120 | {
|
| 1121 | public:
|
| 1122 | // UShort8();
|
| 1123 | UShort8(unsigned short c0, unsigned short c1, unsigned short c2, unsigned short c3, unsigned short c4, unsigned short c5, unsigned short c6, unsigned short c7);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1124 | UShort8(RValue<UShort8> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1125 | // UShort8(const UShort8 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1126 | // UShort8(const Reference<UShort8> &rhs);
|
Nicolas Capens | 62abb55 | 2016-01-05 12:03:47 -0500 | [diff] [blame] | 1127 | UShort8(RValue<UShort4> lo, RValue<UShort4> hi);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1128 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1129 | RValue<UShort8> operator=(RValue<UShort8> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1130 | RValue<UShort8> operator=(const UShort8 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1131 | RValue<UShort8> operator=(const Reference<UShort8> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1132 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1133 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1134 | };
|
| 1135 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1136 | RValue<UShort8> operator+(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1137 | // RValue<UShort8> operator-(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1138 | RValue<UShort8> operator*(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1139 | // RValue<UShort8> operator/(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1140 | // RValue<UShort8> operator%(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1141 | RValue<UShort8> operator&(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1142 | // RValue<UShort8> operator|(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1143 | // RValue<UShort8> operator^(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1144 | RValue<UShort8> operator<<(RValue<UShort8> lhs, unsigned char rhs);
|
| 1145 | RValue<UShort8> operator>>(RValue<UShort8> lhs, unsigned char rhs);
|
| 1146 | // RValue<UShort8> operator<<(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1147 | // RValue<UShort8> operator>>(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1148 | RValue<UShort8> operator+=(const UShort8 &lhs, RValue<UShort8> rhs);
|
| 1149 | // RValue<UShort8> operator-=(const UShort8 &lhs, RValue<UShort8> rhs);
|
| 1150 | // RValue<UShort8> operator*=(const UShort8 &lhs, RValue<UShort8> rhs);
|
| 1151 | // RValue<UShort8> operator/=(const UShort8 &lhs, RValue<UShort8> rhs);
|
| 1152 | // RValue<UShort8> operator%=(const UShort8 &lhs, RValue<UShort8> rhs);
|
| 1153 | // RValue<UShort8> operator&=(const UShort8 &lhs, RValue<UShort8> rhs);
|
| 1154 | // RValue<UShort8> operator|=(const UShort8 &lhs, RValue<UShort8> rhs);
|
| 1155 | // RValue<UShort8> operator^=(const UShort8 &lhs, RValue<UShort8> rhs);
|
| 1156 | // RValue<UShort8> operator<<=(const UShort8 &lhs, RValue<UShort8> rhs);
|
| 1157 | // RValue<UShort8> operator>>=(const UShort8 &lhs, RValue<UShort8> rhs);
|
| 1158 | // RValue<UShort8> operator+(RValue<UShort8> val);
|
| 1159 | // RValue<UShort8> operator-(RValue<UShort8> val);
|
| 1160 | RValue<UShort8> operator~(RValue<UShort8> val);
|
| 1161 | // RValue<UShort8> operator++(const UShort8 &val, int); // Post-increment
|
| 1162 | // const UShort8 &operator++(const UShort8 &val); // Pre-increment
|
| 1163 | // RValue<UShort8> operator--(const UShort8 &val, int); // Post-decrement
|
| 1164 | // const UShort8 &operator--(const UShort8 &val); // Pre-decrement
|
| 1165 | // RValue<Bool> operator<(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1166 | // RValue<Bool> operator<=(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1167 | // RValue<Bool> operator>(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1168 | // RValue<Bool> operator>=(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1169 | // RValue<Bool> operator!=(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1170 | // RValue<Bool> operator==(RValue<UShort8> lhs, RValue<UShort8> rhs);
|
| 1171 |
|
| 1172 | RValue<UShort8> Swizzle(RValue<UShort8> x, char select0, char select1, char select2, char select3, char select4, char select5, char select6, char select7);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1173 | RValue<UShort8> MulHigh(RValue<UShort8> x, RValue<UShort8> y);
|
| 1174 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1175 | class Int : public Variable<Int>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1176 | {
|
| 1177 | public:
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 1178 | Int(Argument<Int> argument);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1179 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1180 | explicit Int(RValue<Byte> cast);
|
| 1181 | explicit Int(RValue<SByte> cast);
|
| 1182 | explicit Int(RValue<Short> cast);
|
| 1183 | explicit Int(RValue<UShort> cast);
|
| 1184 | explicit Int(RValue<Int2> cast);
|
| 1185 | explicit Int(RValue<Long> cast);
|
| 1186 | explicit Int(RValue<Float> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1187 |
|
| 1188 | Int();
|
| 1189 | Int(int x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1190 | Int(RValue<Int> rhs);
|
| 1191 | Int(RValue<UInt> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1192 | Int(const Int &rhs);
|
| 1193 | Int(const UInt &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1194 | Int(const Reference<Int> &rhs);
|
| 1195 | Int(const Reference<UInt> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1196 |
|
| 1197 | RValue<Int> operator=(int rhs) const;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1198 | RValue<Int> operator=(RValue<Int> rhs) const;
|
| 1199 | RValue<Int> operator=(RValue<UInt> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1200 | RValue<Int> operator=(const Int &rhs) const;
|
| 1201 | RValue<Int> operator=(const UInt &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1202 | RValue<Int> operator=(const Reference<Int> &rhs) const;
|
| 1203 | RValue<Int> operator=(const Reference<UInt> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1204 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1205 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1206 | };
|
| 1207 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1208 | RValue<Int> operator+(RValue<Int> lhs, RValue<Int> rhs);
|
| 1209 | RValue<Int> operator-(RValue<Int> lhs, RValue<Int> rhs);
|
| 1210 | RValue<Int> operator*(RValue<Int> lhs, RValue<Int> rhs);
|
| 1211 | RValue<Int> operator/(RValue<Int> lhs, RValue<Int> rhs);
|
| 1212 | RValue<Int> operator%(RValue<Int> lhs, RValue<Int> rhs);
|
| 1213 | RValue<Int> operator&(RValue<Int> lhs, RValue<Int> rhs);
|
| 1214 | RValue<Int> operator|(RValue<Int> lhs, RValue<Int> rhs);
|
| 1215 | RValue<Int> operator^(RValue<Int> lhs, RValue<Int> rhs);
|
| 1216 | RValue<Int> operator<<(RValue<Int> lhs, RValue<Int> rhs);
|
| 1217 | RValue<Int> operator>>(RValue<Int> lhs, RValue<Int> rhs);
|
| 1218 | RValue<Int> operator+=(const Int &lhs, RValue<Int> rhs);
|
| 1219 | RValue<Int> operator-=(const Int &lhs, RValue<Int> rhs);
|
| 1220 | RValue<Int> operator*=(const Int &lhs, RValue<Int> rhs);
|
| 1221 | RValue<Int> operator/=(const Int &lhs, RValue<Int> rhs);
|
| 1222 | RValue<Int> operator%=(const Int &lhs, RValue<Int> rhs);
|
| 1223 | RValue<Int> operator&=(const Int &lhs, RValue<Int> rhs);
|
| 1224 | RValue<Int> operator|=(const Int &lhs, RValue<Int> rhs);
|
| 1225 | RValue<Int> operator^=(const Int &lhs, RValue<Int> rhs);
|
| 1226 | RValue<Int> operator<<=(const Int &lhs, RValue<Int> rhs);
|
| 1227 | RValue<Int> operator>>=(const Int &lhs, RValue<Int> rhs);
|
| 1228 | RValue<Int> operator+(RValue<Int> val);
|
| 1229 | RValue<Int> operator-(RValue<Int> val);
|
| 1230 | RValue<Int> operator~(RValue<Int> val);
|
| 1231 | RValue<Int> operator++(const Int &val, int); // Post-increment
|
| 1232 | const Int &operator++(const Int &val); // Pre-increment
|
| 1233 | RValue<Int> operator--(const Int &val, int); // Post-decrement
|
| 1234 | const Int &operator--(const Int &val); // Pre-decrement
|
| 1235 | RValue<Bool> operator<(RValue<Int> lhs, RValue<Int> rhs);
|
| 1236 | RValue<Bool> operator<=(RValue<Int> lhs, RValue<Int> rhs);
|
| 1237 | RValue<Bool> operator>(RValue<Int> lhs, RValue<Int> rhs);
|
| 1238 | RValue<Bool> operator>=(RValue<Int> lhs, RValue<Int> rhs);
|
| 1239 | RValue<Bool> operator!=(RValue<Int> lhs, RValue<Int> rhs);
|
| 1240 | RValue<Bool> operator==(RValue<Int> lhs, RValue<Int> rhs);
|
| 1241 |
|
| 1242 | RValue<Int> Max(RValue<Int> x, RValue<Int> y);
|
| 1243 | RValue<Int> Min(RValue<Int> x, RValue<Int> y);
|
| 1244 | RValue<Int> Clamp(RValue<Int> x, RValue<Int> min, RValue<Int> max);
|
| 1245 | RValue<Int> RoundInt(RValue<Float> cast);
|
| 1246 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1247 | class Long : public Variable<Long>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1248 | {
|
| 1249 | public:
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 1250 | // Long(Argument<Long> argument);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1251 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1252 | // explicit Long(RValue<Short> cast);
|
| 1253 | // explicit Long(RValue<UShort> cast);
|
| 1254 | explicit Long(RValue<Int> cast);
|
| 1255 | explicit Long(RValue<UInt> cast);
|
| 1256 | // explicit Long(RValue<Float> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1257 |
|
| 1258 | Long();
|
| 1259 | // Long(qword x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1260 | Long(RValue<Long> rhs);
|
| 1261 | // Long(RValue<ULong> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1262 | // Long(const Long &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1263 | // Long(const Reference<Long> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1264 | // Long(const ULong &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1265 | // Long(const Reference<ULong> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1266 |
|
| 1267 | RValue<Long> operator=(int64_t rhs) const;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1268 | RValue<Long> operator=(RValue<Long> rhs) const;
|
| 1269 | // RValue<Long> operator=(RValue<ULong> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1270 | RValue<Long> operator=(const Long &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1271 | RValue<Long> operator=(const Reference<Long> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1272 | // RValue<Long> operator=(const ULong &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1273 | // RValue<Long> operator=(const Reference<ULong> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1274 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1275 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1276 | };
|
| 1277 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1278 | RValue<Long> operator+(RValue<Long> lhs, RValue<Long> rhs);
|
| 1279 | RValue<Long> operator-(RValue<Long> lhs, RValue<Long> rhs);
|
| 1280 | // RValue<Long> operator*(RValue<Long> lhs, RValue<Long> rhs);
|
| 1281 | // RValue<Long> operator/(RValue<Long> lhs, RValue<Long> rhs);
|
| 1282 | // RValue<Long> operator%(RValue<Long> lhs, RValue<Long> rhs);
|
| 1283 | // RValue<Long> operator&(RValue<Long> lhs, RValue<Long> rhs);
|
| 1284 | // RValue<Long> operator|(RValue<Long> lhs, RValue<Long> rhs);
|
| 1285 | // RValue<Long> operator^(RValue<Long> lhs, RValue<Long> rhs);
|
| 1286 | // RValue<Long> operator<<(RValue<Long> lhs, RValue<Long> rhs);
|
| 1287 | // RValue<Long> operator>>(RValue<Long> lhs, RValue<Long> rhs);
|
| 1288 | RValue<Long> operator+=(const Long &lhs, RValue<Long> rhs);
|
| 1289 | RValue<Long> operator-=(const Long &lhs, RValue<Long> rhs);
|
| 1290 | // RValue<Long> operator*=(const Long &lhs, RValue<Long> rhs);
|
| 1291 | // RValue<Long> operator/=(const Long &lhs, RValue<Long> rhs);
|
| 1292 | // RValue<Long> operator%=(const Long &lhs, RValue<Long> rhs);
|
| 1293 | // RValue<Long> operator&=(const Long &lhs, RValue<Long> rhs);
|
| 1294 | // RValue<Long> operator|=(const Long &lhs, RValue<Long> rhs);
|
| 1295 | // RValue<Long> operator^=(const Long &lhs, RValue<Long> rhs);
|
| 1296 | // RValue<Long> operator<<=(const Long &lhs, RValue<Long> rhs);
|
| 1297 | // RValue<Long> operator>>=(const Long &lhs, RValue<Long> rhs);
|
| 1298 | // RValue<Long> operator+(RValue<Long> val);
|
| 1299 | // RValue<Long> operator-(RValue<Long> val);
|
| 1300 | // RValue<Long> operator~(RValue<Long> val);
|
| 1301 | // RValue<Long> operator++(const Long &val, int); // Post-increment
|
| 1302 | // const Long &operator++(const Long &val); // Pre-increment
|
| 1303 | // RValue<Long> operator--(const Long &val, int); // Post-decrement
|
| 1304 | // const Long &operator--(const Long &val); // Pre-decrement
|
| 1305 | // RValue<Bool> operator<(RValue<Long> lhs, RValue<Long> rhs);
|
| 1306 | // RValue<Bool> operator<=(RValue<Long> lhs, RValue<Long> rhs);
|
| 1307 | // RValue<Bool> operator>(RValue<Long> lhs, RValue<Long> rhs);
|
| 1308 | // RValue<Bool> operator>=(RValue<Long> lhs, RValue<Long> rhs);
|
| 1309 | // RValue<Bool> operator!=(RValue<Long> lhs, RValue<Long> rhs);
|
| 1310 | // RValue<Bool> operator==(RValue<Long> lhs, RValue<Long> rhs);
|
| 1311 |
|
| 1312 | // RValue<Long> RoundLong(RValue<Float> cast);
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 1313 | RValue<Long> AddAtomic( RValue<Pointer<Long>> x, RValue<Long> y);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1314 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1315 | class Long1 : public Variable<Long1>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1316 | {
|
| 1317 | public:
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 1318 | // Long1(Argument<Long1> argument);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1319 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1320 | // explicit Long1(RValue<Short> cast);
|
| 1321 | // explicit Long1(RValue<UShort> cast);
|
| 1322 | // explicit Long1(RValue<Int> cast);
|
Nicolas Capens | 50c9636 | 2016-01-04 23:03:59 -0500 | [diff] [blame] | 1323 | explicit Long1(RValue<UInt> cast);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1324 | // explicit Long1(RValue<Float> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1325 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1326 | // Long1();
|
| 1327 | // Long1(qword x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1328 | Long1(RValue<Long1> rhs);
|
| 1329 | // Long1(RValue<ULong1> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1330 | // Long1(const Long1 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1331 | // Long1(const Reference<Long1> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1332 | // Long1(const ULong1 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1333 | // Long1(const Reference<ULong1> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1334 |
|
| 1335 | // RValue<Long1> operator=(qword rhs) const;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1336 | // RValue<Long1> operator=(RValue<Long1> rhs) const;
|
| 1337 | // RValue<Long1> operator=(RValue<ULong1> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1338 | // RValue<Long1> operator=(const Long1 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1339 | // RValue<Long1> operator=(const Reference<Long1> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1340 | // RValue<Long1> operator=(const ULong1 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1341 | // RValue<Long1> operator=(const Reference<ULong1> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1342 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1343 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1344 | };
|
| 1345 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1346 | // RValue<Long1> operator+(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1347 | // RValue<Long1> operator-(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1348 | // RValue<Long1> operator*(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1349 | // RValue<Long1> operator/(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1350 | // RValue<Long1> operator%(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1351 | // RValue<Long1> operator&(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1352 | // RValue<Long1> operator|(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1353 | // RValue<Long1> operator^(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1354 | // RValue<Long1> operator<<(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1355 | // RValue<Long1> operator>>(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1356 | // RValue<Long1> operator+=(const Long1 &lhs, RValue<Long1> rhs);
|
| 1357 | // RValue<Long1> operator-=(const Long1 &lhs, RValue<Long1> rhs);
|
| 1358 | // RValue<Long1> operator*=(const Long1 &lhs, RValue<Long1> rhs);
|
| 1359 | // RValue<Long1> operator/=(const Long1 &lhs, RValue<Long1> rhs);
|
| 1360 | // RValue<Long1> operator%=(const Long1 &lhs, RValue<Long1> rhs);
|
| 1361 | // RValue<Long1> operator&=(const Long1 &lhs, RValue<Long1> rhs);
|
| 1362 | // RValue<Long1> operator|=(const Long1 &lhs, RValue<Long1> rhs);
|
| 1363 | // RValue<Long1> operator^=(const Long1 &lhs, RValue<Long1> rhs);
|
| 1364 | // RValue<Long1> operator<<=(const Long1 &lhs, RValue<Long1> rhs);
|
| 1365 | // RValue<Long1> operator>>=(const Long1 &lhs, RValue<Long1> rhs);
|
| 1366 | // RValue<Long1> operator+(RValue<Long1> val);
|
| 1367 | // RValue<Long1> operator-(RValue<Long1> val);
|
| 1368 | // RValue<Long1> operator~(RValue<Long1> val);
|
| 1369 | // RValue<Long1> operator++(const Long1 &val, int); // Post-increment
|
| 1370 | // const Long1 &operator++(const Long1 &val); // Pre-increment
|
| 1371 | // RValue<Long1> operator--(const Long1 &val, int); // Post-decrement
|
| 1372 | // const Long1 &operator--(const Long1 &val); // Pre-decrement
|
| 1373 | // RValue<Bool> operator<(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1374 | // RValue<Bool> operator<=(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1375 | // RValue<Bool> operator>(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1376 | // RValue<Bool> operator>=(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1377 | // RValue<Bool> operator!=(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1378 | // RValue<Bool> operator==(RValue<Long1> lhs, RValue<Long1> rhs);
|
| 1379 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1380 | // RValue<Long1> RoundLong1(RValue<Float> cast);
|
| 1381 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1382 | class Long2 : public Variable<Long2>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1383 | {
|
| 1384 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1385 | // explicit Long2(RValue<Long> cast);
|
| 1386 | // explicit Long2(RValue<Long1> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1387 |
|
| 1388 | // Long2();
|
| 1389 | // Long2(int x, int y);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1390 | // Long2(RValue<Long2> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1391 | // Long2(const Long2 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1392 | // Long2(const Reference<Long2> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1393 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1394 | // RValue<Long2> operator=(RValue<Long2> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1395 | // RValue<Long2> operator=(const Long2 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1396 | // RValue<Long2> operator=(const Reference<Long2 &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1397 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1398 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1399 | };
|
| 1400 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1401 | // RValue<Long2> operator+(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1402 | // RValue<Long2> operator-(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1403 | // RValue<Long2> operator*(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1404 | // RValue<Long2> operator/(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1405 | // RValue<Long2> operator%(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1406 | // RValue<Long2> operator&(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1407 | // RValue<Long2> operator|(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1408 | // RValue<Long2> operator^(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1409 | // RValue<Long2> operator<<(RValue<Long2> lhs, unsigned char rhs);
|
| 1410 | // RValue<Long2> operator>>(RValue<Long2> lhs, unsigned char rhs);
|
| 1411 | // RValue<Long2> operator<<(RValue<Long2> lhs, RValue<Long1> rhs);
|
| 1412 | // RValue<Long2> operator>>(RValue<Long2> lhs, RValue<Long1> rhs);
|
| 1413 | // RValue<Long2> operator+=(const Long2 &lhs, RValue<Long2> rhs);
|
| 1414 | // RValue<Long2> operator-=(const Long2 &lhs, RValue<Long2> rhs);
|
| 1415 | // RValue<Long2> operator*=(const Long2 &lhs, RValue<Long2> rhs);
|
| 1416 | // RValue<Long2> operator/=(const Long2 &lhs, RValue<Long2> rhs);
|
| 1417 | // RValue<Long2> operator%=(const Long2 &lhs, RValue<Long2> rhs);
|
| 1418 | // RValue<Long2> operator&=(const Long2 &lhs, RValue<Long2> rhs);
|
| 1419 | // RValue<Long2> operator|=(const Long2 &lhs, RValue<Long2> rhs);
|
| 1420 | // RValue<Long2> operator^=(const Long2 &lhs, RValue<Long2> rhs);
|
| 1421 | // RValue<Long2> operator<<=(const Long2 &lhs, unsigned char rhs);
|
| 1422 | // RValue<Long2> operator>>=(const Long2 &lhs, unsigned char rhs);
|
| 1423 | // RValue<Long2> operator<<=(const Long2 &lhs, RValue<Long1> rhs);
|
| 1424 | // RValue<Long2> operator>>=(const Long2 &lhs, RValue<Long1> rhs);
|
| 1425 | // RValue<Long2> operator+(RValue<Long2> val);
|
| 1426 | // RValue<Long2> operator-(RValue<Long2> val);
|
| 1427 | // RValue<Long2> operator~(RValue<Long2> val);
|
| 1428 | // RValue<Long2> operator++(const Long2 &val, int); // Post-increment
|
| 1429 | // const Long2 &operator++(const Long2 &val); // Pre-increment
|
| 1430 | // RValue<Long2> operator--(const Long2 &val, int); // Post-decrement
|
| 1431 | // const Long2 &operator--(const Long2 &val); // Pre-decrement
|
| 1432 | // RValue<Bool> operator<(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1433 | // RValue<Bool> operator<=(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1434 | // RValue<Bool> operator>(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1435 | // RValue<Bool> operator>=(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1436 | // RValue<Bool> operator!=(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1437 | // RValue<Bool> operator==(RValue<Long2> lhs, RValue<Long2> rhs);
|
| 1438 |
|
| 1439 | // RValue<Long2> RoundInt(RValue<Float4> cast);
|
| 1440 | // RValue<Long2> UnpackLow(RValue<Long2> x, RValue<Long2> y);
|
| 1441 | RValue<Long2> UnpackHigh(RValue<Long2> x, RValue<Long2> y);
|
| 1442 | // RValue<Int> Extract(RValue<Long2> val, int i);
|
| 1443 | // RValue<Long2> Insert(RValue<Long2> val, RValue<Int> element, int i);
|
| 1444 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1445 | class UInt : public Variable<UInt>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1446 | {
|
| 1447 | public:
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 1448 | UInt(Argument<UInt> argument);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1449 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1450 | explicit UInt(RValue<UShort> cast);
|
| 1451 | explicit UInt(RValue<Long> cast);
|
| 1452 | explicit UInt(RValue<Float> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1453 |
|
| 1454 | UInt();
|
| 1455 | UInt(int x);
|
| 1456 | UInt(unsigned int x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1457 | UInt(RValue<UInt> rhs);
|
| 1458 | UInt(RValue<Int> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1459 | UInt(const UInt &rhs);
|
| 1460 | UInt(const Int &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1461 | UInt(const Reference<UInt> &rhs);
|
| 1462 | UInt(const Reference<Int> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1463 |
|
| 1464 | RValue<UInt> operator=(unsigned int rhs) const;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1465 | RValue<UInt> operator=(RValue<UInt> rhs) const;
|
| 1466 | RValue<UInt> operator=(RValue<Int> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1467 | RValue<UInt> operator=(const UInt &rhs) const;
|
| 1468 | RValue<UInt> operator=(const Int &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1469 | RValue<UInt> operator=(const Reference<UInt> &rhs) const;
|
| 1470 | RValue<UInt> operator=(const Reference<Int> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1471 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1472 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1473 | };
|
| 1474 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1475 | RValue<UInt> operator+(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1476 | RValue<UInt> operator-(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1477 | RValue<UInt> operator*(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1478 | RValue<UInt> operator/(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1479 | RValue<UInt> operator%(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1480 | RValue<UInt> operator&(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1481 | RValue<UInt> operator|(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1482 | RValue<UInt> operator^(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1483 | RValue<UInt> operator<<(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1484 | RValue<UInt> operator>>(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1485 | RValue<UInt> operator+=(const UInt &lhs, RValue<UInt> rhs);
|
| 1486 | RValue<UInt> operator-=(const UInt &lhs, RValue<UInt> rhs);
|
| 1487 | RValue<UInt> operator*=(const UInt &lhs, RValue<UInt> rhs);
|
| 1488 | RValue<UInt> operator/=(const UInt &lhs, RValue<UInt> rhs);
|
| 1489 | RValue<UInt> operator%=(const UInt &lhs, RValue<UInt> rhs);
|
| 1490 | RValue<UInt> operator&=(const UInt &lhs, RValue<UInt> rhs);
|
| 1491 | RValue<UInt> operator|=(const UInt &lhs, RValue<UInt> rhs);
|
| 1492 | RValue<UInt> operator^=(const UInt &lhs, RValue<UInt> rhs);
|
| 1493 | RValue<UInt> operator<<=(const UInt &lhs, RValue<UInt> rhs);
|
| 1494 | RValue<UInt> operator>>=(const UInt &lhs, RValue<UInt> rhs);
|
| 1495 | RValue<UInt> operator+(RValue<UInt> val);
|
| 1496 | RValue<UInt> operator-(RValue<UInt> val);
|
| 1497 | RValue<UInt> operator~(RValue<UInt> val);
|
| 1498 | RValue<UInt> operator++(const UInt &val, int); // Post-increment
|
| 1499 | const UInt &operator++(const UInt &val); // Pre-increment
|
| 1500 | RValue<UInt> operator--(const UInt &val, int); // Post-decrement
|
| 1501 | const UInt &operator--(const UInt &val); // Pre-decrement
|
| 1502 | RValue<Bool> operator<(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1503 | RValue<Bool> operator<=(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1504 | RValue<Bool> operator>(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1505 | RValue<Bool> operator>=(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1506 | RValue<Bool> operator!=(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1507 | RValue<Bool> operator==(RValue<UInt> lhs, RValue<UInt> rhs);
|
| 1508 |
|
| 1509 | RValue<UInt> Max(RValue<UInt> x, RValue<UInt> y);
|
| 1510 | RValue<UInt> Min(RValue<UInt> x, RValue<UInt> y);
|
| 1511 | RValue<UInt> Clamp(RValue<UInt> x, RValue<UInt> min, RValue<UInt> max);
|
| 1512 | // RValue<UInt> RoundUInt(RValue<Float> cast);
|
| 1513 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1514 | class Int2 : public Variable<Int2>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1515 | {
|
| 1516 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1517 | // explicit Int2(RValue<Int> cast);
|
| 1518 | explicit Int2(RValue<Int4> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1519 |
|
| 1520 | Int2();
|
| 1521 | Int2(int x, int y);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1522 | Int2(RValue<Int2> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1523 | Int2(const Int2 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1524 | Int2(const Reference<Int2> &rhs);
|
Nicolas Capens | 62abb55 | 2016-01-05 12:03:47 -0500 | [diff] [blame] | 1525 | Int2(RValue<Int> lo, RValue<Int> hi);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1526 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1527 | RValue<Int2> operator=(RValue<Int2> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1528 | RValue<Int2> operator=(const Int2 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1529 | RValue<Int2> operator=(const Reference<Int2> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1530 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1531 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1532 | };
|
| 1533 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1534 | RValue<Int2> operator+(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1535 | RValue<Int2> operator-(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1536 | // RValue<Int2> operator*(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1537 | // RValue<Int2> operator/(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1538 | // RValue<Int2> operator%(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1539 | RValue<Int2> operator&(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1540 | RValue<Int2> operator|(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1541 | RValue<Int2> operator^(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1542 | RValue<Int2> operator<<(RValue<Int2> lhs, unsigned char rhs);
|
| 1543 | RValue<Int2> operator>>(RValue<Int2> lhs, unsigned char rhs);
|
| 1544 | RValue<Int2> operator<<(RValue<Int2> lhs, RValue<Long1> rhs);
|
| 1545 | RValue<Int2> operator>>(RValue<Int2> lhs, RValue<Long1> rhs);
|
| 1546 | RValue<Int2> operator+=(const Int2 &lhs, RValue<Int2> rhs);
|
| 1547 | RValue<Int2> operator-=(const Int2 &lhs, RValue<Int2> rhs);
|
| 1548 | // RValue<Int2> operator*=(const Int2 &lhs, RValue<Int2> rhs);
|
| 1549 | // RValue<Int2> operator/=(const Int2 &lhs, RValue<Int2> rhs);
|
| 1550 | // RValue<Int2> operator%=(const Int2 &lhs, RValue<Int2> rhs);
|
| 1551 | RValue<Int2> operator&=(const Int2 &lhs, RValue<Int2> rhs);
|
| 1552 | RValue<Int2> operator|=(const Int2 &lhs, RValue<Int2> rhs);
|
| 1553 | RValue<Int2> operator^=(const Int2 &lhs, RValue<Int2> rhs);
|
| 1554 | RValue<Int2> operator<<=(const Int2 &lhs, unsigned char rhs);
|
| 1555 | RValue<Int2> operator>>=(const Int2 &lhs, unsigned char rhs);
|
| 1556 | RValue<Int2> operator<<=(const Int2 &lhs, RValue<Long1> rhs);
|
| 1557 | RValue<Int2> operator>>=(const Int2 &lhs, RValue<Long1> rhs);
|
| 1558 | // RValue<Int2> operator+(RValue<Int2> val);
|
| 1559 | // RValue<Int2> operator-(RValue<Int2> val);
|
| 1560 | RValue<Int2> operator~(RValue<Int2> val);
|
| 1561 | // RValue<Int2> operator++(const Int2 &val, int); // Post-increment
|
| 1562 | // const Int2 &operator++(const Int2 &val); // Pre-increment
|
| 1563 | // RValue<Int2> operator--(const Int2 &val, int); // Post-decrement
|
| 1564 | // const Int2 &operator--(const Int2 &val); // Pre-decrement
|
| 1565 | // RValue<Bool> operator<(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1566 | // RValue<Bool> operator<=(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1567 | // RValue<Bool> operator>(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1568 | // RValue<Bool> operator>=(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1569 | // RValue<Bool> operator!=(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1570 | // RValue<Bool> operator==(RValue<Int2> lhs, RValue<Int2> rhs);
|
| 1571 |
|
| 1572 | // RValue<Int2> RoundInt(RValue<Float4> cast);
|
| 1573 | RValue<Long1> UnpackLow(RValue<Int2> x, RValue<Int2> y);
|
| 1574 | RValue<Long1> UnpackHigh(RValue<Int2> x, RValue<Int2> y);
|
| 1575 | RValue<Int> Extract(RValue<Int2> val, int i);
|
Nicolas Capens | fff3c9b | 2015-05-13 23:40:44 -0400 | [diff] [blame] | 1576 | RValue<Int2> Insert(RValue<Int2> val, RValue<Int> element, int i);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1577 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1578 | class UInt2 : public Variable<UInt2>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1579 | {
|
| 1580 | public:
|
| 1581 | UInt2();
|
| 1582 | UInt2(unsigned int x, unsigned int y);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1583 | UInt2(RValue<UInt2> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1584 | UInt2(const UInt2 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1585 | UInt2(const Reference<UInt2> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1586 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1587 | RValue<UInt2> operator=(RValue<UInt2> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1588 | RValue<UInt2> operator=(const UInt2 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1589 | RValue<UInt2> operator=(const Reference<UInt2> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1590 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1591 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1592 | };
|
| 1593 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1594 | RValue<UInt2> operator+(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1595 | RValue<UInt2> operator-(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1596 | // RValue<UInt2> operator*(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1597 | // RValue<UInt2> operator/(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1598 | // RValue<UInt2> operator%(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1599 | RValue<UInt2> operator&(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1600 | RValue<UInt2> operator|(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1601 | RValue<UInt2> operator^(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1602 | RValue<UInt2> operator<<(RValue<UInt2> lhs, unsigned char rhs);
|
| 1603 | RValue<UInt2> operator>>(RValue<UInt2> lhs, unsigned char rhs);
|
| 1604 | RValue<UInt2> operator<<(RValue<UInt2> lhs, RValue<Long1> rhs);
|
| 1605 | RValue<UInt2> operator>>(RValue<UInt2> lhs, RValue<Long1> rhs);
|
| 1606 | RValue<UInt2> operator+=(const UInt2 &lhs, RValue<UInt2> rhs);
|
| 1607 | RValue<UInt2> operator-=(const UInt2 &lhs, RValue<UInt2> rhs);
|
| 1608 | // RValue<UInt2> operator*=(const UInt2 &lhs, RValue<UInt2> rhs);
|
| 1609 | // RValue<UInt2> operator/=(const UInt2 &lhs, RValue<UInt2> rhs);
|
| 1610 | // RValue<UInt2> operator%=(const UInt2 &lhs, RValue<UInt2> rhs);
|
| 1611 | RValue<UInt2> operator&=(const UInt2 &lhs, RValue<UInt2> rhs);
|
| 1612 | RValue<UInt2> operator|=(const UInt2 &lhs, RValue<UInt2> rhs);
|
| 1613 | RValue<UInt2> operator^=(const UInt2 &lhs, RValue<UInt2> rhs);
|
| 1614 | RValue<UInt2> operator<<=(const UInt2 &lhs, unsigned char rhs);
|
| 1615 | RValue<UInt2> operator>>=(const UInt2 &lhs, unsigned char rhs);
|
| 1616 | RValue<UInt2> operator<<=(const UInt2 &lhs, RValue<Long1> rhs);
|
| 1617 | RValue<UInt2> operator>>=(const UInt2 &lhs, RValue<Long1> rhs);
|
| 1618 | // RValue<UInt2> operator+(RValue<UInt2> val);
|
| 1619 | // RValue<UInt2> operator-(RValue<UInt2> val);
|
| 1620 | RValue<UInt2> operator~(RValue<UInt2> val);
|
| 1621 | // RValue<UInt2> operator++(const UInt2 &val, int); // Post-increment
|
| 1622 | // const UInt2 &operator++(const UInt2 &val); // Pre-increment
|
| 1623 | // RValue<UInt2> operator--(const UInt2 &val, int); // Post-decrement
|
| 1624 | // const UInt2 &operator--(const UInt2 &val); // Pre-decrement
|
| 1625 | // RValue<Bool> operator<(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1626 | // RValue<Bool> operator<=(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1627 | // RValue<Bool> operator>(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1628 | // RValue<Bool> operator>=(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1629 | // RValue<Bool> operator!=(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1630 | // RValue<Bool> operator==(RValue<UInt2> lhs, RValue<UInt2> rhs);
|
| 1631 |
|
| 1632 | // RValue<UInt2> RoundInt(RValue<Float4> cast);
|
| 1633 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1634 | class Int4 : public Variable<Int4>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1635 | {
|
| 1636 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1637 | explicit Int4(RValue<Float4> cast);
|
Alexis Hetu | 2aa852f | 2015-10-14 16:32:39 -0400 | [diff] [blame] | 1638 | explicit Int4(RValue<Short4> cast);
|
| 1639 | explicit Int4(RValue<UShort4> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1640 |
|
| 1641 | Int4();
|
| 1642 | Int4(int xyzw);
|
| 1643 | Int4(int x, int yzw);
|
| 1644 | Int4(int x, int y, int zw);
|
| 1645 | Int4(int x, int y, int z, int w);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1646 | Int4(RValue<Int4> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1647 | Int4(const Int4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1648 | Int4(const Reference<Int4> &rhs);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1649 | Int4(RValue<UInt4> rhs);
|
| 1650 | Int4(const UInt4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1651 | Int4(const Reference<UInt4> &rhs);
|
Nicolas Capens | 62abb55 | 2016-01-05 12:03:47 -0500 | [diff] [blame] | 1652 | Int4(RValue<Int2> lo, RValue<Int2> hi);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1653 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1654 | RValue<Int4> operator=(RValue<Int4> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1655 | RValue<Int4> operator=(const Int4 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1656 | RValue<Int4> operator=(const Reference<Int4> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1657 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1658 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1659 |
|
| 1660 | private:
|
| 1661 | void constant(int x, int y, int z, int w);
|
| 1662 | };
|
| 1663 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1664 | RValue<Int4> operator+(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1665 | RValue<Int4> operator-(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1666 | RValue<Int4> operator*(RValue<Int4> lhs, RValue<Int4> rhs);
|
Alexis Hetu | d9d27bb | 2015-08-18 15:22:15 -0400 | [diff] [blame] | 1667 | RValue<Int4> operator/(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1668 | RValue<Int4> operator%(RValue<Int4> lhs, RValue<Int4> rhs);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1669 | RValue<Int4> operator&(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1670 | RValue<Int4> operator|(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1671 | RValue<Int4> operator^(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1672 | RValue<Int4> operator<<(RValue<Int4> lhs, unsigned char rhs);
|
| 1673 | RValue<Int4> operator>>(RValue<Int4> lhs, unsigned char rhs);
|
Alexis Hetu | d9d27bb | 2015-08-18 15:22:15 -0400 | [diff] [blame] | 1674 | RValue<Int4> operator<<(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1675 | RValue<Int4> operator>>(RValue<Int4> lhs, RValue<Int4> rhs);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1676 | RValue<Int4> operator+=(const Int4 &lhs, RValue<Int4> rhs);
|
| 1677 | RValue<Int4> operator-=(const Int4 &lhs, RValue<Int4> rhs);
|
| 1678 | RValue<Int4> operator*=(const Int4 &lhs, RValue<Int4> rhs);
|
| 1679 | // RValue<Int4> operator/=(const Int4 &lhs, RValue<Int4> rhs);
|
| 1680 | // RValue<Int4> operator%=(const Int4 &lhs, RValue<Int4> rhs);
|
| 1681 | RValue<Int4> operator&=(const Int4 &lhs, RValue<Int4> rhs);
|
| 1682 | RValue<Int4> operator|=(const Int4 &lhs, RValue<Int4> rhs);
|
| 1683 | RValue<Int4> operator^=(const Int4 &lhs, RValue<Int4> rhs);
|
| 1684 | RValue<Int4> operator<<=(const Int4 &lhs, unsigned char rhs);
|
| 1685 | RValue<Int4> operator>>=(const Int4 &lhs, unsigned char rhs);
|
| 1686 | RValue<Int4> operator+(RValue<Int4> val);
|
| 1687 | RValue<Int4> operator-(RValue<Int4> val);
|
| 1688 | RValue<Int4> operator~(RValue<Int4> val);
|
| 1689 | // RValue<Int4> operator++(const Int4 &val, int); // Post-increment
|
| 1690 | // const Int4 &operator++(const Int4 &val); // Pre-increment
|
| 1691 | // RValue<Int4> operator--(const Int4 &val, int); // Post-decrement
|
| 1692 | // const Int4 &operator--(const Int4 &val); // Pre-decrement
|
| 1693 | // RValue<Bool> operator<(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1694 | // RValue<Bool> operator<=(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1695 | // RValue<Bool> operator>(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1696 | // RValue<Bool> operator>=(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1697 | // RValue<Bool> operator!=(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1698 | // RValue<Bool> operator==(RValue<Int4> lhs, RValue<Int4> rhs);
|
| 1699 |
|
| 1700 | RValue<Int4> CmpEQ(RValue<Int4> x, RValue<Int4> y);
|
| 1701 | RValue<Int4> CmpLT(RValue<Int4> x, RValue<Int4> y);
|
| 1702 | RValue<Int4> CmpLE(RValue<Int4> x, RValue<Int4> y);
|
| 1703 | RValue<Int4> CmpNEQ(RValue<Int4> x, RValue<Int4> y);
|
| 1704 | RValue<Int4> CmpNLT(RValue<Int4> x, RValue<Int4> y);
|
| 1705 | RValue<Int4> CmpNLE(RValue<Int4> x, RValue<Int4> y);
|
| 1706 | RValue<Int4> Max(RValue<Int4> x, RValue<Int4> y);
|
| 1707 | RValue<Int4> Min(RValue<Int4> x, RValue<Int4> y);
|
| 1708 | RValue<Int4> RoundInt(RValue<Float4> cast);
|
| 1709 | RValue<Short8> Pack(RValue<Int4> x, RValue<Int4> y);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1710 | RValue<Int> Extract(RValue<Int4> x, int i);
|
| 1711 | RValue<Int4> Insert(RValue<Int4> val, RValue<Int> element, int i);
|
| 1712 | RValue<Int> SignMask(RValue<Int4> x);
|
| 1713 | RValue<Int4> Swizzle(RValue<Int4> x, unsigned char select);
|
| 1714 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1715 | class UInt4 : public Variable<UInt4>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1716 | {
|
| 1717 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1718 | explicit UInt4(RValue<Float4> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1719 |
|
| 1720 | UInt4();
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1721 | UInt4(int xyzw);
|
| 1722 | UInt4(int x, int yzw);
|
| 1723 | UInt4(int x, int y, int zw);
|
| 1724 | UInt4(int x, int y, int z, int w);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1725 | UInt4(unsigned int x, unsigned int y, unsigned int z, unsigned int w);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1726 | UInt4(RValue<UInt4> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1727 | UInt4(const UInt4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1728 | UInt4(const Reference<UInt4> &rhs);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1729 | UInt4(RValue<Int4> rhs);
|
| 1730 | UInt4(const Int4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1731 | UInt4(const Reference<Int4> &rhs);
|
Nicolas Capens | 62abb55 | 2016-01-05 12:03:47 -0500 | [diff] [blame] | 1732 | UInt4(RValue<UInt2> lo, RValue<UInt2> hi);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1733 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1734 | RValue<UInt4> operator=(RValue<UInt4> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1735 | RValue<UInt4> operator=(const UInt4 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1736 | RValue<UInt4> operator=(const Reference<UInt4> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1737 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1738 | static llvm::Type *getType();
|
| 1739 |
|
| 1740 | private:
|
| 1741 | void constant(int x, int y, int z, int w);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1742 | };
|
| 1743 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1744 | RValue<UInt4> operator+(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1745 | RValue<UInt4> operator-(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1746 | RValue<UInt4> operator*(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
Alexis Hetu | d9d27bb | 2015-08-18 15:22:15 -0400 | [diff] [blame] | 1747 | RValue<UInt4> operator/(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1748 | RValue<UInt4> operator%(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1749 | RValue<UInt4> operator&(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1750 | RValue<UInt4> operator|(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1751 | RValue<UInt4> operator^(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1752 | RValue<UInt4> operator<<(RValue<UInt4> lhs, unsigned char rhs);
|
| 1753 | RValue<UInt4> operator>>(RValue<UInt4> lhs, unsigned char rhs);
|
Alexis Hetu | d9d27bb | 2015-08-18 15:22:15 -0400 | [diff] [blame] | 1754 | RValue<UInt4> operator<<(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1755 | RValue<UInt4> operator>>(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1756 | RValue<UInt4> operator+=(const UInt4 &lhs, RValue<UInt4> rhs);
|
| 1757 | RValue<UInt4> operator-=(const UInt4 &lhs, RValue<UInt4> rhs);
|
| 1758 | RValue<UInt4> operator*=(const UInt4 &lhs, RValue<UInt4> rhs);
|
| 1759 | // RValue<UInt4> operator/=(const UInt4 &lhs, RValue<UInt4> rhs);
|
| 1760 | // RValue<UInt4> operator%=(const UInt4 &lhs, RValue<UInt4> rhs);
|
| 1761 | RValue<UInt4> operator&=(const UInt4 &lhs, RValue<UInt4> rhs);
|
| 1762 | RValue<UInt4> operator|=(const UInt4 &lhs, RValue<UInt4> rhs);
|
| 1763 | RValue<UInt4> operator^=(const UInt4 &lhs, RValue<UInt4> rhs);
|
| 1764 | RValue<UInt4> operator<<=(const UInt4 &lhs, unsigned char rhs);
|
| 1765 | RValue<UInt4> operator>>=(const UInt4 &lhs, unsigned char rhs);
|
| 1766 | RValue<UInt4> operator+(RValue<UInt4> val);
|
| 1767 | RValue<UInt4> operator-(RValue<UInt4> val);
|
| 1768 | RValue<UInt4> operator~(RValue<UInt4> val);
|
| 1769 | // RValue<UInt4> operator++(const UInt4 &val, int); // Post-increment
|
| 1770 | // const UInt4 &operator++(const UInt4 &val); // Pre-increment
|
| 1771 | // RValue<UInt4> operator--(const UInt4 &val, int); // Post-decrement
|
| 1772 | // const UInt4 &operator--(const UInt4 &val); // Pre-decrement
|
| 1773 | // RValue<Bool> operator<(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1774 | // RValue<Bool> operator<=(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1775 | // RValue<Bool> operator>(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1776 | // RValue<Bool> operator>=(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1777 | // RValue<Bool> operator!=(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1778 | // RValue<Bool> operator==(RValue<UInt4> lhs, RValue<UInt4> rhs);
|
| 1779 |
|
| 1780 | RValue<UInt4> CmpEQ(RValue<UInt4> x, RValue<UInt4> y);
|
| 1781 | RValue<UInt4> CmpLT(RValue<UInt4> x, RValue<UInt4> y);
|
| 1782 | RValue<UInt4> CmpLE(RValue<UInt4> x, RValue<UInt4> y);
|
| 1783 | RValue<UInt4> CmpNEQ(RValue<UInt4> x, RValue<UInt4> y);
|
| 1784 | RValue<UInt4> CmpNLT(RValue<UInt4> x, RValue<UInt4> y);
|
| 1785 | RValue<UInt4> CmpNLE(RValue<UInt4> x, RValue<UInt4> y);
|
| 1786 | RValue<UInt4> Max(RValue<UInt4> x, RValue<UInt4> y);
|
| 1787 | RValue<UInt4> Min(RValue<UInt4> x, RValue<UInt4> y);
|
| 1788 | // RValue<UInt4> RoundInt(RValue<Float4> cast);
|
| 1789 | RValue<UShort8> Pack(RValue<UInt4> x, RValue<UInt4> y);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1790 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1791 | template<int T>
|
| 1792 | class Swizzle2Float4
|
| 1793 | {
|
| 1794 | friend class Float4;
|
| 1795 |
|
| 1796 | public:
|
| 1797 | operator RValue<Float4>() const;
|
| 1798 |
|
| 1799 | private:
|
| 1800 | Float4 *parent;
|
| 1801 | };
|
| 1802 |
|
| 1803 | template<int T>
|
| 1804 | class SwizzleFloat4
|
| 1805 | {
|
| 1806 | public:
|
| 1807 | operator RValue<Float4>() const;
|
| 1808 |
|
| 1809 | private:
|
| 1810 | Float4 *parent;
|
| 1811 | };
|
| 1812 |
|
| 1813 | template<int T>
|
| 1814 | class SwizzleMaskFloat4
|
| 1815 | {
|
| 1816 | friend class Float4;
|
| 1817 |
|
| 1818 | public:
|
| 1819 | operator RValue<Float4>() const;
|
| 1820 |
|
| 1821 | RValue<Float4> operator=(RValue<Float4> rhs) const;
|
| 1822 | RValue<Float4> operator=(RValue<Float> rhs) const;
|
| 1823 |
|
| 1824 | private:
|
| 1825 | Float4 *parent;
|
| 1826 | };
|
| 1827 |
|
| 1828 | template<int T>
|
| 1829 | class SwizzleMask1Float4
|
| 1830 | {
|
| 1831 | public:
|
| 1832 | operator RValue<Float>() const;
|
| 1833 | operator RValue<Float4>() const;
|
| 1834 |
|
| 1835 | RValue<Float4> operator=(float x) const;
|
| 1836 | RValue<Float4> operator=(RValue<Float4> rhs) const;
|
| 1837 | RValue<Float4> operator=(RValue<Float> rhs) const;
|
| 1838 |
|
| 1839 | private:
|
| 1840 | Float4 *parent;
|
| 1841 | };
|
| 1842 |
|
| 1843 | template<int T>
|
| 1844 | class SwizzleMask2Float4
|
| 1845 | {
|
| 1846 | friend class Float4;
|
| 1847 |
|
| 1848 | public:
|
| 1849 | operator RValue<Float4>() const;
|
| 1850 |
|
| 1851 | RValue<Float4> operator=(RValue<Float4> rhs) const;
|
| 1852 |
|
| 1853 | private:
|
| 1854 | Float4 *parent;
|
| 1855 | };
|
| 1856 |
|
| 1857 | class Float : public Variable<Float>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1858 | {
|
| 1859 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1860 | explicit Float(RValue<Int> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1861 |
|
| 1862 | Float();
|
| 1863 | Float(float x);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1864 | Float(RValue<Float> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1865 | Float(const Float &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1866 | Float(const Reference<Float> &rhs);
|
| 1867 |
|
| 1868 | template<int T>
|
| 1869 | Float(const SwizzleMask1Float4<T> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1870 |
|
| 1871 | // RValue<Float> operator=(float rhs) const; // FIXME: Implement
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1872 | RValue<Float> operator=(RValue<Float> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1873 | RValue<Float> operator=(const Float &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1874 | RValue<Float> operator=(const Reference<Float> &rhs) const;
|
| 1875 |
|
| 1876 | template<int T>
|
| 1877 | RValue<Float> operator=(const SwizzleMask1Float4<T> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1878 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1879 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1880 | };
|
| 1881 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1882 | RValue<Float> operator+(RValue<Float> lhs, RValue<Float> rhs);
|
| 1883 | RValue<Float> operator-(RValue<Float> lhs, RValue<Float> rhs);
|
| 1884 | RValue<Float> operator*(RValue<Float> lhs, RValue<Float> rhs);
|
| 1885 | RValue<Float> operator/(RValue<Float> lhs, RValue<Float> rhs);
|
| 1886 | RValue<Float> operator+=(const Float &lhs, RValue<Float> rhs);
|
| 1887 | RValue<Float> operator-=(const Float &lhs, RValue<Float> rhs);
|
| 1888 | RValue<Float> operator*=(const Float &lhs, RValue<Float> rhs);
|
| 1889 | RValue<Float> operator/=(const Float &lhs, RValue<Float> rhs);
|
| 1890 | RValue<Float> operator+(RValue<Float> val);
|
| 1891 | RValue<Float> operator-(RValue<Float> val);
|
| 1892 | RValue<Bool> operator<(RValue<Float> lhs, RValue<Float> rhs);
|
| 1893 | RValue<Bool> operator<=(RValue<Float> lhs, RValue<Float> rhs);
|
| 1894 | RValue<Bool> operator>(RValue<Float> lhs, RValue<Float> rhs);
|
| 1895 | RValue<Bool> operator>=(RValue<Float> lhs, RValue<Float> rhs);
|
| 1896 | RValue<Bool> operator!=(RValue<Float> lhs, RValue<Float> rhs);
|
| 1897 | RValue<Bool> operator==(RValue<Float> lhs, RValue<Float> rhs);
|
| 1898 |
|
| 1899 | RValue<Float> Abs(RValue<Float> x);
|
| 1900 | RValue<Float> Max(RValue<Float> x, RValue<Float> y);
|
| 1901 | RValue<Float> Min(RValue<Float> x, RValue<Float> y);
|
Nicolas Capens | 05b3d66 | 2016-02-25 23:58:33 -0500 | [diff] [blame^] | 1902 | RValue<Float> Rcp_pp(RValue<Float> val, bool exactAtPow2 = false);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1903 | RValue<Float> RcpSqrt_pp(RValue<Float> val);
|
| 1904 | RValue<Float> Sqrt(RValue<Float> x);
|
| 1905 | RValue<Float> Round(RValue<Float> val);
|
| 1906 | RValue<Float> Trunc(RValue<Float> val);
|
| 1907 | RValue<Float> Frac(RValue<Float> val);
|
| 1908 | RValue<Float> Floor(RValue<Float> val);
|
| 1909 | RValue<Float> Ceil(RValue<Float> val);
|
| 1910 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1911 | class Float2 : public Variable<Float2>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1912 | {
|
| 1913 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1914 | // explicit Float2(RValue<Byte2> cast);
|
| 1915 | // explicit Float2(RValue<Short2> cast);
|
| 1916 | // explicit Float2(RValue<UShort2> cast);
|
| 1917 | // explicit Float2(RValue<Int2> cast);
|
| 1918 | // explicit Float2(RValue<UInt2> cast);
|
| 1919 | explicit Float2(RValue<Float4> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1920 |
|
| 1921 | // Float2();
|
| 1922 | // Float2(float x, float y);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1923 | // Float2(RValue<Float2> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1924 | // Float2(const Float2 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1925 | // Float2(const Reference<Float2> &rhs);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1926 | // Float2(RValue<Float> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1927 | // Float2(const Float &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1928 | // Float2(const Reference<Float> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1929 |
|
| 1930 | // template<int T>
|
| 1931 | // Float2(const SwizzleMask1Float4<T> &rhs);
|
| 1932 |
|
| 1933 | // RValue<Float2> operator=(float replicate) const;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1934 | // RValue<Float2> operator=(RValue<Float2> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1935 | // RValue<Float2> operator=(const Float2 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1936 | // RValue<Float2> operator=(const Reference<Float2> &rhs) const;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1937 | // RValue<Float2> operator=(RValue<Float> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1938 | // RValue<Float2> operator=(const Float &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1939 | // RValue<Float2> operator=(const Reference<Float> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1940 |
|
| 1941 | // template<int T>
|
| 1942 | // RValue<Float2> operator=(const SwizzleMask1Float4<T> &rhs);
|
| 1943 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1944 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1945 | };
|
| 1946 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 1947 | // RValue<Float2> operator+(RValue<Float2> lhs, RValue<Float2> rhs);
|
| 1948 | // RValue<Float2> operator-(RValue<Float2> lhs, RValue<Float2> rhs);
|
| 1949 | // RValue<Float2> operator*(RValue<Float2> lhs, RValue<Float2> rhs);
|
| 1950 | // RValue<Float2> operator/(RValue<Float2> lhs, RValue<Float2> rhs);
|
| 1951 | // RValue<Float2> operator%(RValue<Float2> lhs, RValue<Float2> rhs);
|
| 1952 | // RValue<Float2> operator+=(const Float2 &lhs, RValue<Float2> rhs);
|
| 1953 | // RValue<Float2> operator-=(const Float2 &lhs, RValue<Float2> rhs);
|
| 1954 | // RValue<Float2> operator*=(const Float2 &lhs, RValue<Float2> rhs);
|
| 1955 | // RValue<Float2> operator/=(const Float2 &lhs, RValue<Float2> rhs);
|
| 1956 | // RValue<Float2> operator%=(const Float2 &lhs, RValue<Float2> rhs);
|
| 1957 | // RValue<Float2> operator+(RValue<Float2> val);
|
| 1958 | // RValue<Float2> operator-(RValue<Float2> val);
|
| 1959 |
|
| 1960 | // RValue<Float2> Abs(RValue<Float2> x);
|
| 1961 | // RValue<Float2> Max(RValue<Float2> x, RValue<Float2> y);
|
| 1962 | // RValue<Float2> Min(RValue<Float2> x, RValue<Float2> y);
|
| 1963 | // RValue<Float2> Swizzle(RValue<Float2> x, unsigned char select);
|
| 1964 | // RValue<Float2> Mask(Float2 &lhs, RValue<Float2> rhs, unsigned char select);
|
| 1965 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1966 | class Float4 : public Variable<Float4>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1967 | {
|
| 1968 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1969 | explicit Float4(RValue<Byte4> cast);
|
| 1970 | explicit Float4(RValue<SByte4> cast);
|
| 1971 | explicit Float4(RValue<Short4> cast);
|
| 1972 | explicit Float4(RValue<UShort4> cast);
|
| 1973 | explicit Float4(RValue<Int4> cast);
|
| 1974 | explicit Float4(RValue<UInt4> cast);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1975 |
|
| 1976 | Float4();
|
| 1977 | Float4(float xyzw);
|
| 1978 | Float4(float x, float yzw);
|
| 1979 | Float4(float x, float y, float zw);
|
| 1980 | Float4(float x, float y, float z, float w);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1981 | Float4(RValue<Float4> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1982 | Float4(const Float4 &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1983 | Float4(const Reference<Float4> &rhs);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 1984 | Float4(RValue<Float> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1985 | Float4(const Float &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1986 | Float4(const Reference<Float> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1987 |
|
| 1988 | template<int T>
|
| 1989 | Float4(const SwizzleMask1Float4<T> &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1990 | template<int T>
|
| 1991 | Float4(const SwizzleFloat4<T> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 1992 | template<int X, int Y>
|
| 1993 | Float4(const Swizzle2Float4<X> &x, const Swizzle2Float4<Y> &y);
|
| 1994 | template<int X, int Y>
|
| 1995 | Float4(const SwizzleMask2Float4<X> &x, const Swizzle2Float4<Y> &y);
|
| 1996 | template<int X, int Y>
|
| 1997 | Float4(const Swizzle2Float4<X> &x, const SwizzleMask2Float4<Y> &y);
|
| 1998 | template<int X, int Y>
|
| 1999 | Float4(const SwizzleMask2Float4<X> &x, const SwizzleMask2Float4<Y> &y);
|
| 2000 |
|
| 2001 | RValue<Float4> operator=(float replicate) const;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2002 | RValue<Float4> operator=(RValue<Float4> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2003 | RValue<Float4> operator=(const Float4 &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2004 | RValue<Float4> operator=(const Reference<Float4> &rhs) const;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2005 | RValue<Float4> operator=(RValue<Float> rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2006 | RValue<Float4> operator=(const Float &rhs) const;
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2007 | RValue<Float4> operator=(const Reference<Float> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2008 |
|
| 2009 | template<int T>
|
| 2010 | RValue<Float4> operator=(const SwizzleMask1Float4<T> &rhs);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2011 | template<int T>
|
| 2012 | RValue<Float4> operator=(const SwizzleFloat4<T> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2013 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2014 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2015 |
|
| 2016 | union
|
| 2017 | {
|
| 2018 | SwizzleMask1Float4<0x00> x;
|
| 2019 | SwizzleMask1Float4<0x55> y;
|
| 2020 | SwizzleMask1Float4<0xAA> z;
|
| 2021 | SwizzleMask1Float4<0xFF> w;
|
| 2022 | Swizzle2Float4<0x00> xx;
|
| 2023 | Swizzle2Float4<0x01> yx;
|
| 2024 | Swizzle2Float4<0x02> zx;
|
| 2025 | Swizzle2Float4<0x03> wx;
|
| 2026 | SwizzleMask2Float4<0x54> xy;
|
| 2027 | Swizzle2Float4<0x55> yy;
|
| 2028 | Swizzle2Float4<0x56> zy;
|
| 2029 | Swizzle2Float4<0x57> wy;
|
| 2030 | SwizzleMask2Float4<0xA8> xz;
|
| 2031 | SwizzleMask2Float4<0xA9> yz;
|
| 2032 | Swizzle2Float4<0xAA> zz;
|
| 2033 | Swizzle2Float4<0xAB> wz;
|
| 2034 | SwizzleMask2Float4<0xFC> xw;
|
| 2035 | SwizzleMask2Float4<0xFD> yw;
|
| 2036 | SwizzleMask2Float4<0xFE> zw;
|
| 2037 | Swizzle2Float4<0xFF> ww;
|
| 2038 | SwizzleFloat4<0x00> xxx;
|
| 2039 | SwizzleFloat4<0x01> yxx;
|
| 2040 | SwizzleFloat4<0x02> zxx;
|
| 2041 | SwizzleFloat4<0x03> wxx;
|
| 2042 | SwizzleFloat4<0x04> xyx;
|
| 2043 | SwizzleFloat4<0x05> yyx;
|
| 2044 | SwizzleFloat4<0x06> zyx;
|
| 2045 | SwizzleFloat4<0x07> wyx;
|
| 2046 | SwizzleFloat4<0x08> xzx;
|
| 2047 | SwizzleFloat4<0x09> yzx;
|
| 2048 | SwizzleFloat4<0x0A> zzx;
|
| 2049 | SwizzleFloat4<0x0B> wzx;
|
| 2050 | SwizzleFloat4<0x0C> xwx;
|
| 2051 | SwizzleFloat4<0x0D> ywx;
|
| 2052 | SwizzleFloat4<0x0E> zwx;
|
| 2053 | SwizzleFloat4<0x0F> wwx;
|
| 2054 | SwizzleFloat4<0x50> xxy;
|
| 2055 | SwizzleFloat4<0x51> yxy;
|
| 2056 | SwizzleFloat4<0x52> zxy;
|
| 2057 | SwizzleFloat4<0x53> wxy;
|
| 2058 | SwizzleFloat4<0x54> xyy;
|
| 2059 | SwizzleFloat4<0x55> yyy;
|
| 2060 | SwizzleFloat4<0x56> zyy;
|
| 2061 | SwizzleFloat4<0x57> wyy;
|
| 2062 | SwizzleFloat4<0x58> xzy;
|
| 2063 | SwizzleFloat4<0x59> yzy;
|
| 2064 | SwizzleFloat4<0x5A> zzy;
|
| 2065 | SwizzleFloat4<0x5B> wzy;
|
| 2066 | SwizzleFloat4<0x5C> xwy;
|
| 2067 | SwizzleFloat4<0x5D> ywy;
|
| 2068 | SwizzleFloat4<0x5E> zwy;
|
| 2069 | SwizzleFloat4<0x5F> wwy;
|
| 2070 | SwizzleFloat4<0xA0> xxz;
|
| 2071 | SwizzleFloat4<0xA1> yxz;
|
| 2072 | SwizzleFloat4<0xA2> zxz;
|
| 2073 | SwizzleFloat4<0xA3> wxz;
|
| 2074 | SwizzleMaskFloat4<0xA4> xyz;
|
| 2075 | SwizzleFloat4<0xA5> yyz;
|
| 2076 | SwizzleFloat4<0xA6> zyz;
|
| 2077 | SwizzleFloat4<0xA7> wyz;
|
| 2078 | SwizzleFloat4<0xA8> xzz;
|
| 2079 | SwizzleFloat4<0xA9> yzz;
|
| 2080 | SwizzleFloat4<0xAA> zzz;
|
| 2081 | SwizzleFloat4<0xAB> wzz;
|
| 2082 | SwizzleFloat4<0xAC> xwz;
|
| 2083 | SwizzleFloat4<0xAD> ywz;
|
| 2084 | SwizzleFloat4<0xAE> zwz;
|
| 2085 | SwizzleFloat4<0xAF> wwz;
|
| 2086 | SwizzleFloat4<0xF0> xxw;
|
| 2087 | SwizzleFloat4<0xF1> yxw;
|
| 2088 | SwizzleFloat4<0xF2> zxw;
|
| 2089 | SwizzleFloat4<0xF3> wxw;
|
| 2090 | SwizzleMaskFloat4<0xF4> xyw;
|
| 2091 | SwizzleFloat4<0xF5> yyw;
|
| 2092 | SwizzleFloat4<0xF6> zyw;
|
| 2093 | SwizzleFloat4<0xF7> wyw;
|
| 2094 | SwizzleMaskFloat4<0xF8> xzw;
|
| 2095 | SwizzleMaskFloat4<0xF9> yzw;
|
| 2096 | SwizzleFloat4<0xFA> zzw;
|
| 2097 | SwizzleFloat4<0xFB> wzw;
|
| 2098 | SwizzleFloat4<0xFC> xww;
|
| 2099 | SwizzleFloat4<0xFD> yww;
|
| 2100 | SwizzleFloat4<0xFE> zww;
|
| 2101 | SwizzleFloat4<0xFF> www;
|
| 2102 | SwizzleFloat4<0x00> xxxx;
|
| 2103 | SwizzleFloat4<0x01> yxxx;
|
| 2104 | SwizzleFloat4<0x02> zxxx;
|
| 2105 | SwizzleFloat4<0x03> wxxx;
|
| 2106 | SwizzleFloat4<0x04> xyxx;
|
| 2107 | SwizzleFloat4<0x05> yyxx;
|
| 2108 | SwizzleFloat4<0x06> zyxx;
|
| 2109 | SwizzleFloat4<0x07> wyxx;
|
| 2110 | SwizzleFloat4<0x08> xzxx;
|
| 2111 | SwizzleFloat4<0x09> yzxx;
|
| 2112 | SwizzleFloat4<0x0A> zzxx;
|
| 2113 | SwizzleFloat4<0x0B> wzxx;
|
| 2114 | SwizzleFloat4<0x0C> xwxx;
|
| 2115 | SwizzleFloat4<0x0D> ywxx;
|
| 2116 | SwizzleFloat4<0x0E> zwxx;
|
| 2117 | SwizzleFloat4<0x0F> wwxx;
|
| 2118 | SwizzleFloat4<0x10> xxyx;
|
| 2119 | SwizzleFloat4<0x11> yxyx;
|
| 2120 | SwizzleFloat4<0x12> zxyx;
|
| 2121 | SwizzleFloat4<0x13> wxyx;
|
| 2122 | SwizzleFloat4<0x14> xyyx;
|
| 2123 | SwizzleFloat4<0x15> yyyx;
|
| 2124 | SwizzleFloat4<0x16> zyyx;
|
| 2125 | SwizzleFloat4<0x17> wyyx;
|
| 2126 | SwizzleFloat4<0x18> xzyx;
|
| 2127 | SwizzleFloat4<0x19> yzyx;
|
| 2128 | SwizzleFloat4<0x1A> zzyx;
|
| 2129 | SwizzleFloat4<0x1B> wzyx;
|
| 2130 | SwizzleFloat4<0x1C> xwyx;
|
| 2131 | SwizzleFloat4<0x1D> ywyx;
|
| 2132 | SwizzleFloat4<0x1E> zwyx;
|
| 2133 | SwizzleFloat4<0x1F> wwyx;
|
| 2134 | SwizzleFloat4<0x20> xxzx;
|
| 2135 | SwizzleFloat4<0x21> yxzx;
|
| 2136 | SwizzleFloat4<0x22> zxzx;
|
| 2137 | SwizzleFloat4<0x23> wxzx;
|
| 2138 | SwizzleFloat4<0x24> xyzx;
|
| 2139 | SwizzleFloat4<0x25> yyzx;
|
| 2140 | SwizzleFloat4<0x26> zyzx;
|
| 2141 | SwizzleFloat4<0x27> wyzx;
|
| 2142 | SwizzleFloat4<0x28> xzzx;
|
| 2143 | SwizzleFloat4<0x29> yzzx;
|
| 2144 | SwizzleFloat4<0x2A> zzzx;
|
| 2145 | SwizzleFloat4<0x2B> wzzx;
|
| 2146 | SwizzleFloat4<0x2C> xwzx;
|
| 2147 | SwizzleFloat4<0x2D> ywzx;
|
| 2148 | SwizzleFloat4<0x2E> zwzx;
|
| 2149 | SwizzleFloat4<0x2F> wwzx;
|
| 2150 | SwizzleFloat4<0x30> xxwx;
|
| 2151 | SwizzleFloat4<0x31> yxwx;
|
| 2152 | SwizzleFloat4<0x32> zxwx;
|
| 2153 | SwizzleFloat4<0x33> wxwx;
|
| 2154 | SwizzleFloat4<0x34> xywx;
|
| 2155 | SwizzleFloat4<0x35> yywx;
|
| 2156 | SwizzleFloat4<0x36> zywx;
|
| 2157 | SwizzleFloat4<0x37> wywx;
|
| 2158 | SwizzleFloat4<0x38> xzwx;
|
| 2159 | SwizzleFloat4<0x39> yzwx;
|
| 2160 | SwizzleFloat4<0x3A> zzwx;
|
| 2161 | SwizzleFloat4<0x3B> wzwx;
|
| 2162 | SwizzleFloat4<0x3C> xwwx;
|
| 2163 | SwizzleFloat4<0x3D> ywwx;
|
| 2164 | SwizzleFloat4<0x3E> zwwx;
|
| 2165 | SwizzleFloat4<0x3F> wwwx;
|
| 2166 | SwizzleFloat4<0x40> xxxy;
|
| 2167 | SwizzleFloat4<0x41> yxxy;
|
| 2168 | SwizzleFloat4<0x42> zxxy;
|
| 2169 | SwizzleFloat4<0x43> wxxy;
|
| 2170 | SwizzleFloat4<0x44> xyxy;
|
| 2171 | SwizzleFloat4<0x45> yyxy;
|
| 2172 | SwizzleFloat4<0x46> zyxy;
|
| 2173 | SwizzleFloat4<0x47> wyxy;
|
| 2174 | SwizzleFloat4<0x48> xzxy;
|
| 2175 | SwizzleFloat4<0x49> yzxy;
|
| 2176 | SwizzleFloat4<0x4A> zzxy;
|
| 2177 | SwizzleFloat4<0x4B> wzxy;
|
| 2178 | SwizzleFloat4<0x4C> xwxy;
|
| 2179 | SwizzleFloat4<0x4D> ywxy;
|
| 2180 | SwizzleFloat4<0x4E> zwxy;
|
| 2181 | SwizzleFloat4<0x4F> wwxy;
|
| 2182 | SwizzleFloat4<0x50> xxyy;
|
| 2183 | SwizzleFloat4<0x51> yxyy;
|
| 2184 | SwizzleFloat4<0x52> zxyy;
|
| 2185 | SwizzleFloat4<0x53> wxyy;
|
| 2186 | SwizzleFloat4<0x54> xyyy;
|
| 2187 | SwizzleFloat4<0x55> yyyy;
|
| 2188 | SwizzleFloat4<0x56> zyyy;
|
| 2189 | SwizzleFloat4<0x57> wyyy;
|
| 2190 | SwizzleFloat4<0x58> xzyy;
|
| 2191 | SwizzleFloat4<0x59> yzyy;
|
| 2192 | SwizzleFloat4<0x5A> zzyy;
|
| 2193 | SwizzleFloat4<0x5B> wzyy;
|
| 2194 | SwizzleFloat4<0x5C> xwyy;
|
| 2195 | SwizzleFloat4<0x5D> ywyy;
|
| 2196 | SwizzleFloat4<0x5E> zwyy;
|
| 2197 | SwizzleFloat4<0x5F> wwyy;
|
| 2198 | SwizzleFloat4<0x60> xxzy;
|
| 2199 | SwizzleFloat4<0x61> yxzy;
|
| 2200 | SwizzleFloat4<0x62> zxzy;
|
| 2201 | SwizzleFloat4<0x63> wxzy;
|
| 2202 | SwizzleFloat4<0x64> xyzy;
|
| 2203 | SwizzleFloat4<0x65> yyzy;
|
| 2204 | SwizzleFloat4<0x66> zyzy;
|
| 2205 | SwizzleFloat4<0x67> wyzy;
|
| 2206 | SwizzleFloat4<0x68> xzzy;
|
| 2207 | SwizzleFloat4<0x69> yzzy;
|
| 2208 | SwizzleFloat4<0x6A> zzzy;
|
| 2209 | SwizzleFloat4<0x6B> wzzy;
|
| 2210 | SwizzleFloat4<0x6C> xwzy;
|
| 2211 | SwizzleFloat4<0x6D> ywzy;
|
| 2212 | SwizzleFloat4<0x6E> zwzy;
|
| 2213 | SwizzleFloat4<0x6F> wwzy;
|
| 2214 | SwizzleFloat4<0x70> xxwy;
|
| 2215 | SwizzleFloat4<0x71> yxwy;
|
| 2216 | SwizzleFloat4<0x72> zxwy;
|
| 2217 | SwizzleFloat4<0x73> wxwy;
|
| 2218 | SwizzleFloat4<0x74> xywy;
|
| 2219 | SwizzleFloat4<0x75> yywy;
|
| 2220 | SwizzleFloat4<0x76> zywy;
|
| 2221 | SwizzleFloat4<0x77> wywy;
|
| 2222 | SwizzleFloat4<0x78> xzwy;
|
| 2223 | SwizzleFloat4<0x79> yzwy;
|
| 2224 | SwizzleFloat4<0x7A> zzwy;
|
| 2225 | SwizzleFloat4<0x7B> wzwy;
|
| 2226 | SwizzleFloat4<0x7C> xwwy;
|
| 2227 | SwizzleFloat4<0x7D> ywwy;
|
| 2228 | SwizzleFloat4<0x7E> zwwy;
|
| 2229 | SwizzleFloat4<0x7F> wwwy;
|
| 2230 | SwizzleFloat4<0x80> xxxz;
|
| 2231 | SwizzleFloat4<0x81> yxxz;
|
| 2232 | SwizzleFloat4<0x82> zxxz;
|
| 2233 | SwizzleFloat4<0x83> wxxz;
|
| 2234 | SwizzleFloat4<0x84> xyxz;
|
| 2235 | SwizzleFloat4<0x85> yyxz;
|
| 2236 | SwizzleFloat4<0x86> zyxz;
|
| 2237 | SwizzleFloat4<0x87> wyxz;
|
| 2238 | SwizzleFloat4<0x88> xzxz;
|
| 2239 | SwizzleFloat4<0x89> yzxz;
|
| 2240 | SwizzleFloat4<0x8A> zzxz;
|
| 2241 | SwizzleFloat4<0x8B> wzxz;
|
| 2242 | SwizzleFloat4<0x8C> xwxz;
|
| 2243 | SwizzleFloat4<0x8D> ywxz;
|
| 2244 | SwizzleFloat4<0x8E> zwxz;
|
| 2245 | SwizzleFloat4<0x8F> wwxz;
|
| 2246 | SwizzleFloat4<0x90> xxyz;
|
| 2247 | SwizzleFloat4<0x91> yxyz;
|
| 2248 | SwizzleFloat4<0x92> zxyz;
|
| 2249 | SwizzleFloat4<0x93> wxyz;
|
| 2250 | SwizzleFloat4<0x94> xyyz;
|
| 2251 | SwizzleFloat4<0x95> yyyz;
|
| 2252 | SwizzleFloat4<0x96> zyyz;
|
| 2253 | SwizzleFloat4<0x97> wyyz;
|
| 2254 | SwizzleFloat4<0x98> xzyz;
|
| 2255 | SwizzleFloat4<0x99> yzyz;
|
| 2256 | SwizzleFloat4<0x9A> zzyz;
|
| 2257 | SwizzleFloat4<0x9B> wzyz;
|
| 2258 | SwizzleFloat4<0x9C> xwyz;
|
| 2259 | SwizzleFloat4<0x9D> ywyz;
|
| 2260 | SwizzleFloat4<0x9E> zwyz;
|
| 2261 | SwizzleFloat4<0x9F> wwyz;
|
| 2262 | SwizzleFloat4<0xA0> xxzz;
|
| 2263 | SwizzleFloat4<0xA1> yxzz;
|
| 2264 | SwizzleFloat4<0xA2> zxzz;
|
| 2265 | SwizzleFloat4<0xA3> wxzz;
|
| 2266 | SwizzleFloat4<0xA4> xyzz;
|
| 2267 | SwizzleFloat4<0xA5> yyzz;
|
| 2268 | SwizzleFloat4<0xA6> zyzz;
|
| 2269 | SwizzleFloat4<0xA7> wyzz;
|
| 2270 | SwizzleFloat4<0xA8> xzzz;
|
| 2271 | SwizzleFloat4<0xA9> yzzz;
|
| 2272 | SwizzleFloat4<0xAA> zzzz;
|
| 2273 | SwizzleFloat4<0xAB> wzzz;
|
| 2274 | SwizzleFloat4<0xAC> xwzz;
|
| 2275 | SwizzleFloat4<0xAD> ywzz;
|
| 2276 | SwizzleFloat4<0xAE> zwzz;
|
| 2277 | SwizzleFloat4<0xAF> wwzz;
|
| 2278 | SwizzleFloat4<0xB0> xxwz;
|
| 2279 | SwizzleFloat4<0xB1> yxwz;
|
| 2280 | SwizzleFloat4<0xB2> zxwz;
|
| 2281 | SwizzleFloat4<0xB3> wxwz;
|
| 2282 | SwizzleFloat4<0xB4> xywz;
|
| 2283 | SwizzleFloat4<0xB5> yywz;
|
| 2284 | SwizzleFloat4<0xB6> zywz;
|
| 2285 | SwizzleFloat4<0xB7> wywz;
|
| 2286 | SwizzleFloat4<0xB8> xzwz;
|
| 2287 | SwizzleFloat4<0xB9> yzwz;
|
| 2288 | SwizzleFloat4<0xBA> zzwz;
|
| 2289 | SwizzleFloat4<0xBB> wzwz;
|
| 2290 | SwizzleFloat4<0xBC> xwwz;
|
| 2291 | SwizzleFloat4<0xBD> ywwz;
|
| 2292 | SwizzleFloat4<0xBE> zwwz;
|
| 2293 | SwizzleFloat4<0xBF> wwwz;
|
| 2294 | SwizzleFloat4<0xC0> xxxw;
|
| 2295 | SwizzleFloat4<0xC1> yxxw;
|
| 2296 | SwizzleFloat4<0xC2> zxxw;
|
| 2297 | SwizzleFloat4<0xC3> wxxw;
|
| 2298 | SwizzleFloat4<0xC4> xyxw;
|
| 2299 | SwizzleFloat4<0xC5> yyxw;
|
| 2300 | SwizzleFloat4<0xC6> zyxw;
|
| 2301 | SwizzleFloat4<0xC7> wyxw;
|
| 2302 | SwizzleFloat4<0xC8> xzxw;
|
| 2303 | SwizzleFloat4<0xC9> yzxw;
|
| 2304 | SwizzleFloat4<0xCA> zzxw;
|
| 2305 | SwizzleFloat4<0xCB> wzxw;
|
| 2306 | SwizzleFloat4<0xCC> xwxw;
|
| 2307 | SwizzleFloat4<0xCD> ywxw;
|
| 2308 | SwizzleFloat4<0xCE> zwxw;
|
| 2309 | SwizzleFloat4<0xCF> wwxw;
|
| 2310 | SwizzleFloat4<0xD0> xxyw;
|
| 2311 | SwizzleFloat4<0xD1> yxyw;
|
| 2312 | SwizzleFloat4<0xD2> zxyw;
|
| 2313 | SwizzleFloat4<0xD3> wxyw;
|
| 2314 | SwizzleFloat4<0xD4> xyyw;
|
| 2315 | SwizzleFloat4<0xD5> yyyw;
|
| 2316 | SwizzleFloat4<0xD6> zyyw;
|
| 2317 | SwizzleFloat4<0xD7> wyyw;
|
| 2318 | SwizzleFloat4<0xD8> xzyw;
|
| 2319 | SwizzleFloat4<0xD9> yzyw;
|
| 2320 | SwizzleFloat4<0xDA> zzyw;
|
| 2321 | SwizzleFloat4<0xDB> wzyw;
|
| 2322 | SwizzleFloat4<0xDC> xwyw;
|
| 2323 | SwizzleFloat4<0xDD> ywyw;
|
| 2324 | SwizzleFloat4<0xDE> zwyw;
|
| 2325 | SwizzleFloat4<0xDF> wwyw;
|
| 2326 | SwizzleFloat4<0xE0> xxzw;
|
| 2327 | SwizzleFloat4<0xE1> yxzw;
|
| 2328 | SwizzleFloat4<0xE2> zxzw;
|
| 2329 | SwizzleFloat4<0xE3> wxzw;
|
| 2330 | SwizzleMaskFloat4<0xE4> xyzw;
|
| 2331 | SwizzleFloat4<0xE5> yyzw;
|
| 2332 | SwizzleFloat4<0xE6> zyzw;
|
| 2333 | SwizzleFloat4<0xE7> wyzw;
|
| 2334 | SwizzleFloat4<0xE8> xzzw;
|
| 2335 | SwizzleFloat4<0xE9> yzzw;
|
| 2336 | SwizzleFloat4<0xEA> zzzw;
|
| 2337 | SwizzleFloat4<0xEB> wzzw;
|
| 2338 | SwizzleFloat4<0xEC> xwzw;
|
| 2339 | SwizzleFloat4<0xED> ywzw;
|
| 2340 | SwizzleFloat4<0xEE> zwzw;
|
| 2341 | SwizzleFloat4<0xEF> wwzw;
|
| 2342 | SwizzleFloat4<0xF0> xxww;
|
| 2343 | SwizzleFloat4<0xF1> yxww;
|
| 2344 | SwizzleFloat4<0xF2> zxww;
|
| 2345 | SwizzleFloat4<0xF3> wxww;
|
| 2346 | SwizzleFloat4<0xF4> xyww;
|
| 2347 | SwizzleFloat4<0xF5> yyww;
|
| 2348 | SwizzleFloat4<0xF6> zyww;
|
| 2349 | SwizzleFloat4<0xF7> wyww;
|
| 2350 | SwizzleFloat4<0xF8> xzww;
|
| 2351 | SwizzleFloat4<0xF9> yzww;
|
| 2352 | SwizzleFloat4<0xFA> zzww;
|
| 2353 | SwizzleFloat4<0xFB> wzww;
|
| 2354 | SwizzleFloat4<0xFC> xwww;
|
| 2355 | SwizzleFloat4<0xFD> ywww;
|
| 2356 | SwizzleFloat4<0xFE> zwww;
|
| 2357 | SwizzleFloat4<0xFF> wwww;
|
| 2358 | };
|
| 2359 |
|
| 2360 | private:
|
| 2361 | void constant(float x, float y, float z, float w);
|
| 2362 | };
|
| 2363 |
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 2364 | RValue<Float4> operator+(RValue<Float4> lhs, RValue<Float4> rhs);
|
| 2365 | RValue<Float4> operator-(RValue<Float4> lhs, RValue<Float4> rhs);
|
| 2366 | RValue<Float4> operator*(RValue<Float4> lhs, RValue<Float4> rhs);
|
| 2367 | RValue<Float4> operator/(RValue<Float4> lhs, RValue<Float4> rhs);
|
| 2368 | RValue<Float4> operator%(RValue<Float4> lhs, RValue<Float4> rhs);
|
| 2369 | RValue<Float4> operator+=(const Float4 &lhs, RValue<Float4> rhs);
|
| 2370 | RValue<Float4> operator-=(const Float4 &lhs, RValue<Float4> rhs);
|
| 2371 | RValue<Float4> operator*=(const Float4 &lhs, RValue<Float4> rhs);
|
| 2372 | RValue<Float4> operator/=(const Float4 &lhs, RValue<Float4> rhs);
|
| 2373 | RValue<Float4> operator%=(const Float4 &lhs, RValue<Float4> rhs);
|
| 2374 | RValue<Float4> operator+(RValue<Float4> val);
|
| 2375 | RValue<Float4> operator-(RValue<Float4> val);
|
| 2376 |
|
| 2377 | RValue<Float4> Abs(RValue<Float4> x);
|
| 2378 | RValue<Float4> Max(RValue<Float4> x, RValue<Float4> y);
|
| 2379 | RValue<Float4> Min(RValue<Float4> x, RValue<Float4> y);
|
Nicolas Capens | 05b3d66 | 2016-02-25 23:58:33 -0500 | [diff] [blame^] | 2380 | RValue<Float4> Rcp_pp(RValue<Float4> val, bool exactAtPow2 = false);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 2381 | RValue<Float4> RcpSqrt_pp(RValue<Float4> val);
|
| 2382 | RValue<Float4> Sqrt(RValue<Float4> x);
|
| 2383 | RValue<Float4> Insert(const Float4 &val, RValue<Float> element, int i);
|
| 2384 | RValue<Float> Extract(RValue<Float4> x, int i);
|
| 2385 | RValue<Float4> Swizzle(RValue<Float4> x, unsigned char select);
|
| 2386 | RValue<Float4> ShuffleLowHigh(RValue<Float4> x, RValue<Float4> y, unsigned char imm);
|
| 2387 | RValue<Float4> UnpackLow(RValue<Float4> x, RValue<Float4> y);
|
| 2388 | RValue<Float4> UnpackHigh(RValue<Float4> x, RValue<Float4> y);
|
| 2389 | RValue<Float4> Mask(Float4 &lhs, RValue<Float4> rhs, unsigned char select);
|
| 2390 | RValue<Int> SignMask(RValue<Float4> x);
|
| 2391 | RValue<Int4> CmpEQ(RValue<Float4> x, RValue<Float4> y);
|
| 2392 | RValue<Int4> CmpLT(RValue<Float4> x, RValue<Float4> y);
|
| 2393 | RValue<Int4> CmpLE(RValue<Float4> x, RValue<Float4> y);
|
| 2394 | RValue<Int4> CmpNEQ(RValue<Float4> x, RValue<Float4> y);
|
| 2395 | RValue<Int4> CmpNLT(RValue<Float4> x, RValue<Float4> y);
|
| 2396 | RValue<Int4> CmpNLE(RValue<Float4> x, RValue<Float4> y);
|
| 2397 | RValue<Float4> Round(RValue<Float4> x);
|
| 2398 | RValue<Float4> Trunc(RValue<Float4> x);
|
| 2399 | RValue<Float4> Frac(RValue<Float4> x);
|
| 2400 | RValue<Float4> Floor(RValue<Float4> x);
|
| 2401 | RValue<Float4> Ceil(RValue<Float4> x);
|
| 2402 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2403 | template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2404 | class Pointer : public Variable<Pointer<T>>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2405 | {
|
| 2406 | public:
|
| 2407 | template<class S>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2408 | Pointer(RValue<Pointer<S>> pointerS, int alignment = 1) : alignment(alignment)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2409 | {
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2410 | llvm::Value *pointerT = Nucleus::createBitCast(pointerS.value, Nucleus::getPointerType(T::getType()));
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2411 | LValue::storeValue(pointerT);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2412 | }
|
| 2413 |
|
| 2414 | template<class S>
|
| 2415 | Pointer(const Pointer<S> &pointer, int alignment = 1) : alignment(alignment)
|
| 2416 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2417 | llvm::Value *pointerS = pointer.loadValue(alignment);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2418 | llvm::Value *pointerT = Nucleus::createBitCast(pointerS, Nucleus::getPointerType(T::getType()));
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2419 | LValue::storeValue(pointerT);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2420 | }
|
| 2421 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2422 | Pointer(Argument<Pointer<T>> argument);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2423 | explicit Pointer(const void *external);
|
| 2424 |
|
| 2425 | Pointer();
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2426 | Pointer(RValue<Pointer<T>> rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2427 | Pointer(const Pointer<T> &rhs);
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2428 | Pointer(const Reference<Pointer<T>> &rhs);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2429 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2430 | RValue<Pointer<T>> operator=(RValue<Pointer<T>> rhs) const;
|
| 2431 | RValue<Pointer<T>> operator=(const Pointer<T> &rhs) const;
|
| 2432 | RValue<Pointer<T>> operator=(const Reference<Pointer<T>> &rhs) const;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2433 |
|
| 2434 | Reference<T> operator*();
|
| 2435 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2436 | static llvm::Type *getType();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2437 |
|
| 2438 | private:
|
| 2439 | const int alignment;
|
| 2440 | };
|
| 2441 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2442 | RValue<Pointer<Byte>> operator+(RValue<Pointer<Byte>> lhs, int offset);
|
| 2443 | RValue<Pointer<Byte>> operator+(RValue<Pointer<Byte>> lhs, RValue<Int> offset);
|
| 2444 | RValue<Pointer<Byte>> operator+(RValue<Pointer<Byte>> lhs, RValue<UInt> offset);
|
| 2445 | RValue<Pointer<Byte>> operator+=(const Pointer<Byte> &lhs, int offset);
|
| 2446 | RValue<Pointer<Byte>> operator+=(const Pointer<Byte> &lhs, RValue<Int> offset);
|
| 2447 | RValue<Pointer<Byte>> operator+=(const Pointer<Byte> &lhs, RValue<UInt> offset);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 2448 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2449 | RValue<Pointer<Byte>> operator-(RValue<Pointer<Byte>> lhs, int offset);
|
| 2450 | RValue<Pointer<Byte>> operator-(RValue<Pointer<Byte>> lhs, RValue<Int> offset);
|
| 2451 | RValue<Pointer<Byte>> operator-(RValue<Pointer<Byte>> lhs, RValue<UInt> offset);
|
| 2452 | RValue<Pointer<Byte>> operator-=(const Pointer<Byte> &lhs, int offset);
|
| 2453 | RValue<Pointer<Byte>> operator-=(const Pointer<Byte> &lhs, RValue<Int> offset);
|
| 2454 | RValue<Pointer<Byte>> operator-=(const Pointer<Byte> &lhs, RValue<UInt> offset);
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 2455 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2456 | template<class T, int S = 1>
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2457 | class Array : public Variable<T>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2458 | {
|
| 2459 | public:
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2460 | Array(int size = S);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2461 |
|
| 2462 | Reference<T> operator[](int index);
|
| 2463 | Reference<T> operator[](RValue<Int> index);
|
| 2464 | Reference<T> operator[](RValue<UInt> index);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2465 | };
|
| 2466 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2467 | // RValue<Array<T>> operator++(const Array<T> &val, int); // Post-increment
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 2468 | // const Array<T> &operator++(const Array<T> &val); // Pre-increment
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2469 | // RValue<Array<T>> operator--(const Array<T> &val, int); // Post-decrement
|
Nicolas Capens | 08e90f0 | 2014-11-21 12:49:12 -0500 | [diff] [blame] | 2470 | // const Array<T> &operator--(const Array<T> &val); // Pre-decrement
|
| 2471 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2472 | llvm::BasicBlock *beginLoop();
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2473 | bool branch(RValue<Bool> cmp, llvm::BasicBlock *bodyBB, llvm::BasicBlock *endBB);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2474 | bool elseBlock(llvm::BasicBlock *falseBB);
|
| 2475 |
|
| 2476 | void Return();
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2477 | void Return(bool ret);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2478 | void Return(const Int &ret);
|
| 2479 |
|
| 2480 | template<class T>
|
| 2481 | void Return(const Pointer<T> &ret);
|
| 2482 |
|
| 2483 | template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2484 | void Return(RValue<Pointer<T>> ret);
|
| 2485 |
|
| 2486 | template<unsigned int index, typename... Arguments>
|
| 2487 | struct ArgI;
|
| 2488 |
|
| 2489 | template<typename Arg0, typename... Arguments>
|
| 2490 | struct ArgI<0, Arg0, Arguments...>
|
| 2491 | {
|
| 2492 | typedef Arg0 Type;
|
| 2493 | };
|
| 2494 |
|
| 2495 | template<unsigned int index, typename Arg0, typename... Arguments>
|
| 2496 | struct ArgI<index, Arg0, Arguments...>
|
| 2497 | {
|
| 2498 | typedef typename ArgI<index - 1, Arguments...>::Type Type;
|
| 2499 | };
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2500 |
|
Nicolas Capens | 2ab859f | 2015-02-05 12:36:46 -0500 | [diff] [blame] | 2501 | // Generic template, leave undefined!
|
| 2502 | template<typename FunctionType>
|
| 2503 | class Function;
|
| 2504 |
|
| 2505 | // Specialized for function types
|
| 2506 | template<typename Return, typename... Arguments>
|
| 2507 | class Function<Return(Arguments...)>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2508 | {
|
| 2509 | public:
|
| 2510 | Function();
|
| 2511 |
|
| 2512 | virtual ~Function();
|
| 2513 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2514 | template<int index>
|
| 2515 | Argument<typename ArgI<index, Arguments...>::Type> Arg() const
|
| 2516 | {
|
| 2517 | llvm::Value *arg = Nucleus::getArgument(function, index);
|
| 2518 | return Argument<typename ArgI<index, Arguments...>::Type>(arg);
|
| 2519 | }
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2520 |
|
| 2521 | Routine *operator()(const wchar_t *name, ...);
|
| 2522 |
|
| 2523 | private:
|
| 2524 | Nucleus *core;
|
| 2525 | llvm::Function *function;
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2526 | std::vector<llvm::Type*> arguments;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2527 | };
|
| 2528 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2529 | template<int index, typename Return, typename... Arguments>
|
| 2530 | Argument<typename ArgI<index, Arguments...>::Type> Arg(Function<Return(Arguments...)> &function)
|
| 2531 | {
|
| 2532 | return Argument<typename ArgI<index, Arguments...>::Type>(function.arg(index));
|
| 2533 | }
|
| 2534 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2535 | RValue<Long> Ticks();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2536 | }
|
| 2537 |
|
| 2538 | namespace sw
|
| 2539 | {
|
| 2540 | template<class T>
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2541 | Variable<T>::Variable(int arraySize) : LValue(T::getType(), arraySize)
|
| 2542 | {
|
| 2543 | }
|
| 2544 |
|
| 2545 | template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2546 | RValue<Pointer<T>> Variable<T>::operator&()
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2547 | {
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2548 | return RValue<Pointer<T>>(LValue::address);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2549 | }
|
| 2550 |
|
| 2551 | template<class T>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2552 | Reference<T>::Reference(llvm::Value *pointer, int alignment) : alignment(alignment)
|
| 2553 | {
|
| 2554 | address = pointer;
|
| 2555 | }
|
| 2556 |
|
| 2557 | template<class T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2558 | RValue<T> Reference<T>::operator=(RValue<T> rhs) const
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2559 | {
|
| 2560 | Nucleus::createStore(rhs.value, address, false, alignment);
|
| 2561 |
|
| 2562 | return rhs;
|
| 2563 | }
|
| 2564 |
|
| 2565 | template<class T>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2566 | RValue<T> Reference<T>::operator=(const Reference<T> &ref) const
|
| 2567 | {
|
| 2568 | llvm::Value *tmp = Nucleus::createLoad(ref.address, false, ref.alignment);
|
| 2569 | Nucleus::createStore(tmp, address, false, alignment);
|
| 2570 |
|
| 2571 | return RValue<T>(tmp);
|
| 2572 | }
|
| 2573 |
|
| 2574 | template<class T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2575 | RValue<T> Reference<T>::operator+=(RValue<T> rhs) const
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2576 | {
|
| 2577 | return *this = *this + rhs;
|
| 2578 | }
|
| 2579 |
|
| 2580 | template<class T>
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2581 | llvm::Value *Reference<T>::loadValue() const
|
| 2582 | {
|
| 2583 | return Nucleus::createLoad(address, false, alignment);
|
| 2584 | }
|
| 2585 |
|
| 2586 | template<class T>
|
| 2587 | int Reference<T>::getAlignment() const
|
| 2588 | {
|
| 2589 | return alignment;
|
| 2590 | }
|
| 2591 |
|
| 2592 | template<class T>
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2593 | RValue<T>::RValue(llvm::Value *rvalue)
|
| 2594 | {
|
| 2595 | value = rvalue;
|
| 2596 | }
|
| 2597 |
|
| 2598 | template<class T>
|
| 2599 | RValue<T>::RValue(const T &lvalue)
|
| 2600 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2601 | value = lvalue.loadValue();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2602 | }
|
| 2603 |
|
| 2604 | template<class T>
|
| 2605 | RValue<T>::RValue(typename IntLiteral<T>::type i)
|
| 2606 | {
|
| 2607 | value = (llvm::Value*)Nucleus::createConstantInt(i);
|
| 2608 | }
|
| 2609 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2610 | template<class T>
|
| 2611 | RValue<T>::RValue(typename FloatLiteral<T>::type f)
|
| 2612 | {
|
| 2613 | value = (llvm::Value*)Nucleus::createConstantFloat(f);
|
| 2614 | }
|
| 2615 |
|
| 2616 | template<class T>
|
| 2617 | RValue<T>::RValue(const Reference<T> &ref)
|
| 2618 | {
|
| 2619 | value = ref.loadValue();
|
| 2620 | }
|
| 2621 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2622 | template<int T>
|
| 2623 | Swizzle2Float4<T>::operator RValue<Float4>() const
|
| 2624 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2625 | llvm::Value *vector = parent->loadValue();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2626 |
|
| 2627 | return RValue<Float4>(Nucleus::createSwizzle(vector, T));
|
| 2628 | }
|
| 2629 |
|
| 2630 | template<int T>
|
| 2631 | SwizzleFloat4<T>::operator RValue<Float4>() const
|
| 2632 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2633 | llvm::Value *vector = parent->loadValue();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2634 |
|
| 2635 | return RValue<Float4>(Nucleus::createSwizzle(vector, T));
|
| 2636 | }
|
| 2637 |
|
| 2638 | template<int T>
|
| 2639 | SwizzleMaskFloat4<T>::operator RValue<Float4>() const
|
| 2640 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2641 | llvm::Value *vector = parent->loadValue();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2642 |
|
| 2643 | return RValue<Float4>(Nucleus::createSwizzle(vector, T));
|
| 2644 | }
|
| 2645 |
|
| 2646 | template<int T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2647 | RValue<Float4> SwizzleMaskFloat4<T>::operator=(RValue<Float4> rhs) const
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2648 | {
|
| 2649 | return Mask(*parent, rhs, T);
|
| 2650 | }
|
| 2651 |
|
| 2652 | template<int T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2653 | RValue<Float4> SwizzleMaskFloat4<T>::operator=(RValue<Float> rhs) const
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2654 | {
|
| 2655 | return Mask(*parent, Float4(rhs), T);
|
| 2656 | }
|
| 2657 |
|
| 2658 | template<int T>
|
| 2659 | SwizzleMask1Float4<T>::operator RValue<Float>() const // FIXME: Call a non-template function
|
| 2660 | {
|
| 2661 | return Extract(*parent, T & 0x3);
|
| 2662 | }
|
| 2663 |
|
| 2664 | template<int T>
|
| 2665 | SwizzleMask1Float4<T>::operator RValue<Float4>() const
|
| 2666 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2667 | llvm::Value *vector = parent->loadValue();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2668 |
|
| 2669 | return RValue<Float4>(Nucleus::createSwizzle(vector, T));
|
| 2670 | }
|
| 2671 |
|
| 2672 | template<int T>
|
| 2673 | RValue<Float4> SwizzleMask1Float4<T>::operator=(float x) const
|
| 2674 | {
|
| 2675 | return Insert(*parent, Float(x), T & 0x3);
|
| 2676 | }
|
| 2677 |
|
| 2678 | template<int T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2679 | RValue<Float4> SwizzleMask1Float4<T>::operator=(RValue<Float4> rhs) const
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2680 | {
|
| 2681 | return Mask(*parent, Float4(rhs), T);
|
| 2682 | }
|
| 2683 |
|
| 2684 | template<int T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2685 | RValue<Float4> SwizzleMask1Float4<T>::operator=(RValue<Float> rhs) const // FIXME: Call a non-template function
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2686 | {
|
| 2687 | return Insert(*parent, rhs, T & 0x3);
|
| 2688 | }
|
| 2689 |
|
| 2690 | template<int T>
|
| 2691 | SwizzleMask2Float4<T>::operator RValue<Float4>() const
|
| 2692 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2693 | llvm::Value *vector = parent->loadValue();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2694 |
|
| 2695 | return RValue<Float4>(Nucleus::createSwizzle(vector, T));
|
| 2696 | }
|
| 2697 |
|
| 2698 | template<int T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2699 | RValue<Float4> SwizzleMask2Float4<T>::operator=(RValue<Float4> rhs) const
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2700 | {
|
| 2701 | return Mask(*parent, Float4(rhs), T);
|
| 2702 | }
|
| 2703 |
|
| 2704 | template<int T>
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2705 | Float::Float(const SwizzleMask1Float4<T> &rhs)
|
| 2706 | {
|
| 2707 | *this = rhs.operator RValue<Float>();
|
| 2708 | }
|
| 2709 |
|
| 2710 | template<int T>
|
| 2711 | RValue<Float> Float::operator=(const SwizzleMask1Float4<T> &rhs) const
|
| 2712 | {
|
| 2713 | return *this = rhs.operator RValue<Float>();
|
| 2714 | }
|
| 2715 |
|
| 2716 | template<int T>
|
| 2717 | Float4::Float4(const SwizzleMask1Float4<T> &rhs)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2718 | {
|
| 2719 | xyzw.parent = this;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2720 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2721 | *this = rhs.operator RValue<Float4>();
|
| 2722 | }
|
| 2723 |
|
| 2724 | template<int T>
|
| 2725 | Float4::Float4(const SwizzleFloat4<T> &rhs)
|
| 2726 | {
|
| 2727 | xyzw.parent = this;
|
| 2728 |
|
| 2729 | *this = rhs.operator RValue<Float4>();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2730 | }
|
| 2731 |
|
| 2732 | template<int X, int Y>
|
| 2733 | Float4::Float4(const Swizzle2Float4<X> &x, const Swizzle2Float4<Y> &y)
|
| 2734 | {
|
| 2735 | xyzw.parent = this;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2736 |
|
| 2737 | *this = ShuffleLowHigh(*x.parent, *y.parent, (X & 0xF) | (Y & 0xF) << 4);
|
| 2738 | }
|
| 2739 |
|
| 2740 | template<int X, int Y>
|
| 2741 | Float4::Float4(const SwizzleMask2Float4<X> &x, const Swizzle2Float4<Y> &y)
|
| 2742 | {
|
| 2743 | xyzw.parent = this;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2744 |
|
| 2745 | *this = ShuffleLowHigh(*x.parent, *y.parent, (X & 0xF) | (Y & 0xF) << 4);
|
| 2746 | }
|
| 2747 |
|
| 2748 | template<int X, int Y>
|
| 2749 | Float4::Float4(const Swizzle2Float4<X> &x, const SwizzleMask2Float4<Y> &y)
|
| 2750 | {
|
| 2751 | xyzw.parent = this;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2752 |
|
| 2753 | *this = ShuffleLowHigh(*x.parent, *y.parent, (X & 0xF) | (Y & 0xF) << 4);
|
| 2754 | }
|
| 2755 |
|
| 2756 | template<int X, int Y>
|
| 2757 | Float4::Float4(const SwizzleMask2Float4<X> &x, const SwizzleMask2Float4<Y> &y)
|
| 2758 | {
|
| 2759 | xyzw.parent = this;
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2760 |
|
| 2761 | *this = ShuffleLowHigh(*x.parent, *y.parent, (X & 0xF) | (Y & 0xF) << 4);
|
| 2762 | }
|
| 2763 |
|
| 2764 | template<int T>
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2765 | RValue<Float4> Float4::operator=(const SwizzleMask1Float4<T> &rhs)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2766 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2767 | return *this = rhs.operator RValue<Float4>();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2768 | }
|
| 2769 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2770 | template<int T>
|
| 2771 | RValue<Float4> Float4::operator=(const SwizzleFloat4<T> &rhs)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2772 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2773 | return *this = rhs.operator RValue<Float4>();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2774 | }
|
| 2775 |
|
| 2776 | template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2777 | Pointer<T>::Pointer(Argument<Pointer<T>> argument) : alignment(1)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2778 | {
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2779 | LValue::storeValue(argument.value);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2780 | }
|
| 2781 |
|
| 2782 | template<class T>
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2783 | Pointer<T>::Pointer(const void *external) : alignment((intptr_t)external & 0x0000000F ? 1 : 16)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2784 | {
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2785 | const llvm::GlobalValue *globalPointer = Nucleus::getGlobalValueAtAddress(const_cast<void*>(external)); // FIXME: Const
|
| 2786 |
|
| 2787 | if(!globalPointer)
|
| 2788 | {
|
| 2789 | globalPointer = Nucleus::createGlobalValue(T::getType(), false, alignment);
|
| 2790 |
|
| 2791 | Nucleus::addGlobalMapping(globalPointer, const_cast<void*>(external)); // FIXME: Const
|
| 2792 | }
|
| 2793 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2794 | LValue::storeValue((llvm::Value*)globalPointer); // FIXME: Const
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2795 | }
|
| 2796 |
|
| 2797 | template<class T>
|
| 2798 | Pointer<T>::Pointer() : alignment(1)
|
| 2799 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2800 | LValue::storeValue(Nucleus::createNullPointer(T::getType()));
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2801 | }
|
| 2802 |
|
| 2803 | template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2804 | Pointer<T>::Pointer(RValue<Pointer<T>> rhs) : alignment(1)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2805 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2806 | LValue::storeValue(rhs.value);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2807 | }
|
| 2808 |
|
| 2809 | template<class T>
|
| 2810 | Pointer<T>::Pointer(const Pointer<T> &rhs) : alignment(rhs.alignment)
|
| 2811 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2812 | llvm::Value *value = rhs.loadValue();
|
| 2813 | LValue::storeValue(value);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2814 | }
|
| 2815 |
|
| 2816 | template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2817 | Pointer<T>::Pointer(const Reference<Pointer<T>> &rhs) : alignment(rhs.getAlignment())
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2818 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2819 | llvm::Value *value = rhs.loadValue();
|
| 2820 | LValue::storeValue(value);
|
| 2821 | }
|
| 2822 |
|
| 2823 | template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2824 | RValue<Pointer<T>> Pointer<T>::operator=(RValue<Pointer<T>> rhs) const
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2825 | {
|
| 2826 | LValue::storeValue(rhs.value);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2827 |
|
| 2828 | return rhs;
|
| 2829 | }
|
| 2830 |
|
| 2831 | template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2832 | RValue<Pointer<T>> Pointer<T>::operator=(const Pointer<T> &rhs) const
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2833 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2834 | llvm::Value *value = rhs.loadValue();
|
| 2835 | LValue::storeValue(value);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2836 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2837 | return RValue<Pointer<T>>(value);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2838 | }
|
| 2839 |
|
| 2840 | template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2841 | RValue<Pointer<T>> Pointer<T>::operator=(const Reference<Pointer<T>> &rhs) const
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2842 | {
|
| 2843 | llvm::Value *value = rhs.loadValue();
|
| 2844 | LValue::storeValue(value);
|
| 2845 |
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2846 | return RValue<Pointer<T>>(value);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2847 | }
|
| 2848 |
|
| 2849 | template<class T>
|
| 2850 | Reference<T> Pointer<T>::operator*()
|
| 2851 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2852 | return Reference<T>(LValue::loadValue(), alignment);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2853 | }
|
| 2854 |
|
| 2855 | template<class T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2856 | llvm::Type *Pointer<T>::getType()
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2857 | {
|
| 2858 | return Nucleus::getPointerType(T::getType());
|
| 2859 | }
|
| 2860 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2861 | template<class T, int S>
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2862 | Array<T, S>::Array(int size) : Variable<T>(size)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2863 | {
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2864 | }
|
| 2865 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2866 | template<class T, int S>
|
| 2867 | Reference<T> Array<T, S>::operator[](int index)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2868 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2869 | llvm::Value *element = LValue::getAddress((llvm::Value*)Nucleus::createConstantInt(index));
|
| 2870 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2871 | return Reference<T>(element);
|
| 2872 | }
|
| 2873 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2874 | template<class T, int S>
|
| 2875 | Reference<T> Array<T, S>::operator[](RValue<Int> index)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2876 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2877 | llvm::Value *element = LValue::getAddress(index.value);
|
| 2878 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2879 | return Reference<T>(element);
|
| 2880 | }
|
| 2881 |
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2882 | template<class T, int S>
|
| 2883 | Reference<T> Array<T, S>::operator[](RValue<UInt> index)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2884 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2885 | llvm::Value *element = LValue::getAddress(index.value);
|
| 2886 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2887 | return Reference<T>(element);
|
| 2888 | }
|
| 2889 |
|
| 2890 | // template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2891 | // RValue<Array<T>> operator++(const Array<T> &val, int)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2892 | // {
|
| 2893 | // // FIXME: Requires storing the address of the array
|
| 2894 | // }
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2895 |
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2896 | // template<class T>
|
| 2897 | // const Array<T> &operator++(const Array<T> &val)
|
| 2898 | // {
|
| 2899 | // // FIXME: Requires storing the address of the array
|
| 2900 | // }
|
| 2901 |
|
| 2902 | // template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2903 | // RValue<Array<T>> operator--(const Array<T> &val, int)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2904 | // {
|
| 2905 | // // FIXME: Requires storing the address of the array
|
| 2906 | // }
|
| 2907 |
|
| 2908 | // template<class T>
|
| 2909 | // const Array<T> &operator--(const Array<T> &val)
|
| 2910 | // {
|
| 2911 | // // FIXME: Requires storing the address of the array
|
| 2912 | // }
|
| 2913 |
|
| 2914 | template<class T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2915 | RValue<T> IfThenElse(RValue<Bool> condition, RValue<T> ifTrue, RValue<T> ifFalse)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2916 | {
|
| 2917 | return RValue<T>(Nucleus::createSelect(condition.value, ifTrue.value, ifFalse.value));
|
| 2918 | }
|
| 2919 |
|
| 2920 | template<class T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2921 | RValue<T> IfThenElse(RValue<Bool> condition, const T &ifTrue, RValue<T> ifFalse)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2922 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2923 | llvm::Value *trueValue = ifTrue.loadValue();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2924 |
|
| 2925 | return RValue<T>(Nucleus::createSelect(condition.value, trueValue, ifFalse.value));
|
| 2926 | }
|
| 2927 |
|
| 2928 | template<class T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2929 | RValue<T> IfThenElse(RValue<Bool> condition, RValue<T> ifTrue, const T &ifFalse)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2930 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2931 | llvm::Value *falseValue = ifFalse.loadValue();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2932 |
|
| 2933 | return RValue<T>(Nucleus::createSelect(condition.value, ifTrue.value, falseValue));
|
| 2934 | }
|
| 2935 |
|
| 2936 | template<class T>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2937 | RValue<T> IfThenElse(RValue<Bool> condition, const T &ifTrue, const T &ifFalse)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2938 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2939 | llvm::Value *trueValue = ifTrue.loadValue();
|
| 2940 | llvm::Value *falseValue = ifFalse.loadValue();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2941 |
|
| 2942 | return RValue<T>(Nucleus::createSelect(condition.value, trueValue, falseValue));
|
| 2943 | }
|
| 2944 |
|
| 2945 | template<class T>
|
| 2946 | void Return(const Pointer<T> &ret)
|
| 2947 | {
|
| 2948 | Nucleus::createRet(Nucleus::createLoad(ret.address));
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2949 | Nucleus::setInsertBlock(Nucleus::createBasicBlock());
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2950 | }
|
| 2951 |
|
| 2952 | template<class T>
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2953 | void Return(RValue<Pointer<T>> ret)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2954 | {
|
| 2955 | Nucleus::createRet(ret.value);
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2956 | Nucleus::setInsertBlock(Nucleus::createBasicBlock());
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2957 | }
|
| 2958 |
|
Nicolas Capens | 2ab859f | 2015-02-05 12:36:46 -0500 | [diff] [blame] | 2959 | template<typename Return, typename... Arguments>
|
| 2960 | Function<Return(Arguments...)>::Function()
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2961 | {
|
| 2962 | core = new Nucleus();
|
| 2963 |
|
Nicolas Capens | 2ab859f | 2015-02-05 12:36:46 -0500 | [diff] [blame] | 2964 | llvm::Type *types[] = {Arguments::getType()...};
|
| 2965 | for(llvm::Type *type : types)
|
| 2966 | {
|
| 2967 | arguments.push_back(type);
|
Nicolas Capens | 81f1830 | 2016-01-14 09:32:35 -0500 | [diff] [blame] | 2968 | }
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2969 |
|
Nicolas Capens | 2ab859f | 2015-02-05 12:36:46 -0500 | [diff] [blame] | 2970 | function = Nucleus::createFunction(Return::getType(), arguments);
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2971 | Nucleus::setFunction(function);
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2972 | }
|
| 2973 |
|
Nicolas Capens | 2ab859f | 2015-02-05 12:36:46 -0500 | [diff] [blame] | 2974 | template<typename Return, typename... Arguments>
|
| 2975 | Function<Return(Arguments...)>::~Function()
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2976 | {
|
| 2977 | delete core;
|
| 2978 | }
|
| 2979 |
|
Nicolas Capens | 2ab859f | 2015-02-05 12:36:46 -0500 | [diff] [blame] | 2980 | template<typename Return, typename... Arguments>
|
Nicolas Capens | 2ab859f | 2015-02-05 12:36:46 -0500 | [diff] [blame] | 2981 | Routine *Function<Return(Arguments...)>::operator()(const wchar_t *name, ...)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2982 | {
|
| 2983 | wchar_t fullName[1024 + 1];
|
| 2984 |
|
| 2985 | va_list vararg;
|
| 2986 | va_start(vararg, name);
|
| 2987 | vswprintf(fullName, 1024, name, vararg);
|
| 2988 | va_end(vararg);
|
| 2989 |
|
| 2990 | return core->acquireRoutine(fullName, true);
|
| 2991 | }
|
| 2992 |
|
| 2993 | template<class T, class S>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 2994 | RValue<T> ReinterpretCast(RValue<S> val)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 2995 | {
|
| 2996 | return RValue<T>(Nucleus::createBitCast(val.value, T::getType()));
|
| 2997 | }
|
| 2998 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2999 | template<class T>
|
| 3000 | RValue<T> ReinterpretCast(const LValue &var)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 3001 | {
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3002 | llvm::Value *val = var.loadValue();
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 3003 |
|
| 3004 | return RValue<T>(Nucleus::createBitCast(val, T::getType()));
|
| 3005 | }
|
| 3006 |
|
| 3007 | template<class T, class S>
|
| 3008 | RValue<T> ReinterpretCast(const Reference<S> &var)
|
| 3009 | {
|
| 3010 | return ReinterpretCast<T>(RValue<S>(var));
|
| 3011 | }
|
| 3012 |
|
| 3013 | template<class T, class S>
|
John Bauman | 19bac1e | 2014-05-06 15:23:49 -0400 | [diff] [blame] | 3014 | RValue<T> As(RValue<S> val)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 3015 | {
|
| 3016 | return ReinterpretCast<T>(val);
|
| 3017 | }
|
| 3018 |
|
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3019 | template<class T>
|
| 3020 | RValue<T> As(const LValue &var)
|
John Bauman | 8940182 | 2014-05-06 15:04:28 -0400 | [diff] [blame] | 3021 | {
|
| 3022 | return ReinterpretCast<T>(var);
|
| 3023 | }
|
| 3024 |
|
| 3025 | template<class T, class S>
|
| 3026 | RValue<T> As(const Reference<S> &val)
|
| 3027 | {
|
| 3028 | return ReinterpretCast<T>(val);
|
| 3029 | }
|
| 3030 | }
|
| 3031 |
|
| 3032 | #endif // sw_Nucleus_hpp
|