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

Side by Side Diff: src/IceAssemblerMIPS32.h

Issue 1211863004: Enables llvm dyn_cast for Assemblers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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
OLDNEW
1 //===- subzero/src/assembler_mips.h - Assembler for MIPS --------*- C++ -*-===// 1 //===- subzero/src/assembler_mips.h - Assembler for MIPS --------*- C++ -*-===//
Jim Stichnoth 2015/06/27 13:52:19 Update the filename. BTW, Reed was doing this ren
John 2015/06/29 14:56:02 Yeah, I thought about not renaming the file, but i
2 // 2 //
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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. 5 // BSD-style license that can be found in the LICENSE file.
6 // 6 //
7 // Modified by the Subzero authors. 7 // Modified by the Subzero authors.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 // 10 //
11 // The Subzero Code Generator 11 // The Subzero Code Generator
12 // 12 //
13 // This file is distributed under the University of Illinois Open Source 13 // This file is distributed under the University of Illinois Open Source
14 // License. See LICENSE.TXT for details. 14 // License. See LICENSE.TXT for details.
15 // 15 //
16 //===----------------------------------------------------------------------===// 16 //===----------------------------------------------------------------------===//
17 // 17 //
18 // This file implements the Assembler class for MIPS32. 18 // This file implements the Assembler class for MIPS32.
19 // 19 //
20 //===----------------------------------------------------------------------===// 20 //===----------------------------------------------------------------------===//
21 21
22 #ifndef SUBZERO_SRC_ASSEMBLER_MIPS32_H 22 #ifndef SUBZERO_SRC_ASSEMBLER_MIPS32_H
Jim Stichnoth 2015/06/27 13:52:20 Update the guard to the new filename
John 2015/06/29 14:56:02 Done.
23 #define SUBZERO_SRC_ASSEMBLER_MIPS32_H 23 #define SUBZERO_SRC_ASSEMBLER_MIPS32_H
24 24
25 #include "IceAssembler.h" 25 #include "IceAssembler.h"
26 #include "IceDefs.h" 26 #include "IceDefs.h"
27 #include "IceFixups.h" 27 #include "IceFixups.h"
28 28
29 namespace Ice { 29 namespace Ice {
30 namespace MIPS32 { 30 namespace MIPS32 {
31 31
32 class AssemblerMIPS32 : public Assembler { 32 class AssemblerMIPS32 : public Assembler {
33 AssemblerMIPS32(const AssemblerMIPS32 &) = delete; 33 AssemblerMIPS32(const AssemblerMIPS32 &) = delete;
34 AssemblerMIPS32 &operator=(const AssemblerMIPS32 &) = delete; 34 AssemblerMIPS32 &operator=(const AssemblerMIPS32 &) = delete;
35 35
36 public: 36 public:
37 explicit AssemblerMIPS32(bool use_far_branches = false) : Assembler() { 37 explicit AssemblerMIPS32(bool use_far_branches = false)
38 : Assembler(Asm_MIPS32) {
38 // This mode is only needed and implemented for MIPS32 and ARM. 39 // This mode is only needed and implemented for MIPS32 and ARM.
39 assert(!use_far_branches); 40 assert(!use_far_branches);
40 (void)use_far_branches; 41 (void)use_far_branches;
41 } 42 }
42 ~AssemblerMIPS32() override = default; 43 ~AssemblerMIPS32() override = default;
43 44
44 void alignFunction() override { 45 void alignFunction() override {
45 llvm::report_fatal_error("Not yet implemented."); 46 llvm::report_fatal_error("Not yet implemented.");
46 } 47 }
47 48
(...skipping 12 matching lines...) Expand all
60 61
61 void bindCfgNodeLabel(SizeT NodeNumber) override { 62 void bindCfgNodeLabel(SizeT NodeNumber) override {
62 (void)NodeNumber; 63 (void)NodeNumber;
63 llvm::report_fatal_error("Not yet implemented."); 64 llvm::report_fatal_error("Not yet implemented.");
64 } 65 }
65 66
66 bool fixupIsPCRel(FixupKind Kind) const override { 67 bool fixupIsPCRel(FixupKind Kind) const override {
67 (void)Kind; 68 (void)Kind;
68 llvm::report_fatal_error("Not yet implemented."); 69 llvm::report_fatal_error("Not yet implemented.");
69 } 70 }
71
72 static bool classof(const Assembler *Asm) {
73 return Asm->getKind() == Asm_ARM32;
Jim Stichnoth 2015/06/27 13:52:19 Asm_MIPS32
John 2015/06/29 14:56:02 Done.
74 }
70 }; 75 };
71 76
72 } // end of namespace MIPS32 77 } // end of namespace MIPS32
73 } // end of namespace Ice 78 } // end of namespace Ice
74 79
75 #endif // SUBZERO_SRC_ASSEMBLER_MIPS32_H 80 #endif // SUBZERO_SRC_ASSEMBLER_MIPS32_H
OLDNEW
« src/IceAssemblerARM32.h ('K') | « src/IceAssemblerARM32.h ('k') | src/IceAssemblerX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698