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

Side by Side Diff: src/IceTargetLoweringX86Base.h

Issue 1543573002: Subzero. X8664. Fixes filetype=asm. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: git pull Created 4 years, 12 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
« no previous file with comments | « src/IceTargetLoweringX8664Traits.h ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 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 /// \file 10 /// \file
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 /// Copy memory of given type from Src to Dest using OffsetAmt on both. 215 /// Copy memory of given type from Src to Dest using OffsetAmt on both.
216 void copyMemory(Type Ty, Variable *Dest, Variable *Src, int32_t OffsetAmt); 216 void copyMemory(Type Ty, Variable *Dest, Variable *Src, int32_t OffsetAmt);
217 /// Replace some calls to memcpy with inline instructions. 217 /// Replace some calls to memcpy with inline instructions.
218 void lowerMemcpy(Operand *Dest, Operand *Src, Operand *Count); 218 void lowerMemcpy(Operand *Dest, Operand *Src, Operand *Count);
219 /// Replace some calls to memmove with inline instructions. 219 /// Replace some calls to memmove with inline instructions.
220 void lowerMemmove(Operand *Dest, Operand *Src, Operand *Count); 220 void lowerMemmove(Operand *Dest, Operand *Src, Operand *Count);
221 /// Replace some calls to memset with inline instructions. 221 /// Replace some calls to memset with inline instructions.
222 void lowerMemset(Operand *Dest, Operand *Val, Operand *Count); 222 void lowerMemset(Operand *Dest, Operand *Val, Operand *Count);
223 223
224 /// Lower an indirect jump adding sandboxing when needed. 224 /// Lower an indirect jump adding sandboxing when needed.
225 void lowerIndirectJump(Variable *Target); 225 void lowerIndirectJump(Variable *JumpTarget);
226 226
227 /// Check the comparison is in [Min,Max]. The flags register will be modified 227 /// Check the comparison is in [Min,Max]. The flags register will be modified
228 /// with: 228 /// with:
229 /// - below equal, if in range 229 /// - below equal, if in range
230 /// - above, set if not in range 230 /// - above, set if not in range
231 /// The index into the range is returned. 231 /// The index into the range is returned.
232 Operand *lowerCmpRange(Operand *Comparison, uint64_t Min, uint64_t Max); 232 Operand *lowerCmpRange(Operand *Comparison, uint64_t Min, uint64_t Max);
233 /// Lowering of a cluster of switch cases. If the case is not matched control 233 /// Lowering of a cluster of switch cases. If the case is not matched control
234 /// will pass to the default label provided. If the default label is nullptr 234 /// will pass to the default label provided. If the default label is nullptr
235 /// then control will fall through to the next instruction. DoneCmp should be 235 /// then control will fall through to the next instruction. DoneCmp should be
236 /// true if the flags contain the result of a comparison with the Comparison. 236 /// true if the flags contain the result of a comparison with the Comparison.
237 void lowerCaseCluster(const CaseCluster &Case, Operand *Src0, bool DoneCmp, 237 void lowerCaseCluster(const CaseCluster &Case, Operand *Src0, bool DoneCmp,
238 CfgNode *DefaultLabel = nullptr); 238 CfgNode *DefaultLabel = nullptr);
239 239
240 using LowerBinOp = void (TargetX86Base::*)(Variable *, Operand *); 240 using LowerBinOp = void (TargetX86Base::*)(Variable *, Operand *);
241 void expandAtomicRMWAsCmpxchg(LowerBinOp op_lo, LowerBinOp op_hi, 241 void expandAtomicRMWAsCmpxchg(LowerBinOp op_lo, LowerBinOp op_hi,
242 Variable *Dest, Operand *Ptr, Operand *Val); 242 Variable *Dest, Operand *Ptr, Operand *Val);
243 243
244 void eliminateNextVectorSextInstruction(Variable *SignExtendedResult); 244 void eliminateNextVectorSextInstruction(Variable *SignExtendedResult);
245 245
246 void scalarizeArithmetic(InstArithmetic::OpKind K, Variable *Dest, 246 void scalarizeArithmetic(InstArithmetic::OpKind K, Variable *Dest,
247 Operand *Src0, Operand *Src1); 247 Operand *Src0, Operand *Src1);
248 248
249 /// Emit a fake use of esp to make sure esp stays alive for the entire 249 /// Emit a fake use of esp to make sure esp stays alive for the entire
250 /// function. Otherwise some esp adjustments get dead-code eliminated. 250 /// function. Otherwise some esp adjustments get dead-code eliminated.
251 void keepEspLiveAtExit() { 251 void keepEspLiveAtExit() {
252 Variable *esp = Func->getTarget()->getPhysicalRegister(getStackReg()); 252 Variable *esp =
253 Func->getTarget()->getPhysicalRegister(getStackReg(), Traits::WordType);
253 Context.insert<InstFakeUse>(esp); 254 Context.insert<InstFakeUse>(esp);
254 } 255 }
255 256
256 /// Operand legalization helpers. To deal with address mode constraints, the 257 /// Operand legalization helpers. To deal with address mode constraints, the
257 /// helpers will create a new Operand and emit instructions that guarantee 258 /// helpers will create a new Operand and emit instructions that guarantee
258 /// that the Operand kind is one of those indicated by the LegalMask (a 259 /// that the Operand kind is one of those indicated by the LegalMask (a
259 /// bitmask of allowed kinds). If the input Operand is known to already meet 260 /// bitmask of allowed kinds). If the input Operand is known to already meet
260 /// the constraints, it may be simply returned as the result, without creating 261 /// the constraints, it may be simply returned as the result, without creating
261 /// any new instructions or operands. 262 /// any new instructions or operands.
262 enum OperandLegalization { 263 enum OperandLegalization {
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 lowerIcmp64(const InstIcmp *Icmp, const Inst *Consumer); 812 lowerIcmp64(const InstIcmp *Icmp, const Inst *Consumer);
812 813
813 BoolFolding FoldingInfo; 814 BoolFolding FoldingInfo;
814 }; 815 };
815 } // end of namespace X86Internal 816 } // end of namespace X86Internal
816 } // end of namespace Ice 817 } // end of namespace Ice
817 818
818 #include "IceTargetLoweringX86BaseImpl.h" 819 #include "IceTargetLoweringX86BaseImpl.h"
819 820
820 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H 821 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8664Traits.h ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698