blob: f2ffd7f4ee48ede97d9421f2dc5e5894788022e7 [file] [log] [blame]
John Portod58f01c2015-06-23 15:55:17 -07001//===- subzero/src/IceAssemblerX8664.h - Assembler for x86-64 -*- C++ -*---===//
John Porto7e93c622015-06-23 10:58:57 -07002//
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 Scull9612d322015-07-06 14:53:25 -07009///
10/// \file
11/// This file implements the Assembler class for x86-64.
12///
John Porto7e93c622015-06-23 10:58:57 -070013//===----------------------------------------------------------------------===//
14
15#ifndef SUBZERO_SRC_ICEASSEMBLERX8664_H
16#define SUBZERO_SRC_ICEASSEMBLERX8664_H
17
18#include "IceAssembler.h"
John Portod58f01c2015-06-23 15:55:17 -070019#include "IceDefs.h"
John Porto7e93c622015-06-23 10:58:57 -070020
21namespace Ice {
22namespace X8664 {
23
24class AssemblerX8664 final : public Assembler {
25 AssemblerX8664(const AssemblerX8664 &) = delete;
26 AssemblerX8664 &operator=(const AssemblerX8664 &) = delete;
27
28public:
John Porto2da710c2015-06-29 07:57:02 -070029 explicit AssemblerX8664(bool use_far_branches = false)
30 : Assembler(Asm_X8664) {
John Portod58f01c2015-06-23 15:55:17 -070031 assert(!use_far_branches);
32 (void)use_far_branches;
John Porto7e93c622015-06-23 10:58:57 -070033 llvm::report_fatal_error("Not yet implemented");
34 }
35
John Portod58f01c2015-06-23 15:55:17 -070036 ~AssemblerX8664() override = default;
John Porto7e93c622015-06-23 10:58:57 -070037
John Portod58f01c2015-06-23 15:55:17 -070038 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 Porto2da710c2015-06-29 07:57:02 -070045
46 static bool classof(const Assembler *Asm) {
47 return Asm->getKind() == Asm_X8664;
48 }
John Porto7e93c622015-06-23 10:58:57 -070049};
50
51} // end of namespace X8664
52} // end of namespace Ice
53
54#endif // SUBZERO_SRC_ICEASSEMBLERX8664_H