| OLD | NEW |
| 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 #include "IceRegistersX8632.h" | 23 #include "IceRegistersX8632.h" |
| 23 | 24 |
| 24 namespace Ice { | 25 namespace Ice { |
| 25 | 26 |
| 26 class TargetX8632 : public TargetLowering { | 27 class TargetX8632 : public TargetLowering { |
| 27 public: | 28 public: |
| 28 static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); } | 29 static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); } |
| 29 | 30 |
| 30 virtual void translateOm1(); | 31 virtual void translateOm1(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 61 // Ensure that a 64-bit Variable has been split into 2 32-bit | 62 // Ensure that a 64-bit Variable has been split into 2 32-bit |
| 62 // Variables, creating them if necessary. This is needed for all | 63 // Variables, creating them if necessary. This is needed for all |
| 63 // I64 operations, and it is needed for pushing F64 arguments for | 64 // I64 operations, and it is needed for pushing F64 arguments for |
| 64 // function calls using the 32-bit push instruction (though the | 65 // function calls using the 32-bit push instruction (though the |
| 65 // latter could be done by directly writing to the stack). | 66 // latter could be done by directly writing to the stack). |
| 66 void split64(Variable *Var); | 67 void split64(Variable *Var); |
| 67 void finishArgumentLowering(Variable *Arg, Variable *FramePtr, | 68 void finishArgumentLowering(Variable *Arg, Variable *FramePtr, |
| 68 size_t BasicFrameOffset, size_t &InArgsSizeBytes); | 69 size_t BasicFrameOffset, size_t &InArgsSizeBytes); |
| 69 Operand *loOperand(Operand *Operand); | 70 Operand *loOperand(Operand *Operand); |
| 70 Operand *hiOperand(Operand *Operand); | 71 Operand *hiOperand(Operand *Operand); |
| 72 x86::Address stackVarToAsmOperand(const Variable *Var) const; |
| 71 | 73 |
| 72 enum X86InstructionSet { | 74 enum X86InstructionSet { |
| 73 // SSE2 is the PNaCl baseline instruction set. | 75 // SSE2 is the PNaCl baseline instruction set. |
| 74 SSE2, | 76 SSE2, |
| 75 SSE4_1 | 77 SSE4_1 |
| 76 }; | 78 }; |
| 77 | 79 |
| 78 X86InstructionSet getInstructionSet() const { return InstructionSet; } | 80 X86InstructionSet getInstructionSet() const { return InstructionSet; } |
| 79 | 81 |
| 80 protected: | 82 protected: |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 }; | 505 }; |
| 504 | 506 |
| 505 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; | 507 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; |
| 506 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; | 508 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; |
| 507 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; | 509 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; |
| 508 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; | 510 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; |
| 509 | 511 |
| 510 } // end of namespace Ice | 512 } // end of namespace Ice |
| 511 | 513 |
| 512 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H | 514 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
| OLD | NEW |