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

Side by Side Diff: src/IceTargetLoweringX86Base.h

Issue 1266673003: Subzero. Implements x86-64 lowerCall. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: git pull && addresses comments && git format Created 5 years, 4 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return TypeToRegisterSet[Ty]; 76 return TypeToRegisterSet[Ty];
77 } 77 }
78 bool hasFramePointer() const override { return IsEbpBasedFrame; } 78 bool hasFramePointer() const override { return IsEbpBasedFrame; }
79 SizeT getFrameOrStackReg() const override { 79 SizeT getFrameOrStackReg() const override {
80 return IsEbpBasedFrame ? Traits::RegisterSet::Reg_ebp 80 return IsEbpBasedFrame ? Traits::RegisterSet::Reg_ebp
81 : Traits::RegisterSet::Reg_esp; 81 : Traits::RegisterSet::Reg_esp;
82 } 82 }
83 size_t typeWidthInBytesOnStack(Type Ty) const override { 83 size_t typeWidthInBytesOnStack(Type Ty) const override {
84 // Round up to the next multiple of 4 bytes. In particular, i1, 84 // Round up to the next multiple of 4 bytes. In particular, i1,
85 // i8, and i16 are rounded up to 4 bytes. 85 // i8, and i16 are rounded up to 4 bytes.
86 // TODO(jpp): this needs to round to multiples of 8 bytes in x86-64.
86 return (typeWidthInBytes(Ty) + 3) & ~3; 87 return (typeWidthInBytes(Ty) + 3) & ~3;
87 } 88 }
88 89
89 SizeT getMinJumpTableSize() const override { return 4; } 90 SizeT getMinJumpTableSize() const override { return 4; }
90 91
91 void emitVariable(const Variable *Var) const override; 92 void emitVariable(const Variable *Var) const override;
92 93
93 const char *getConstantPrefix() const final { return "$"; } 94 const char *getConstantPrefix() const final { return "$"; }
94 void emit(const ConstantUndef *C) const final; 95 void emit(const ConstantUndef *C) const final;
95 void emit(const ConstantInteger32 *C) const final; 96 void emit(const ConstantInteger32 *C) const final;
(...skipping 24 matching lines...) Expand all
120 121
121 protected: 122 protected:
122 explicit TargetX86Base(Cfg *Func); 123 explicit TargetX86Base(Cfg *Func);
123 124
124 void postLower() override; 125 void postLower() override;
125 126
126 void lowerAlloca(const InstAlloca *Inst) override; 127 void lowerAlloca(const InstAlloca *Inst) override;
127 void lowerArithmetic(const InstArithmetic *Inst) override; 128 void lowerArithmetic(const InstArithmetic *Inst) override;
128 void lowerAssign(const InstAssign *Inst) override; 129 void lowerAssign(const InstAssign *Inst) override;
129 void lowerBr(const InstBr *Inst) override; 130 void lowerBr(const InstBr *Inst) override;
130 void lowerCall(const InstCall *Inst) override;
131 void lowerCast(const InstCast *Inst) override; 131 void lowerCast(const InstCast *Inst) override;
132 void lowerExtractElement(const InstExtractElement *Inst) override; 132 void lowerExtractElement(const InstExtractElement *Inst) override;
133 void lowerFcmp(const InstFcmp *Inst) override; 133 void lowerFcmp(const InstFcmp *Inst) override;
134 void lowerIcmp(const InstIcmp *Inst) override; 134 void lowerIcmp(const InstIcmp *Inst) override;
135 void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override; 135 void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override;
136 void lowerInsertElement(const InstInsertElement *Inst) override; 136 void lowerInsertElement(const InstInsertElement *Inst) override;
137 void lowerLoad(const InstLoad *Inst) override; 137 void lowerLoad(const InstLoad *Inst) override;
138 void lowerPhi(const InstPhi *Inst) override; 138 void lowerPhi(const InstPhi *Inst) override;
139 void lowerRet(const InstRet *Inst) override; 139 void lowerRet(const InstRet *Inst) override;
140 void lowerSelect(const InstSelect *Inst) override; 140 void lowerSelect(const InstSelect *Inst) override;
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 } 627 }
628 628
629 BoolFolding FoldingInfo; 629 BoolFolding FoldingInfo;
630 }; 630 };
631 } // end of namespace X86Internal 631 } // end of namespace X86Internal
632 } // end of namespace Ice 632 } // end of namespace Ice
633 633
634 #include "IceTargetLoweringX86BaseImpl.h" 634 #include "IceTargetLoweringX86BaseImpl.h"
635 635
636 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H 636 #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