Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: src/IceAssemblerX8664.h

Issue 1211863004: Enables llvm dyn_cast for Assemblers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceAssemblerX8632.h ('k') | src/IceCfg.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceAssemblerX8664.h - Assembler for x86-64 -*- C++ -*---===// 1 //===- subzero/src/IceAssemblerX8664.h - Assembler for x86-64 -*- C++ -*---===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file implements the Assembler class for x86-64. 10 // This file implements the Assembler class for x86-64.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 #ifndef SUBZERO_SRC_ICEASSEMBLERX8664_H 14 #ifndef SUBZERO_SRC_ICEASSEMBLERX8664_H
15 #define SUBZERO_SRC_ICEASSEMBLERX8664_H 15 #define SUBZERO_SRC_ICEASSEMBLERX8664_H
16 16
17 #include "IceAssembler.h" 17 #include "IceAssembler.h"
18 #include "IceDefs.h" 18 #include "IceDefs.h"
19 19
20 namespace Ice { 20 namespace Ice {
21 namespace X8664 { 21 namespace X8664 {
22 22
23 class AssemblerX8664 final : public Assembler { 23 class AssemblerX8664 final : public Assembler {
24 AssemblerX8664(const AssemblerX8664 &) = delete; 24 AssemblerX8664(const AssemblerX8664 &) = delete;
25 AssemblerX8664 &operator=(const AssemblerX8664 &) = delete; 25 AssemblerX8664 &operator=(const AssemblerX8664 &) = delete;
26 26
27 public: 27 public:
28 explicit AssemblerX8664(bool use_far_branches = false) : Assembler() { 28 explicit AssemblerX8664(bool use_far_branches = false)
29 : Assembler(Asm_X8664) {
29 assert(!use_far_branches); 30 assert(!use_far_branches);
30 (void)use_far_branches; 31 (void)use_far_branches;
31 llvm::report_fatal_error("Not yet implemented"); 32 llvm::report_fatal_error("Not yet implemented");
32 } 33 }
33 34
34 ~AssemblerX8664() override = default; 35 ~AssemblerX8664() override = default;
35 36
36 void alignFunction() override; 37 void alignFunction() override;
37 void padWithNop(intptr_t Padding) override; 38 void padWithNop(intptr_t Padding) override;
38 SizeT getBundleAlignLog2Bytes() const override; 39 SizeT getBundleAlignLog2Bytes() const override;
39 const char *getNonExecPadDirective() const override; 40 const char *getNonExecPadDirective() const override;
40 llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override; 41 llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override;
41 void bindCfgNodeLabel(SizeT NodeNumber) override; 42 void bindCfgNodeLabel(SizeT NodeNumber) override;
42 bool fixupIsPCRel(FixupKind Kind) const override; 43 bool fixupIsPCRel(FixupKind Kind) const override;
44
45 static bool classof(const Assembler *Asm) {
46 return Asm->getKind() == Asm_X8664;
47 }
43 }; 48 };
44 49
45 } // end of namespace X8664 50 } // end of namespace X8664
46 } // end of namespace Ice 51 } // end of namespace Ice
47 52
48 #endif // SUBZERO_SRC_ICEASSEMBLERX8664_H 53 #endif // SUBZERO_SRC_ICEASSEMBLERX8664_H
OLDNEW
« no previous file with comments | « src/IceAssemblerX8632.h ('k') | src/IceCfg.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698