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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 321993002: Add a few Subzero intrinsics (not the atomic ones yet). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: tweak test some Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file declares the TargetLoweringX8632 class, which 10 // This file declares the TargetLoweringX8632 class, which
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual void postLower(); 76 virtual void postLower();
77 77
78 virtual void lowerAlloca(const InstAlloca *Inst); 78 virtual void lowerAlloca(const InstAlloca *Inst);
79 virtual void lowerArithmetic(const InstArithmetic *Inst); 79 virtual void lowerArithmetic(const InstArithmetic *Inst);
80 virtual void lowerAssign(const InstAssign *Inst); 80 virtual void lowerAssign(const InstAssign *Inst);
81 virtual void lowerBr(const InstBr *Inst); 81 virtual void lowerBr(const InstBr *Inst);
82 virtual void lowerCall(const InstCall *Inst); 82 virtual void lowerCall(const InstCall *Inst);
83 virtual void lowerCast(const InstCast *Inst); 83 virtual void lowerCast(const InstCast *Inst);
84 virtual void lowerFcmp(const InstFcmp *Inst); 84 virtual void lowerFcmp(const InstFcmp *Inst);
85 virtual void lowerIcmp(const InstIcmp *Inst); 85 virtual void lowerIcmp(const InstIcmp *Inst);
86 virtual void lowerIntrinsicCall(const InstIntrinsicCall *Inst);
86 virtual void lowerLoad(const InstLoad *Inst); 87 virtual void lowerLoad(const InstLoad *Inst);
87 virtual void lowerPhi(const InstPhi *Inst); 88 virtual void lowerPhi(const InstPhi *Inst);
88 virtual void lowerRet(const InstRet *Inst); 89 virtual void lowerRet(const InstRet *Inst);
89 virtual void lowerSelect(const InstSelect *Inst); 90 virtual void lowerSelect(const InstSelect *Inst);
90 virtual void lowerStore(const InstStore *Inst); 91 virtual void lowerStore(const InstStore *Inst);
91 virtual void lowerSwitch(const InstSwitch *Inst); 92 virtual void lowerSwitch(const InstSwitch *Inst);
92 virtual void lowerUnreachable(const InstUnreachable *Inst); 93 virtual void lowerUnreachable(const InstUnreachable *Inst);
93 virtual void doAddressOptLoad(); 94 virtual void doAddressOptLoad();
94 virtual void doAddressOptStore(); 95 virtual void doAddressOptStore();
95 96
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 240 }
240 void _subss(Variable *Dest, Operand *Src0) { 241 void _subss(Variable *Dest, Operand *Src0) {
241 Context.insert(InstX8632Subss::create(Func, Dest, Src0)); 242 Context.insert(InstX8632Subss::create(Func, Dest, Src0));
242 } 243 }
243 void _test(Operand *Src0, Operand *Src1) { 244 void _test(Operand *Src0, Operand *Src1) {
244 Context.insert(InstX8632Test::create(Func, Src0, Src1)); 245 Context.insert(InstX8632Test::create(Func, Src0, Src1));
245 } 246 }
246 void _ucomiss(Operand *Src0, Operand *Src1) { 247 void _ucomiss(Operand *Src0, Operand *Src1) {
247 Context.insert(InstX8632Ucomiss::create(Func, Src0, Src1)); 248 Context.insert(InstX8632Ucomiss::create(Func, Src0, Src1));
248 } 249 }
250 void _ud2() {
251 Context.insert(InstX8632UD2::create(Func));
252 }
249 void _xor(Variable *Dest, Operand *Src0) { 253 void _xor(Variable *Dest, Operand *Src0) {
250 Context.insert(InstX8632Xor::create(Func, Dest, Src0)); 254 Context.insert(InstX8632Xor::create(Func, Dest, Src0));
251 } 255 }
252 256
253 bool IsEbpBasedFrame; 257 bool IsEbpBasedFrame;
254 size_t FrameSizeLocals; 258 size_t FrameSizeLocals;
255 size_t LocalsSizeBytes; 259 size_t LocalsSizeBytes;
256 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; 260 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM];
257 llvm::SmallBitVector ScratchRegs; 261 llvm::SmallBitVector ScratchRegs;
258 llvm::SmallBitVector RegsUsed; 262 llvm::SmallBitVector RegsUsed;
259 SizeT NextLabelNumber; 263 SizeT NextLabelNumber;
260 bool ComputedLiveRanges; 264 bool ComputedLiveRanges;
261 VarList PhysicalRegisters; 265 VarList PhysicalRegisters;
262 static IceString RegNames[]; 266 static IceString RegNames[];
263 267
264 private: 268 private:
265 TargetX8632(const TargetX8632 &) LLVM_DELETED_FUNCTION; 269 TargetX8632(const TargetX8632 &) LLVM_DELETED_FUNCTION;
266 TargetX8632 &operator=(const TargetX8632 &) LLVM_DELETED_FUNCTION; 270 TargetX8632 &operator=(const TargetX8632 &) LLVM_DELETED_FUNCTION;
267 virtual ~TargetX8632() {} 271 virtual ~TargetX8632() {}
268 template <typename T> void emitConstantPool() const; 272 template <typename T> void emitConstantPool() const;
269 }; 273 };
270 274
271 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 275 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
272 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 276 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
273 277
274 } // end of namespace Ice 278 } // end of namespace Ice
275 279
276 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 280 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698