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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 515993002: Align function starts to target-specific bundle alignment. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: uint8_t Created 6 years, 3 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/IceTargetLowering.h ('k') | tests_lit/lit.cfg » ('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/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 27 matching lines...) Expand all
38 } 38 }
39 virtual bool hasFramePointer() const { return IsEbpBasedFrame; } 39 virtual bool hasFramePointer() const { return IsEbpBasedFrame; }
40 virtual SizeT getFrameOrStackReg() const { 40 virtual SizeT getFrameOrStackReg() const {
41 return IsEbpBasedFrame ? Reg_ebp : Reg_esp; 41 return IsEbpBasedFrame ? Reg_ebp : Reg_esp;
42 } 42 }
43 virtual size_t typeWidthInBytesOnStack(Type Ty) const { 43 virtual size_t typeWidthInBytesOnStack(Type Ty) const {
44 // Round up to the next multiple of 4 bytes. In particular, i1, 44 // Round up to the next multiple of 4 bytes. In particular, i1,
45 // i8, and i16 are rounded up to 4 bytes. 45 // i8, and i16 are rounded up to 4 bytes.
46 return (typeWidthInBytes(Ty) + 3) & ~3; 46 return (typeWidthInBytes(Ty) + 3) & ~3;
47 } 47 }
48 virtual SizeT getBundleAlignLog2Bytes() const { return 5; }
49 virtual llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const {
50 static const uint8_t Padding[] = { 0xF4 };
51 return llvm::ArrayRef<uint8_t>(Padding, 1);
52 }
48 virtual void emitVariable(const Variable *Var, const Cfg *Func) const; 53 virtual void emitVariable(const Variable *Var, const Cfg *Func) const;
49 virtual void lowerArguments(); 54 virtual void lowerArguments();
50 virtual void addProlog(CfgNode *Node); 55 virtual void addProlog(CfgNode *Node);
51 virtual void addEpilog(CfgNode *Node); 56 virtual void addEpilog(CfgNode *Node);
52 virtual void emitConstants() const; 57 virtual void emitConstants() const;
53 SizeT makeNextLabelNumber() { return NextLabelNumber++; } 58 SizeT makeNextLabelNumber() { return NextLabelNumber++; }
54 // Ensure that a 64-bit Variable has been split into 2 32-bit 59 // Ensure that a 64-bit Variable has been split into 2 32-bit
55 // Variables, creating them if necessary. This is needed for all 60 // Variables, creating them if necessary. This is needed for all
56 // I64 operations, and it is needed for pushing F64 arguments for 61 // I64 operations, and it is needed for pushing F64 arguments for
57 // function calls using the 32-bit push instruction (though the 62 // function calls using the 32-bit push instruction (though the
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 virtual ~TargetGlobalInitX8632() {} 504 virtual ~TargetGlobalInitX8632() {}
500 }; 505 };
501 506
502 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; 507 template <> void ConstantInteger::emit(GlobalContext *Ctx) const;
503 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 508 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
504 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 509 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
505 510
506 } // end of namespace Ice 511 } // end of namespace Ice
507 512
508 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 513 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW
« no previous file with comments | « src/IceTargetLowering.h ('k') | tests_lit/lit.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698