John Porto | d58f01c | 2015-06-23 15:55:17 -0700 | [diff] [blame] | 1 | //===- subzero/src/IceAssemblerX8664.h - Assembler for x86-64 -*- C++ -*---===// |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 2 | // |
| 3 | // The Subzero Code Generator |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
Andrew Scull | 9612d32 | 2015-07-06 14:53:25 -0700 | [diff] [blame] | 9 | /// |
| 10 | /// \file |
| 11 | /// This file implements the Assembler class for x86-64. |
| 12 | /// |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef SUBZERO_SRC_ICEASSEMBLERX8664_H |
| 16 | #define SUBZERO_SRC_ICEASSEMBLERX8664_H |
| 17 | |
| 18 | #include "IceAssembler.h" |
John Porto | d58f01c | 2015-06-23 15:55:17 -0700 | [diff] [blame] | 19 | #include "IceDefs.h" |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 20 | |
| 21 | namespace Ice { |
| 22 | namespace X8664 { |
| 23 | |
| 24 | class AssemblerX8664 final : public Assembler { |
| 25 | AssemblerX8664(const AssemblerX8664 &) = delete; |
| 26 | AssemblerX8664 &operator=(const AssemblerX8664 &) = delete; |
| 27 | |
| 28 | public: |
John Porto | 2da710c | 2015-06-29 07:57:02 -0700 | [diff] [blame] | 29 | explicit AssemblerX8664(bool use_far_branches = false) |
| 30 | : Assembler(Asm_X8664) { |
John Porto | d58f01c | 2015-06-23 15:55:17 -0700 | [diff] [blame] | 31 | assert(!use_far_branches); |
| 32 | (void)use_far_branches; |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 33 | llvm::report_fatal_error("Not yet implemented"); |
| 34 | } |
| 35 | |
John Porto | d58f01c | 2015-06-23 15:55:17 -0700 | [diff] [blame] | 36 | ~AssemblerX8664() override = default; |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 37 | |
John Porto | d58f01c | 2015-06-23 15:55:17 -0700 | [diff] [blame] | 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; |
John Porto | 2da710c | 2015-06-29 07:57:02 -0700 | [diff] [blame] | 45 | |
| 46 | static bool classof(const Assembler *Asm) { |
| 47 | return Asm->getKind() == Asm_X8664; |
| 48 | } |
John Porto | 7e93c62 | 2015-06-23 10:58:57 -0700 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | } // end of namespace X8664 |
| 52 | } // end of namespace Ice |
| 53 | |
| 54 | #endif // SUBZERO_SRC_ICEASSEMBLERX8664_H |