| OLD | NEW |
| 1 //===- subzero/src/IceAssemblerX8664.h - Assembler for x86-64 -*- C++ -*---===// | 1 //===- subzero/src/IceAssemblerX8664.h - Assembler for x86-64 ---*- C++ -*-===// |
| 2 // | 2 // |
| 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 |
| 5 // BSD-style license that can be found in the LICENSE file. |
| 6 // |
| 7 // Modified by the Subzero authors. |
| 8 // |
| 9 //===----------------------------------------------------------------------===// |
| 10 // |
| 3 // The Subzero Code Generator | 11 // The Subzero Code Generator |
| 4 // | 12 // |
| 5 // This file is distributed under the University of Illinois Open Source | 13 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 14 // License. See LICENSE.TXT for details. |
| 7 // | 15 // |
| 8 //===----------------------------------------------------------------------===// | 16 //===----------------------------------------------------------------------===// |
| 9 /// | 17 /// |
| 10 /// \file | 18 /// \file |
| 11 /// This file implements the Assembler class for x86-64. | 19 /// This file implements the Assembler class for x86-64. |
| 12 /// | 20 /// |
| 13 //===----------------------------------------------------------------------===// | 21 //===----------------------------------------------------------------------===// |
| 14 | 22 |
| 15 #ifndef SUBZERO_SRC_ICEASSEMBLERX8664_H | 23 #ifndef SUBZERO_SRC_ICEASSEMBLERX8664_H |
| 16 #define SUBZERO_SRC_ICEASSEMBLERX8664_H | 24 #define SUBZERO_SRC_ICEASSEMBLERX8664_H |
| 17 | 25 |
| 18 #include "IceAssembler.h" | 26 #include "IceAssembler.h" |
| 27 #include "IceAssemblerX86Base.h" |
| 19 #include "IceDefs.h" | 28 #include "IceDefs.h" |
| 29 #include "IceOperand.h" |
| 30 #include "IceTargetLoweringX8664Traits.h" |
| 31 #include "IceTypes.h" |
| 32 #include "IceUtils.h" |
| 20 | 33 |
| 21 namespace Ice { | 34 namespace Ice { |
| 35 |
| 36 class TargetX8664; |
| 37 |
| 22 namespace X8664 { | 38 namespace X8664 { |
| 23 | 39 |
| 24 class AssemblerX8664 final : public Assembler { | 40 using Immediate = ::Ice::X86Internal::Immediate; |
| 41 using Label = ::Ice::X86Internal::Label; |
| 42 |
| 43 class AssemblerX8664 : public X86Internal::AssemblerX86Base<TargetX8664> { |
| 25 AssemblerX8664(const AssemblerX8664 &) = delete; | 44 AssemblerX8664(const AssemblerX8664 &) = delete; |
| 26 AssemblerX8664 &operator=(const AssemblerX8664 &) = delete; | 45 AssemblerX8664 &operator=(const AssemblerX8664 &) = delete; |
| 27 | 46 |
| 28 public: | 47 public: |
| 29 explicit AssemblerX8664(bool use_far_branches = false) | 48 explicit AssemblerX8664(bool use_far_branches = false) |
| 30 : Assembler(Asm_X8664) { | 49 : X86Internal::AssemblerX86Base<TargetX8664>(Asm_X8664, |
| 31 assert(!use_far_branches); | 50 use_far_branches) {} |
| 32 (void)use_far_branches; | |
| 33 llvm::report_fatal_error("Not yet implemented"); | |
| 34 } | |
| 35 | |
| 36 ~AssemblerX8664() override = default; | 51 ~AssemblerX8664() override = default; |
| 37 | 52 |
| 38 void alignFunction() override; | |
| 39 void padWithNop(intptr_t Padding) override; | |
| 40 SizeT getBundleAlignLog2Bytes() const override; | |
| 41 const char *getNonExecPadDirective() const override; | |
| 42 llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override; | |
| 43 void bindCfgNodeLabel(SizeT NodeNumber) override; | |
| 44 bool fixupIsPCRel(FixupKind Kind) const override; | |
| 45 | |
| 46 static bool classof(const Assembler *Asm) { | 53 static bool classof(const Assembler *Asm) { |
| 47 return Asm->getKind() == Asm_X8664; | 54 return Asm->getKind() == Asm_X8664; |
| 48 } | 55 } |
| 49 }; | 56 }; |
| 50 | 57 |
| 51 } // end of namespace X8664 | 58 } // end of namespace X8664 |
| 52 } // end of namespace Ice | 59 } // end of namespace Ice |
| 53 | 60 |
| 54 #endif // SUBZERO_SRC_ICEASSEMBLERX8664_H | 61 #endif // SUBZERO_SRC_ICEASSEMBLERX8664_H |
| OLD | NEW |