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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 476323004: Start adding an integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: make fixups part of address 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.cpp ('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
11 // implements the TargetLowering interface for the x86-32 11 // implements the TargetLowering interface for the x86-32
12 // architecture. 12 // architecture.
13 // 13 //
14 //===----------------------------------------------------------------------===// 14 //===----------------------------------------------------------------------===//
15 15
16 #ifndef SUBZERO_SRC_ICETARGETLOWERINGX8632_H 16 #ifndef SUBZERO_SRC_ICETARGETLOWERINGX8632_H
17 #define SUBZERO_SRC_ICETARGETLOWERINGX8632_H 17 #define SUBZERO_SRC_ICETARGETLOWERINGX8632_H
18 18
19 #include "IceDefs.h" 19 #include "IceDefs.h"
20 #include "IceTargetLowering.h" 20 #include "IceTargetLowering.h"
21 #include "assembler_ia32.h"
21 #include "IceInstX8632.h" 22 #include "IceInstX8632.h"
22 23
23 namespace Ice { 24 namespace Ice {
24 25
25 class TargetX8632 : public TargetLowering { 26 class TargetX8632 : public TargetLowering {
26 public: 27 public:
27 static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); } 28 static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); }
28 29
29 virtual void translateOm1(); 30 virtual void translateOm1();
30 virtual void translateO2(); 31 virtual void translateO2();
(...skipping 28 matching lines...) Expand all
59 // Ensure that a 64-bit Variable has been split into 2 32-bit 60 // Ensure that a 64-bit Variable has been split into 2 32-bit
60 // Variables, creating them if necessary. This is needed for all 61 // Variables, creating them if necessary. This is needed for all
61 // I64 operations, and it is needed for pushing F64 arguments for 62 // I64 operations, and it is needed for pushing F64 arguments for
62 // function calls using the 32-bit push instruction (though the 63 // function calls using the 32-bit push instruction (though the
63 // latter could be done by directly writing to the stack). 64 // latter could be done by directly writing to the stack).
64 void split64(Variable *Var); 65 void split64(Variable *Var);
65 void finishArgumentLowering(Variable *Arg, Variable *FramePtr, 66 void finishArgumentLowering(Variable *Arg, Variable *FramePtr,
66 size_t BasicFrameOffset, size_t &InArgsSizeBytes); 67 size_t BasicFrameOffset, size_t &InArgsSizeBytes);
67 Operand *loOperand(Operand *Operand); 68 Operand *loOperand(Operand *Operand);
68 Operand *hiOperand(Operand *Operand); 69 Operand *hiOperand(Operand *Operand);
70 x86::Address stackVarToAsmOperand(const Variable *Var) const;
69 71
70 enum Registers { 72 enum Registers {
71 #define X(val, init, name, name16, name8, scratch, preserved, stackptr, \ 73 #define X(val, init, name, name16, name8, scratch, preserved, stackptr, \
72 frameptr, isI8, isInt, isFP) \ 74 frameptr, isI8, isInt, isFP) \
73 val init, 75 val init,
74 REGX8632_TABLE 76 REGX8632_TABLE
75 #undef X 77 #undef X
76 Reg_NUM 78 Reg_NUM
77 }; 79 };
78 80
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 protected: 504 protected:
503 TargetGlobalInitX8632(GlobalContext *Ctx); 505 TargetGlobalInitX8632(GlobalContext *Ctx);
504 506
505 private: 507 private:
506 TargetGlobalInitX8632(const TargetGlobalInitX8632 &) LLVM_DELETED_FUNCTION; 508 TargetGlobalInitX8632(const TargetGlobalInitX8632 &) LLVM_DELETED_FUNCTION;
507 TargetGlobalInitX8632 & 509 TargetGlobalInitX8632 &
508 operator=(const TargetGlobalInitX8632 &) LLVM_DELETED_FUNCTION; 510 operator=(const TargetGlobalInitX8632 &) LLVM_DELETED_FUNCTION;
509 virtual ~TargetGlobalInitX8632() {} 511 virtual ~TargetGlobalInitX8632() {}
510 }; 512 };
511 513
512 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; 514 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const;
515 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const;
513 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 516 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
514 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 517 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
515 518
516 } // end of namespace Ice 519 } // end of namespace Ice
517 520
518 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 521 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698