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

Unified 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: Addresses comments. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceAssemblerARM32.h ('k') | src/IceAssemblerX8632.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceAssemblerMIPS32.h
diff --git a/src/assembler_mips32.h b/src/IceAssemblerMIPS32.h
similarity index 84%
rename from src/assembler_mips32.h
rename to src/IceAssemblerMIPS32.h
index b5bca57210104f5cdff50eedcafdbceb03cf8dc6..fc83919d3566b3b3b334f0e1707bed40fcceb18d 100644
--- a/src/assembler_mips32.h
+++ b/src/IceAssemblerMIPS32.h
@@ -1,4 +1,4 @@
-//===- subzero/src/assembler_mips.h - Assembler for MIPS --------*- C++ -*-===//
+//===- subzero/src/IceAssemblerMIPS32.h - Assembler for MIPS ----*- C++ -*-===//
//
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -19,8 +19,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef SUBZERO_SRC_ASSEMBLER_MIPS32_H
-#define SUBZERO_SRC_ASSEMBLER_MIPS32_H
+#ifndef SUBZERO_SRC_ICEASSEMBLERMIPS32_H
+#define SUBZERO_SRC_ICEASSEMBLERMIPS32_H
#include "IceAssembler.h"
#include "IceDefs.h"
@@ -34,7 +34,8 @@ class AssemblerMIPS32 : public Assembler {
AssemblerMIPS32 &operator=(const AssemblerMIPS32 &) = delete;
public:
- explicit AssemblerMIPS32(bool use_far_branches = false) : Assembler() {
+ explicit AssemblerMIPS32(bool use_far_branches = false)
+ : Assembler(Asm_MIPS32) {
// This mode is only needed and implemented for MIPS32 and ARM.
assert(!use_far_branches);
(void)use_far_branches;
@@ -67,9 +68,13 @@ public:
(void)Kind;
llvm::report_fatal_error("Not yet implemented.");
}
+
+ static bool classof(const Assembler *Asm) {
+ return Asm->getKind() == Asm_MIPS32;
+ }
};
} // end of namespace MIPS32
} // end of namespace Ice
-#endif // SUBZERO_SRC_ASSEMBLER_MIPS32_H
+#endif // SUBZERO_SRC_ICEASSEMBLERMIPS32_H
« no previous file with comments | « src/IceAssemblerARM32.h ('k') | src/IceAssemblerX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698