OLD | NEW |
1 //===- subzero/src/IceAssemblerARM32.h - Assembler for ARM32 ----*- C++ -*-===// | 1 //===- subzero/src/IceAssemblerARM32.h - Assembler for ARM32 ----*- C++ -*-===// |
2 // | 2 // |
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
6 // | 6 // |
7 // Modified by the Subzero authors. | 7 // Modified by the Subzero authors. |
8 // | 8 // |
9 //===----------------------------------------------------------------------===// | 9 //===----------------------------------------------------------------------===// |
10 // | 10 // |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 public: | 88 public: |
89 TargetInfo(bool HasFramePointer, RegNumT FrameOrStackReg) | 89 TargetInfo(bool HasFramePointer, RegNumT FrameOrStackReg) |
90 : HasFramePointer(HasFramePointer), FrameOrStackReg(FrameOrStackReg) {} | 90 : HasFramePointer(HasFramePointer), FrameOrStackReg(FrameOrStackReg) {} |
91 explicit TargetInfo(const TargetLowering *Target) | 91 explicit TargetInfo(const TargetLowering *Target) |
92 : HasFramePointer(Target->hasFramePointer()), | 92 : HasFramePointer(Target->hasFramePointer()), |
93 FrameOrStackReg(Target->getFrameOrStackReg()) {} | 93 FrameOrStackReg(Target->getFrameOrStackReg()) {} |
94 const bool HasFramePointer; | 94 const bool HasFramePointer; |
95 const RegNumT FrameOrStackReg; | 95 const RegNumT FrameOrStackReg; |
96 }; | 96 }; |
97 | 97 |
98 explicit AssemblerARM32(bool use_far_branches = false) | 98 explicit AssemblerARM32(bool IsNonsfi, bool use_far_branches = false) |
99 : Assembler(Asm_ARM32) { | 99 : Assembler(Asm_ARM32), IsNonsfi(IsNonsfi) { |
100 // TODO(kschimpf): Add mode if needed when branches are handled. | 100 // TODO(kschimpf): Add mode if needed when branches are handled. |
101 (void)use_far_branches; | 101 (void)use_far_branches; |
102 } | 102 } |
103 ~AssemblerARM32() override { | 103 ~AssemblerARM32() override { |
104 if (BuildDefs::asserts()) { | 104 if (BuildDefs::asserts()) { |
105 for (const Label *Label : CfgNodeLabels) { | 105 for (const Label *Label : CfgNodeLabels) { |
106 Label->finalCheck(); | 106 Label->finalCheck(); |
107 } | 107 } |
108 for (const Label *Label : LocalLabels) { | 108 for (const Label *Label : LocalLabels) { |
109 Label->finalCheck(); | 109 Label->finalCheck(); |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 | 544 |
545 static bool classof(const Assembler *Asm) { | 545 static bool classof(const Assembler *Asm) { |
546 return Asm->getKind() == Asm_ARM32; | 546 return Asm->getKind() == Asm_ARM32; |
547 } | 547 } |
548 | 548 |
549 void emitTextInst(const std::string &Text, SizeT InstSize); | 549 void emitTextInst(const std::string &Text, SizeT InstSize); |
550 | 550 |
551 private: | 551 private: |
552 ENABLE_MAKE_UNIQUE; | 552 ENABLE_MAKE_UNIQUE; |
553 | 553 |
| 554 const bool IsNonsfi; |
| 555 |
554 // A vector of pool-allocated x86 labels for CFG nodes. | 556 // A vector of pool-allocated x86 labels for CFG nodes. |
555 using LabelVector = std::vector<Label *>; | 557 using LabelVector = std::vector<Label *>; |
556 LabelVector CfgNodeLabels; | 558 LabelVector CfgNodeLabels; |
557 // A vector of pool-allocated x86 labels for Local labels. | 559 // A vector of pool-allocated x86 labels for Local labels. |
558 LabelVector LocalLabels; | 560 LabelVector LocalLabels; |
559 // Number of bytes emitted by InstARM32::emit() methods, when run inside | 561 // Number of bytes emitted by InstARM32::emit() methods, when run inside |
560 // InstARM32::emitUsingTextFixup(). | 562 // InstARM32::emitUsingTextFixup(). |
561 size_t EmitTextSize = 0; | 563 size_t EmitTextSize = 0; |
562 | 564 |
563 // Load/store multiple addressing mode. | 565 // Load/store multiple addressing mode. |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 | 742 |
741 void emitVFPsss(CondARM32::Cond Cond, IValueT Opcode, const Operand *OpSd, | 743 void emitVFPsss(CondARM32::Cond Cond, IValueT Opcode, const Operand *OpSd, |
742 const Operand *OpSn, const Operand *OpSm, | 744 const Operand *OpSn, const Operand *OpSm, |
743 const char *InstName); | 745 const char *InstName); |
744 }; | 746 }; |
745 | 747 |
746 } // end of namespace ARM32 | 748 } // end of namespace ARM32 |
747 } // end of namespace Ice | 749 } // end of namespace Ice |
748 | 750 |
749 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H | 751 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H |
OLD | NEW |