John Porto | 2fea26c | 2015-07-28 16:28:07 -0700 | [diff] [blame^] | 1 | //===- subzero/src/IceAssemblerX8664.h - Assembler for x86-64 ---*- C++ -*-===// |
| 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 | //===----------------------------------------------------------------------===// |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 10 | // |
| 11 | // The Subzero Code Generator |
| 12 | // |
| 13 | // This file is distributed under the University of Illinois Open Source |
| 14 | // License. See LICENSE.TXT for details. |
| 15 | // |
| 16 | //===----------------------------------------------------------------------===// |
Andrew Scull | 9612d32 | 2015-07-06 14:53:25 -0700 | [diff] [blame] | 17 | /// |
| 18 | /// \file |
| 19 | /// This file implements the Assembler class for x86-64. |
| 20 | /// |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 21 | //===----------------------------------------------------------------------===// |
| 22 | |
| 23 | #ifndef SUBZERO_SRC_ICEASSEMBLERX8664_H |
| 24 | #define SUBZERO_SRC_ICEASSEMBLERX8664_H |
| 25 | |
| 26 | #include "IceAssembler.h" |
John Porto | 2fea26c | 2015-07-28 16:28:07 -0700 | [diff] [blame^] | 27 | #include "IceAssemblerX86Base.h" |
John Porto | d58f01c | 2015-06-23 15:55:17 -0700 | [diff] [blame] | 28 | #include "IceDefs.h" |
John Porto | 2fea26c | 2015-07-28 16:28:07 -0700 | [diff] [blame^] | 29 | #include "IceOperand.h" |
| 30 | #include "IceTargetLoweringX8664Traits.h" |
| 31 | #include "IceTypes.h" |
| 32 | #include "IceUtils.h" |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 33 | |
| 34 | namespace Ice { |
John Porto | 2fea26c | 2015-07-28 16:28:07 -0700 | [diff] [blame^] | 35 | |
| 36 | class TargetX8664; |
| 37 | |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 38 | namespace X8664 { |
| 39 | |
John Porto | 2fea26c | 2015-07-28 16:28:07 -0700 | [diff] [blame^] | 40 | using Immediate = ::Ice::X86Internal::Immediate; |
| 41 | using Label = ::Ice::X86Internal::Label; |
| 42 | |
| 43 | class AssemblerX8664 : public X86Internal::AssemblerX86Base<TargetX8664> { |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 44 | AssemblerX8664(const AssemblerX8664 &) = delete; |
| 45 | AssemblerX8664 &operator=(const AssemblerX8664 &) = delete; |
| 46 | |
| 47 | public: |
John Porto | 2da710c | 2015-06-29 07:57:02 -0700 | [diff] [blame] | 48 | explicit AssemblerX8664(bool use_far_branches = false) |
John Porto | 2fea26c | 2015-07-28 16:28:07 -0700 | [diff] [blame^] | 49 | : X86Internal::AssemblerX86Base<TargetX8664>(Asm_X8664, |
| 50 | use_far_branches) {} |
John Porto | d58f01c | 2015-06-23 15:55:17 -0700 | [diff] [blame] | 51 | ~AssemblerX8664() override = default; |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 52 | |
John Porto | 2da710c | 2015-06-29 07:57:02 -0700 | [diff] [blame] | 53 | static bool classof(const Assembler *Asm) { |
| 54 | return Asm->getKind() == Asm_X8664; |
| 55 | } |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 56 | }; |
| 57 | |
| 58 | } // end of namespace X8664 |
| 59 | } // end of namespace Ice |
| 60 | |
| 61 | #endif // SUBZERO_SRC_ICEASSEMBLERX8664_H |