Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 1 | //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===// |
| 2 | // |
| 3 | // The Subzero Code Generator |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file declares the TargetLoweringX8632 class, which |
| 11 | // implements the TargetLowering interface for the x86-32 |
| 12 | // architecture. |
| 13 | // |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | |
| 16 | #ifndef SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
| 17 | #define SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
| 18 | |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 19 | #include "assembler_ia32.h" |
Jim Stichnoth | a18cc9c | 2014-09-30 19:10:22 -0700 | [diff] [blame] | 20 | #include "IceDefs.h" |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 21 | #include "IceInstX8632.h" |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 22 | #include "IceRegistersX8632.h" |
Jim Stichnoth | a18cc9c | 2014-09-30 19:10:22 -0700 | [diff] [blame] | 23 | #include "IceTargetLowering.h" |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 24 | |
| 25 | namespace Ice { |
| 26 | |
| 27 | class TargetX8632 : public TargetLowering { |
Jim Stichnoth | 7b451a9 | 2014-10-15 14:39:23 -0700 | [diff] [blame] | 28 | TargetX8632(const TargetX8632 &) = delete; |
| 29 | TargetX8632 &operator=(const TargetX8632 &) = delete; |
| 30 | |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 31 | public: |
| 32 | static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); } |
| 33 | |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 34 | void translateOm1() override; |
| 35 | void translateO2() override; |
| 36 | bool doBranchOpt(Inst *I, const CfgNode *NextNode) override; |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 37 | |
Jim Stichnoth | 98712a3 | 2014-10-24 10:59:02 -0700 | [diff] [blame] | 38 | Variable *getPhysicalRegister(SizeT RegNum, Type Ty = IceType_void) override; |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 39 | IceString getRegName(SizeT RegNum, Type Ty) const override; |
| 40 | llvm::SmallBitVector getRegisterSet(RegSetMask Include, |
| 41 | RegSetMask Exclude) const override; |
| 42 | const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const override { |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 43 | return TypeToRegisterSet[Ty]; |
| 44 | } |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 45 | bool hasFramePointer() const override { return IsEbpBasedFrame; } |
| 46 | SizeT getFrameOrStackReg() const override { |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 47 | return IsEbpBasedFrame ? RegX8632::Reg_ebp : RegX8632::Reg_esp; |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 48 | } |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 49 | size_t typeWidthInBytesOnStack(Type Ty) const override { |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 50 | // Round up to the next multiple of 4 bytes. In particular, i1, |
| 51 | // i8, and i16 are rounded up to 4 bytes. |
| 52 | return (typeWidthInBytes(Ty) + 3) & ~3; |
| 53 | } |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 54 | SizeT getBundleAlignLog2Bytes() const override { return 5; } |
Jim Stichnoth | f44f371 | 2014-10-01 14:05:51 -0700 | [diff] [blame] | 55 | llvm::ArrayRef<AsmCodeByte> getNonExecBundlePadding() const override { |
| 56 | static const AsmCodeByte Padding[] = { 0xF4 }; |
| 57 | return llvm::ArrayRef<AsmCodeByte>(Padding, 1); |
Jan Voung | b17f61d | 2014-08-28 16:00:53 -0700 | [diff] [blame] | 58 | } |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 59 | void emitVariable(const Variable *Var) const override; |
| 60 | void lowerArguments() override; |
| 61 | void addProlog(CfgNode *Node) override; |
| 62 | void addEpilog(CfgNode *Node) override; |
| 63 | void emitConstants() const override; |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 64 | SizeT makeNextLabelNumber() { return NextLabelNumber++; } |
| 65 | // Ensure that a 64-bit Variable has been split into 2 32-bit |
| 66 | // Variables, creating them if necessary. This is needed for all |
| 67 | // I64 operations, and it is needed for pushing F64 arguments for |
| 68 | // function calls using the 32-bit push instruction (though the |
| 69 | // latter could be done by directly writing to the stack). |
| 70 | void split64(Variable *Var); |
Matt Wala | 45a0623 | 2014-07-09 16:33:22 -0700 | [diff] [blame] | 71 | void finishArgumentLowering(Variable *Arg, Variable *FramePtr, |
| 72 | size_t BasicFrameOffset, size_t &InArgsSizeBytes); |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 73 | Operand *loOperand(Operand *Operand); |
| 74 | Operand *hiOperand(Operand *Operand); |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 75 | x86::Address stackVarToAsmOperand(const Variable *Var) const; |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 76 | |
Matt Wala | 0a45051 | 2014-07-30 12:44:39 -0700 | [diff] [blame] | 77 | enum X86InstructionSet { |
| 78 | // SSE2 is the PNaCl baseline instruction set. |
| 79 | SSE2, |
| 80 | SSE4_1 |
| 81 | }; |
| 82 | |
| 83 | X86InstructionSet getInstructionSet() const { return InstructionSet; } |
| 84 | |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 85 | protected: |
| 86 | TargetX8632(Cfg *Func); |
| 87 | |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 88 | void postLower() override; |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 89 | |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 90 | void lowerAlloca(const InstAlloca *Inst) override; |
| 91 | void lowerArithmetic(const InstArithmetic *Inst) override; |
| 92 | void lowerAssign(const InstAssign *Inst) override; |
| 93 | void lowerBr(const InstBr *Inst) override; |
| 94 | void lowerCall(const InstCall *Inst) override; |
| 95 | void lowerCast(const InstCast *Inst) override; |
| 96 | void lowerExtractElement(const InstExtractElement *Inst) override; |
| 97 | void lowerFcmp(const InstFcmp *Inst) override; |
| 98 | void lowerIcmp(const InstIcmp *Inst) override; |
| 99 | void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override; |
| 100 | void lowerInsertElement(const InstInsertElement *Inst) override; |
| 101 | void lowerLoad(const InstLoad *Inst) override; |
| 102 | void lowerPhi(const InstPhi *Inst) override; |
| 103 | void lowerRet(const InstRet *Inst) override; |
| 104 | void lowerSelect(const InstSelect *Inst) override; |
| 105 | void lowerStore(const InstStore *Inst) override; |
| 106 | void lowerSwitch(const InstSwitch *Inst) override; |
| 107 | void lowerUnreachable(const InstUnreachable *Inst) override; |
Jim Stichnoth | 336f6c4 | 2014-10-30 15:01:31 -0700 | [diff] [blame] | 108 | void prelowerPhis() override; |
| 109 | void lowerPhiAssignments(CfgNode *Node, |
| 110 | const AssignList &Assignments) override; |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 111 | void doAddressOptLoad() override; |
| 112 | void doAddressOptStore() override; |
| 113 | void randomlyInsertNop(float Probability) override; |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 114 | |
Jan Voung | c820ddf | 2014-07-29 14:38:51 -0700 | [diff] [blame] | 115 | // Naive lowering of cmpxchg. |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 116 | void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, |
| 117 | Operand *Desired); |
Jan Voung | c820ddf | 2014-07-29 14:38:51 -0700 | [diff] [blame] | 118 | // Attempt a more optimized lowering of cmpxchg. Returns true if optimized. |
| 119 | bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr, |
| 120 | Operand *Expected, Operand *Desired); |
Jan Voung | 5cd240d | 2014-06-25 10:36:46 -0700 | [diff] [blame] | 121 | void lowerAtomicRMW(Variable *Dest, uint32_t Operation, Operand *Ptr, |
| 122 | Operand *Val); |
Jan Voung | e4da26f | 2014-07-15 17:52:39 -0700 | [diff] [blame] | 123 | void lowerCountZeros(bool Cttz, Type Ty, Variable *Dest, Operand *FirstVal, |
| 124 | Operand *SecondVal); |
Jan Voung | 5cd240d | 2014-06-25 10:36:46 -0700 | [diff] [blame] | 125 | |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 126 | typedef void (TargetX8632::*LowerBinOp)(Variable *, Operand *); |
| 127 | void expandAtomicRMWAsCmpxchg(LowerBinOp op_lo, LowerBinOp op_hi, |
| 128 | Variable *Dest, Operand *Ptr, Operand *Val); |
| 129 | |
Matt Wala | ce0ca8f | 2014-07-24 12:34:20 -0700 | [diff] [blame] | 130 | void eliminateNextVectorSextInstruction(Variable *SignExtendedResult); |
| 131 | |
Matt Wala | afeaee4 | 2014-08-07 13:47:30 -0700 | [diff] [blame] | 132 | void scalarizeArithmetic(InstArithmetic::OpKind K, Variable *Dest, |
| 133 | Operand *Src0, Operand *Src1); |
| 134 | |
Matt Wala | d4799f4 | 2014-08-14 14:24:12 -0700 | [diff] [blame] | 135 | void sortByAlignment(VarList &Dest, const VarList &Source) const; |
| 136 | |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 137 | // Operand legalization helpers. To deal with address mode |
| 138 | // constraints, the helpers will create a new Operand and emit |
| 139 | // instructions that guarantee that the Operand kind is one of those |
| 140 | // indicated by the LegalMask (a bitmask of allowed kinds). If the |
| 141 | // input Operand is known to already meet the constraints, it may be |
| 142 | // simply returned as the result, without creating any new |
| 143 | // instructions or operands. |
| 144 | enum OperandLegalization { |
| 145 | Legal_None = 0, |
| 146 | Legal_Reg = 1 << 0, // physical register, not stack location |
| 147 | Legal_Imm = 1 << 1, |
| 148 | Legal_Mem = 1 << 2, // includes [eax+4*ecx] as well as [esp+12] |
Jim Stichnoth | de4ca71 | 2014-06-29 08:13:48 -0700 | [diff] [blame] | 149 | // TODO(stichnot): LEAHACK: remove Legal_Reloc once a proper |
| 150 | // emitter is used. |
| 151 | Legal_Reloc = 1 << 3, |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 152 | Legal_All = ~Legal_None |
| 153 | }; |
| 154 | typedef uint32_t LegalMask; |
Jim Stichnoth | de4ca71 | 2014-06-29 08:13:48 -0700 | [diff] [blame] | 155 | Operand *legalize(Operand *From, LegalMask Allowed = Legal_All & ~Legal_Reloc, |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 156 | int32_t RegNum = Variable::NoRegister); |
Jim Stichnoth | ad40353 | 2014-09-25 12:44:17 -0700 | [diff] [blame] | 157 | Variable *legalizeToVar(Operand *From, int32_t RegNum = Variable::NoRegister); |
Jan Voung | 5cd240d | 2014-06-25 10:36:46 -0700 | [diff] [blame] | 158 | // Turn a pointer operand into a memory operand that can be |
| 159 | // used by a real load/store operation. Legalizes the operand as well. |
| 160 | // This is a nop if the operand is already a legal memory operand. |
| 161 | OperandX8632Mem *FormMemoryOperand(Operand *Ptr, Type Ty); |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 162 | |
| 163 | Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister); |
| 164 | InstCall *makeHelperCall(const IceString &Name, Variable *Dest, |
| 165 | SizeT MaxSrcs) { |
| 166 | bool SuppressMangling = true; |
Matt Wala | ad8f726 | 2014-07-14 17:37:37 -0700 | [diff] [blame] | 167 | const Type FunctionPointerType = IceType_i32; |
| 168 | Constant *CallTarget = |
| 169 | Ctx->getConstantSym(FunctionPointerType, 0, Name, SuppressMangling); |
Karl Schimpf | 8df26f3 | 2014-09-19 09:33:26 -0700 | [diff] [blame] | 170 | InstCall *Call = InstCall::create(Func, MaxSrcs, Dest, CallTarget, false); |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 171 | return Call; |
| 172 | } |
Jan Voung | 3bd9f1a | 2014-06-18 10:50:57 -0700 | [diff] [blame] | 173 | static Type stackSlotType(); |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 174 | |
Matt Wala | 928f129 | 2014-07-07 16:50:46 -0700 | [diff] [blame] | 175 | Variable *copyToReg(Operand *Src, int32_t RegNum = Variable::NoRegister); |
| 176 | |
Matt Wala | 83b8036 | 2014-07-16 10:21:30 -0700 | [diff] [blame] | 177 | // Returns a vector in a register with the given constant entries. |
| 178 | Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister); |
| 179 | Variable *makeVectorOfOnes(Type Ty, int32_t RegNum = Variable::NoRegister); |
Matt Wala | 9a0168a | 2014-07-23 14:56:10 -0700 | [diff] [blame] | 180 | Variable *makeVectorOfMinusOnes(Type Ty, |
| 181 | int32_t RegNum = Variable::NoRegister); |
| 182 | Variable *makeVectorOfHighOrderBits(Type Ty, |
| 183 | int32_t RegNum = Variable::NoRegister); |
Matt Wala | 83b8036 | 2014-07-16 10:21:30 -0700 | [diff] [blame] | 184 | |
Matt Wala | 4988923 | 2014-07-18 12:45:09 -0700 | [diff] [blame] | 185 | // Return a memory operand corresponding to a stack allocated Variable. |
| 186 | OperandX8632Mem *getMemoryOperandForStackSlot(Type Ty, Variable *Slot, |
| 187 | uint32_t Offset = 0); |
| 188 | |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 189 | // The following are helpers that insert lowered x86 instructions |
| 190 | // with minimal syntactic overhead, so that the lowering code can |
| 191 | // look as close to assembly as practical. |
| 192 | void _adc(Variable *Dest, Operand *Src0) { |
| 193 | Context.insert(InstX8632Adc::create(Func, Dest, Src0)); |
| 194 | } |
| 195 | void _add(Variable *Dest, Operand *Src0) { |
| 196 | Context.insert(InstX8632Add::create(Func, Dest, Src0)); |
| 197 | } |
Matt Wala | 105b704 | 2014-08-11 19:56:19 -0700 | [diff] [blame] | 198 | void _adjust_stack(int32_t Amount) { |
Jim Stichnoth | 144cdce | 2014-09-22 16:02:59 -0700 | [diff] [blame] | 199 | Context.insert(InstX8632AdjustStack::create( |
| 200 | Func, Amount, getPhysicalRegister(RegX8632::Reg_esp))); |
Matt Wala | 105b704 | 2014-08-11 19:56:19 -0700 | [diff] [blame] | 201 | } |
Matt Wala | 8d1072e | 2014-07-11 15:43:51 -0700 | [diff] [blame] | 202 | void _addps(Variable *Dest, Operand *Src0) { |
| 203 | Context.insert(InstX8632Addps::create(Func, Dest, Src0)); |
| 204 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 205 | void _addss(Variable *Dest, Operand *Src0) { |
| 206 | Context.insert(InstX8632Addss::create(Func, Dest, Src0)); |
| 207 | } |
| 208 | void _and(Variable *Dest, Operand *Src0) { |
| 209 | Context.insert(InstX8632And::create(Func, Dest, Src0)); |
| 210 | } |
Matt Wala | 0a45051 | 2014-07-30 12:44:39 -0700 | [diff] [blame] | 211 | void _blendvps(Variable *Dest, Operand *Src0, Operand *Src1) { |
| 212 | Context.insert(InstX8632Blendvps::create(Func, Dest, Src0, Src1)); |
| 213 | } |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 214 | void _br(CondX86::BrCond Condition, CfgNode *TargetTrue, |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 215 | CfgNode *TargetFalse) { |
| 216 | Context.insert( |
| 217 | InstX8632Br::create(Func, TargetTrue, TargetFalse, Condition)); |
| 218 | } |
| 219 | void _br(CfgNode *Target) { |
| 220 | Context.insert(InstX8632Br::create(Func, Target)); |
| 221 | } |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 222 | void _br(CondX86::BrCond Condition, CfgNode *Target) { |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 223 | Context.insert(InstX8632Br::create(Func, Target, Condition)); |
| 224 | } |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 225 | void _br(CondX86::BrCond Condition, InstX8632Label *Label) { |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 226 | Context.insert(InstX8632Br::create(Func, Label, Condition)); |
| 227 | } |
Jan Voung | e4da26f | 2014-07-15 17:52:39 -0700 | [diff] [blame] | 228 | void _bsf(Variable *Dest, Operand *Src0) { |
| 229 | Context.insert(InstX8632Bsf::create(Func, Dest, Src0)); |
| 230 | } |
| 231 | void _bsr(Variable *Dest, Operand *Src0) { |
| 232 | Context.insert(InstX8632Bsr::create(Func, Dest, Src0)); |
| 233 | } |
Jan Voung | 7fa813b | 2014-07-18 13:01:08 -0700 | [diff] [blame] | 234 | void _bswap(Variable *SrcDest) { |
| 235 | Context.insert(InstX8632Bswap::create(Func, SrcDest)); |
| 236 | } |
Matt Wala | afeaee4 | 2014-08-07 13:47:30 -0700 | [diff] [blame] | 237 | void _cbwdq(Variable *Dest, Operand *Src0) { |
| 238 | Context.insert(InstX8632Cbwdq::create(Func, Dest, Src0)); |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 239 | } |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 240 | void _cmov(Variable *Dest, Operand *Src0, CondX86::BrCond Condition) { |
Jan Voung | e4da26f | 2014-07-15 17:52:39 -0700 | [diff] [blame] | 241 | Context.insert(InstX8632Cmov::create(Func, Dest, Src0, Condition)); |
| 242 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 243 | void _cmp(Operand *Src0, Operand *Src1) { |
| 244 | Context.insert(InstX8632Icmp::create(Func, Src0, Src1)); |
| 245 | } |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 246 | void _cmpps(Variable *Dest, Operand *Src0, CondX86::CmppsCond Condition) { |
Matt Wala | ce0ca8f | 2014-07-24 12:34:20 -0700 | [diff] [blame] | 247 | Context.insert(InstX8632Cmpps::create(Func, Dest, Src0, Condition)); |
| 248 | } |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 249 | void _cmpxchg(Operand *DestOrAddr, Variable *Eax, Variable *Desired, |
| 250 | bool Locked) { |
| 251 | Context.insert( |
| 252 | InstX8632Cmpxchg::create(Func, DestOrAddr, Eax, Desired, Locked)); |
| 253 | // Mark eax as possibly modified by cmpxchg. |
| 254 | Context.insert( |
| 255 | InstFakeDef::create(Func, Eax, llvm::dyn_cast<Variable>(DestOrAddr))); |
Jim Stichnoth | 4775255 | 2014-10-13 17:15:08 -0700 | [diff] [blame] | 256 | _set_dest_nonkillable(); |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 257 | } |
Jan Voung | 03532e5 | 2014-09-23 13:32:18 -0700 | [diff] [blame] | 258 | void _cmpxchg8b(OperandX8632Mem *Addr, Variable *Edx, Variable *Eax, |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 259 | Variable *Ecx, Variable *Ebx, bool Locked) { |
| 260 | Context.insert( |
| 261 | InstX8632Cmpxchg8b::create(Func, Addr, Edx, Eax, Ecx, Ebx, Locked)); |
| 262 | // Mark edx, and eax as possibly modified by cmpxchg8b. |
| 263 | Context.insert(InstFakeDef::create(Func, Edx)); |
Jim Stichnoth | 4775255 | 2014-10-13 17:15:08 -0700 | [diff] [blame] | 264 | _set_dest_nonkillable(); |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 265 | Context.insert(InstFakeDef::create(Func, Eax)); |
Jim Stichnoth | 4775255 | 2014-10-13 17:15:08 -0700 | [diff] [blame] | 266 | _set_dest_nonkillable(); |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 267 | } |
Jan Voung | 699bf02 | 2014-10-08 13:52:10 -0700 | [diff] [blame] | 268 | void _cvt(Variable *Dest, Operand *Src0, InstX8632Cvt::CvtVariant Variant) { |
| 269 | Context.insert(InstX8632Cvt::create(Func, Dest, Src0, Variant)); |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 270 | } |
| 271 | void _div(Variable *Dest, Operand *Src0, Operand *Src1) { |
| 272 | Context.insert(InstX8632Div::create(Func, Dest, Src0, Src1)); |
| 273 | } |
Matt Wala | 8d1072e | 2014-07-11 15:43:51 -0700 | [diff] [blame] | 274 | void _divps(Variable *Dest, Operand *Src0) { |
| 275 | Context.insert(InstX8632Divps::create(Func, Dest, Src0)); |
| 276 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 277 | void _divss(Variable *Dest, Operand *Src0) { |
| 278 | Context.insert(InstX8632Divss::create(Func, Dest, Src0)); |
| 279 | } |
| 280 | void _fld(Operand *Src0) { Context.insert(InstX8632Fld::create(Func, Src0)); } |
| 281 | void _fstp(Variable *Dest) { |
| 282 | Context.insert(InstX8632Fstp::create(Func, Dest)); |
| 283 | } |
| 284 | void _idiv(Variable *Dest, Operand *Src0, Operand *Src1) { |
| 285 | Context.insert(InstX8632Idiv::create(Func, Dest, Src0, Src1)); |
| 286 | } |
| 287 | void _imul(Variable *Dest, Operand *Src0) { |
| 288 | Context.insert(InstX8632Imul::create(Func, Dest, Src0)); |
| 289 | } |
Matt Wala | 0a45051 | 2014-07-30 12:44:39 -0700 | [diff] [blame] | 290 | void _insertps(Variable *Dest, Operand *Src0, Operand *Src1) { |
| 291 | Context.insert(InstX8632Insertps::create(Func, Dest, Src0, Src1)); |
| 292 | } |
Matt Wala | 4988923 | 2014-07-18 12:45:09 -0700 | [diff] [blame] | 293 | void _lea(Variable *Dest, Operand *Src0) { |
| 294 | Context.insert(InstX8632Lea::create(Func, Dest, Src0)); |
| 295 | } |
Jan Voung | 5cd240d | 2014-06-25 10:36:46 -0700 | [diff] [blame] | 296 | void _mfence() { Context.insert(InstX8632Mfence::create(Func)); } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 297 | // If Dest=NULL is passed in, then a new variable is created, marked |
| 298 | // as infinite register allocation weight, and returned through the |
| 299 | // in/out Dest argument. |
| 300 | void _mov(Variable *&Dest, Operand *Src0, |
| 301 | int32_t RegNum = Variable::NoRegister) { |
Jim Stichnoth | ad40353 | 2014-09-25 12:44:17 -0700 | [diff] [blame] | 302 | if (Dest == NULL) |
| 303 | Dest = makeReg(Src0->getType(), RegNum); |
| 304 | Context.insert(InstX8632Mov::create(Func, Dest, Src0)); |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 305 | } |
Jim Stichnoth | 4775255 | 2014-10-13 17:15:08 -0700 | [diff] [blame] | 306 | void _mov_nonkillable(Variable *Dest, Operand *Src0) { |
| 307 | Inst *NewInst = InstX8632Mov::create(Func, Dest, Src0); |
| 308 | NewInst->setDestNonKillable(); |
| 309 | Context.insert(NewInst); |
| 310 | } |
Matt Wala | 4988923 | 2014-07-18 12:45:09 -0700 | [diff] [blame] | 311 | void _movd(Variable *Dest, Operand *Src0) { |
| 312 | Context.insert(InstX8632Movd::create(Func, Dest, Src0)); |
| 313 | } |
Matt Wala | 928f129 | 2014-07-07 16:50:46 -0700 | [diff] [blame] | 314 | void _movp(Variable *Dest, Operand *Src0) { |
| 315 | Context.insert(InstX8632Movp::create(Func, Dest, Src0)); |
| 316 | } |
Jan Voung | 5cd240d | 2014-06-25 10:36:46 -0700 | [diff] [blame] | 317 | void _movq(Variable *Dest, Operand *Src0) { |
| 318 | Context.insert(InstX8632Movq::create(Func, Dest, Src0)); |
| 319 | } |
Jan Voung | e4dc61b | 2014-10-06 08:53:52 -0700 | [diff] [blame] | 320 | void _movss(Variable *Dest, Variable *Src0) { |
| 321 | Context.insert(InstX8632MovssRegs::create(Func, Dest, Src0)); |
Matt Wala | 4988923 | 2014-07-18 12:45:09 -0700 | [diff] [blame] | 322 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 323 | void _movsx(Variable *Dest, Operand *Src0) { |
| 324 | Context.insert(InstX8632Movsx::create(Func, Dest, Src0)); |
| 325 | } |
| 326 | void _movzx(Variable *Dest, Operand *Src0) { |
| 327 | Context.insert(InstX8632Movzx::create(Func, Dest, Src0)); |
| 328 | } |
| 329 | void _mul(Variable *Dest, Variable *Src0, Operand *Src1) { |
| 330 | Context.insert(InstX8632Mul::create(Func, Dest, Src0, Src1)); |
| 331 | } |
Matt Wala | 8d1072e | 2014-07-11 15:43:51 -0700 | [diff] [blame] | 332 | void _mulps(Variable *Dest, Operand *Src0) { |
| 333 | Context.insert(InstX8632Mulps::create(Func, Dest, Src0)); |
| 334 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 335 | void _mulss(Variable *Dest, Operand *Src0) { |
| 336 | Context.insert(InstX8632Mulss::create(Func, Dest, Src0)); |
| 337 | } |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 338 | void _neg(Variable *SrcDest) { |
| 339 | Context.insert(InstX8632Neg::create(Func, SrcDest)); |
| 340 | } |
Matt Wala | c330274 | 2014-08-15 16:21:56 -0700 | [diff] [blame] | 341 | void _nop(SizeT Variant) { |
| 342 | Context.insert(InstX8632Nop::create(Func, Variant)); |
| 343 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 344 | void _or(Variable *Dest, Operand *Src0) { |
| 345 | Context.insert(InstX8632Or::create(Func, Dest, Src0)); |
| 346 | } |
Matt Wala | 7fa22d8 | 2014-07-17 12:41:31 -0700 | [diff] [blame] | 347 | void _padd(Variable *Dest, Operand *Src0) { |
| 348 | Context.insert(InstX8632Padd::create(Func, Dest, Src0)); |
| 349 | } |
Matt Wala | 83b8036 | 2014-07-16 10:21:30 -0700 | [diff] [blame] | 350 | void _pand(Variable *Dest, Operand *Src0) { |
| 351 | Context.insert(InstX8632Pand::create(Func, Dest, Src0)); |
| 352 | } |
Matt Wala | 9cb61e2 | 2014-07-24 09:44:42 -0700 | [diff] [blame] | 353 | void _pandn(Variable *Dest, Operand *Src0) { |
| 354 | Context.insert(InstX8632Pandn::create(Func, Dest, Src0)); |
| 355 | } |
Matt Wala | 0a45051 | 2014-07-30 12:44:39 -0700 | [diff] [blame] | 356 | void _pblendvb(Variable *Dest, Operand *Src0, Operand *Src1) { |
| 357 | Context.insert(InstX8632Pblendvb::create(Func, Dest, Src0, Src1)); |
| 358 | } |
Matt Wala | 83b8036 | 2014-07-16 10:21:30 -0700 | [diff] [blame] | 359 | void _pcmpeq(Variable *Dest, Operand *Src0) { |
| 360 | Context.insert(InstX8632Pcmpeq::create(Func, Dest, Src0)); |
| 361 | } |
| 362 | void _pcmpgt(Variable *Dest, Operand *Src0) { |
| 363 | Context.insert(InstX8632Pcmpgt::create(Func, Dest, Src0)); |
| 364 | } |
Matt Wala | 0a45051 | 2014-07-30 12:44:39 -0700 | [diff] [blame] | 365 | void _pextr(Variable *Dest, Operand *Src0, Operand *Src1) { |
| 366 | Context.insert(InstX8632Pextr::create(Func, Dest, Src0, Src1)); |
Matt Wala | 4988923 | 2014-07-18 12:45:09 -0700 | [diff] [blame] | 367 | } |
Matt Wala | 0a45051 | 2014-07-30 12:44:39 -0700 | [diff] [blame] | 368 | void _pinsr(Variable *Dest, Operand *Src0, Operand *Src1) { |
| 369 | Context.insert(InstX8632Pinsr::create(Func, Dest, Src0, Src1)); |
Matt Wala | 4988923 | 2014-07-18 12:45:09 -0700 | [diff] [blame] | 370 | } |
Matt Wala | 0a45051 | 2014-07-30 12:44:39 -0700 | [diff] [blame] | 371 | void _pmull(Variable *Dest, Operand *Src0) { |
| 372 | Context.insert(InstX8632Pmull::create(Func, Dest, Src0)); |
Matt Wala | 7fa22d8 | 2014-07-17 12:41:31 -0700 | [diff] [blame] | 373 | } |
| 374 | void _pmuludq(Variable *Dest, Operand *Src0) { |
| 375 | Context.insert(InstX8632Pmuludq::create(Func, Dest, Src0)); |
| 376 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 377 | void _pop(Variable *Dest) { |
| 378 | Context.insert(InstX8632Pop::create(Func, Dest)); |
| 379 | } |
Matt Wala | 7fa22d8 | 2014-07-17 12:41:31 -0700 | [diff] [blame] | 380 | void _por(Variable *Dest, Operand *Src0) { |
| 381 | Context.insert(InstX8632Por::create(Func, Dest, Src0)); |
| 382 | } |
| 383 | void _pshufd(Variable *Dest, Operand *Src0, Operand *Src1) { |
| 384 | Context.insert(InstX8632Pshufd::create(Func, Dest, Src0, Src1)); |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 385 | } |
Matt Wala | 83b8036 | 2014-07-16 10:21:30 -0700 | [diff] [blame] | 386 | void _psll(Variable *Dest, Operand *Src0) { |
| 387 | Context.insert(InstX8632Psll::create(Func, Dest, Src0)); |
| 388 | } |
| 389 | void _psra(Variable *Dest, Operand *Src0) { |
| 390 | Context.insert(InstX8632Psra::create(Func, Dest, Src0)); |
| 391 | } |
| 392 | void _psub(Variable *Dest, Operand *Src0) { |
| 393 | Context.insert(InstX8632Psub::create(Func, Dest, Src0)); |
| 394 | } |
Jan Voung | 0b9eee5 | 2014-10-07 11:20:10 -0700 | [diff] [blame] | 395 | void _push(Variable *Src0) { |
| 396 | Context.insert(InstX8632Push::create(Func, Src0)); |
Matt Wala | 7fa22d8 | 2014-07-17 12:41:31 -0700 | [diff] [blame] | 397 | } |
Matt Wala | 8d1072e | 2014-07-11 15:43:51 -0700 | [diff] [blame] | 398 | void _pxor(Variable *Dest, Operand *Src0) { |
| 399 | Context.insert(InstX8632Pxor::create(Func, Dest, Src0)); |
| 400 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 401 | void _ret(Variable *Src0 = NULL) { |
| 402 | Context.insert(InstX8632Ret::create(Func, Src0)); |
| 403 | } |
Jan Voung | 7fa813b | 2014-07-18 13:01:08 -0700 | [diff] [blame] | 404 | void _rol(Variable *Dest, Operand *Src0) { |
| 405 | Context.insert(InstX8632Rol::create(Func, Dest, Src0)); |
| 406 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 407 | void _sar(Variable *Dest, Operand *Src0) { |
| 408 | Context.insert(InstX8632Sar::create(Func, Dest, Src0)); |
| 409 | } |
| 410 | void _sbb(Variable *Dest, Operand *Src0) { |
| 411 | Context.insert(InstX8632Sbb::create(Func, Dest, Src0)); |
| 412 | } |
| 413 | void _shl(Variable *Dest, Operand *Src0) { |
| 414 | Context.insert(InstX8632Shl::create(Func, Dest, Src0)); |
| 415 | } |
| 416 | void _shld(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 417 | Context.insert(InstX8632Shld::create(Func, Dest, Src0, Src1)); |
| 418 | } |
| 419 | void _shr(Variable *Dest, Operand *Src0) { |
| 420 | Context.insert(InstX8632Shr::create(Func, Dest, Src0)); |
| 421 | } |
| 422 | void _shrd(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 423 | Context.insert(InstX8632Shrd::create(Func, Dest, Src0, Src1)); |
| 424 | } |
Matt Wala | 7fa22d8 | 2014-07-17 12:41:31 -0700 | [diff] [blame] | 425 | void _shufps(Variable *Dest, Operand *Src0, Operand *Src1) { |
| 426 | Context.insert(InstX8632Shufps::create(Func, Dest, Src0, Src1)); |
| 427 | } |
Jan Voung | f37fbbe | 2014-07-09 16:13:13 -0700 | [diff] [blame] | 428 | void _sqrtss(Variable *Dest, Operand *Src0) { |
| 429 | Context.insert(InstX8632Sqrtss::create(Func, Dest, Src0)); |
| 430 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 431 | void _store(Operand *Value, OperandX8632 *Mem) { |
| 432 | Context.insert(InstX8632Store::create(Func, Value, Mem)); |
| 433 | } |
Jan Voung | e4dc61b | 2014-10-06 08:53:52 -0700 | [diff] [blame] | 434 | void _storep(Variable *Value, OperandX8632Mem *Mem) { |
Matt Wala | 105b704 | 2014-08-11 19:56:19 -0700 | [diff] [blame] | 435 | Context.insert(InstX8632StoreP::create(Func, Value, Mem)); |
| 436 | } |
Jan Voung | e4dc61b | 2014-10-06 08:53:52 -0700 | [diff] [blame] | 437 | void _storeq(Variable *Value, OperandX8632Mem *Mem) { |
Jan Voung | 5cd240d | 2014-06-25 10:36:46 -0700 | [diff] [blame] | 438 | Context.insert(InstX8632StoreQ::create(Func, Value, Mem)); |
| 439 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 440 | void _sub(Variable *Dest, Operand *Src0) { |
| 441 | Context.insert(InstX8632Sub::create(Func, Dest, Src0)); |
| 442 | } |
Matt Wala | 8d1072e | 2014-07-11 15:43:51 -0700 | [diff] [blame] | 443 | void _subps(Variable *Dest, Operand *Src0) { |
| 444 | Context.insert(InstX8632Subps::create(Func, Dest, Src0)); |
| 445 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 446 | void _subss(Variable *Dest, Operand *Src0) { |
| 447 | Context.insert(InstX8632Subss::create(Func, Dest, Src0)); |
| 448 | } |
| 449 | void _test(Operand *Src0, Operand *Src1) { |
| 450 | Context.insert(InstX8632Test::create(Func, Src0, Src1)); |
| 451 | } |
| 452 | void _ucomiss(Operand *Src0, Operand *Src1) { |
| 453 | Context.insert(InstX8632Ucomiss::create(Func, Src0, Src1)); |
| 454 | } |
Jan Voung | 3bd9f1a | 2014-06-18 10:50:57 -0700 | [diff] [blame] | 455 | void _ud2() { Context.insert(InstX8632UD2::create(Func)); } |
Jan Voung | 5cd240d | 2014-06-25 10:36:46 -0700 | [diff] [blame] | 456 | void _xadd(Operand *Dest, Variable *Src, bool Locked) { |
| 457 | Context.insert(InstX8632Xadd::create(Func, Dest, Src, Locked)); |
| 458 | // The xadd exchanges Dest and Src (modifying Src). |
| 459 | // Model that update with a FakeDef. |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 460 | Context.insert( |
| 461 | InstFakeDef::create(Func, Src, llvm::dyn_cast<Variable>(Dest))); |
Jim Stichnoth | 4775255 | 2014-10-13 17:15:08 -0700 | [diff] [blame] | 462 | _set_dest_nonkillable(); |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 463 | } |
| 464 | void _xchg(Operand *Dest, Variable *Src) { |
| 465 | Context.insert(InstX8632Xchg::create(Func, Dest, Src)); |
| 466 | // The xchg modifies Dest and Src -- model that update with a FakeDef. |
| 467 | Context.insert( |
| 468 | InstFakeDef::create(Func, Src, llvm::dyn_cast<Variable>(Dest))); |
Jim Stichnoth | 4775255 | 2014-10-13 17:15:08 -0700 | [diff] [blame] | 469 | _set_dest_nonkillable(); |
Jan Voung | 5cd240d | 2014-06-25 10:36:46 -0700 | [diff] [blame] | 470 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 471 | void _xor(Variable *Dest, Operand *Src0) { |
| 472 | Context.insert(InstX8632Xor::create(Func, Dest, Src0)); |
| 473 | } |
Jim Stichnoth | 4775255 | 2014-10-13 17:15:08 -0700 | [diff] [blame] | 474 | void _set_dest_nonkillable() { |
| 475 | Context.getLastInserted()->setDestNonKillable(); |
| 476 | } |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 477 | |
Matt Wala | 0a45051 | 2014-07-30 12:44:39 -0700 | [diff] [blame] | 478 | const X86InstructionSet InstructionSet; |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 479 | bool IsEbpBasedFrame; |
Matt Wala | 105b704 | 2014-08-11 19:56:19 -0700 | [diff] [blame] | 480 | bool NeedsStackAlignment; |
Jim Stichnoth | d97c7df | 2014-06-04 11:57:08 -0700 | [diff] [blame] | 481 | size_t FrameSizeLocals; |
Matt Wala | d4799f4 | 2014-08-14 14:24:12 -0700 | [diff] [blame] | 482 | size_t SpillAreaSizeBytes; |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 483 | llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; |
| 484 | llvm::SmallBitVector ScratchRegs; |
| 485 | llvm::SmallBitVector RegsUsed; |
| 486 | SizeT NextLabelNumber; |
| 487 | bool ComputedLiveRanges; |
Jim Stichnoth | 336f6c4 | 2014-10-30 15:01:31 -0700 | [diff] [blame] | 488 | VarList PhysicalRegisters[IceType_NUM]; |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 489 | static IceString RegNames[]; |
| 490 | |
| 491 | private: |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 492 | ~TargetX8632() override {} |
Jim Stichnoth | f61d5b2 | 2014-05-23 13:31:24 -0700 | [diff] [blame] | 493 | template <typename T> void emitConstantPool() const; |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 494 | }; |
| 495 | |
Jim Stichnoth | de4ca71 | 2014-06-29 08:13:48 -0700 | [diff] [blame] | 496 | class TargetGlobalInitX8632 : public TargetGlobalInitLowering { |
Jim Stichnoth | 7b451a9 | 2014-10-15 14:39:23 -0700 | [diff] [blame] | 497 | TargetGlobalInitX8632(const TargetGlobalInitX8632 &) = delete; |
| 498 | TargetGlobalInitX8632 &operator=(const TargetGlobalInitX8632 &) = delete; |
| 499 | |
Jim Stichnoth | de4ca71 | 2014-06-29 08:13:48 -0700 | [diff] [blame] | 500 | public: |
| 501 | static TargetGlobalInitLowering *create(GlobalContext *Ctx) { |
| 502 | return new TargetGlobalInitX8632(Ctx); |
| 503 | } |
Karl Schimpf | e3f64d0 | 2014-10-07 10:38:22 -0700 | [diff] [blame] | 504 | |
Karl Schimpf | 9d98d79 | 2014-10-13 15:01:08 -0700 | [diff] [blame] | 505 | virtual void lower(const VariableDeclaration &Var) final; |
Jim Stichnoth | de4ca71 | 2014-06-29 08:13:48 -0700 | [diff] [blame] | 506 | |
| 507 | protected: |
| 508 | TargetGlobalInitX8632(GlobalContext *Ctx); |
| 509 | |
| 510 | private: |
Jim Stichnoth | b56c8f4 | 2014-09-26 09:28:46 -0700 | [diff] [blame] | 511 | ~TargetGlobalInitX8632() override {} |
Jim Stichnoth | de4ca71 | 2014-06-29 08:13:48 -0700 | [diff] [blame] | 512 | }; |
| 513 | |
Jan Voung | bc00463 | 2014-09-16 15:09:10 -0700 | [diff] [blame] | 514 | template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; |
| 515 | template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; |
Jim Stichnoth | d97c7df | 2014-06-04 11:57:08 -0700 | [diff] [blame] | 516 | template <> void ConstantFloat::emit(GlobalContext *Ctx) const; |
| 517 | template <> void ConstantDouble::emit(GlobalContext *Ctx) const; |
Jim Stichnoth | f61d5b2 | 2014-05-23 13:31:24 -0700 | [diff] [blame] | 518 | |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 519 | } // end of namespace Ice |
| 520 | |
| 521 | #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H |