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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 678533005: Subzero: Add basic ELFObjectWriter (text section, symtab, strtab, headers) (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: minor cleanup Created 6 years 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') | src/IceTargetLoweringX8632.cpp » ('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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 bool hasFramePointer() const override { return IsEbpBasedFrame; } 46 bool hasFramePointer() const override { return IsEbpBasedFrame; }
47 SizeT getFrameOrStackReg() const override { 47 SizeT getFrameOrStackReg() const override {
48 return IsEbpBasedFrame ? RegX8632::Reg_ebp : RegX8632::Reg_esp; 48 return IsEbpBasedFrame ? RegX8632::Reg_ebp : RegX8632::Reg_esp;
49 } 49 }
50 size_t typeWidthInBytesOnStack(Type Ty) const override { 50 size_t typeWidthInBytesOnStack(Type Ty) const override {
51 // Round up to the next multiple of 4 bytes. In particular, i1, 51 // Round up to the next multiple of 4 bytes. In particular, i1,
52 // i8, and i16 are rounded up to 4 bytes. 52 // i8, and i16 are rounded up to 4 bytes.
53 return (typeWidthInBytes(Ty) + 3) & ~3; 53 return (typeWidthInBytes(Ty) + 3) & ~3;
54 } 54 }
55 SizeT getBundleAlignLog2Bytes() const override { return 5; }
56 llvm::ArrayRef<AsmCodeByte> getNonExecBundlePadding() const override {
57 static const AsmCodeByte Padding[] = { 0xF4 };
58 return llvm::ArrayRef<AsmCodeByte>(Padding, 1);
59 }
60 void emitVariable(const Variable *Var) const override; 55 void emitVariable(const Variable *Var) const override;
61 void lowerArguments() override; 56 void lowerArguments() override;
62 void addProlog(CfgNode *Node) override; 57 void addProlog(CfgNode *Node) override;
63 void addEpilog(CfgNode *Node) override; 58 void addEpilog(CfgNode *Node) override;
64 void emitConstants() const override; 59 void emitConstants() const override;
65 SizeT makeNextLabelNumber() { return NextLabelNumber++; } 60 SizeT makeNextLabelNumber() { return NextLabelNumber++; }
66 // Ensure that a 64-bit Variable has been split into 2 32-bit 61 // Ensure that a 64-bit Variable has been split into 2 32-bit
67 // Variables, creating them if necessary. This is needed for all 62 // Variables, creating them if necessary. This is needed for all
68 // I64 operations, and it is needed for pushing F64 arguments for 63 // I64 operations, and it is needed for pushing F64 arguments for
69 // function calls using the 32-bit push instruction (though the 64 // function calls using the 32-bit push instruction (though the
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 }; 505 };
511 506
512 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; 507 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const;
513 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; 508 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const;
514 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 509 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
515 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 510 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
516 511
517 } // end of namespace Ice 512 } // end of namespace Ice
518 513
519 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 514 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698