Jim Stichnoth | 6da4cef | 2015-06-11 13:26:33 -0700 | [diff] [blame] | 1 | //===- subzero/src/assembler_mips.h - Assembler for MIPS --------*- C++ -*-===// |
| 2 | // |
| 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 |
| 5 | // BSD-style license that can be found in the LICENSE file. |
| 6 | // |
| 7 | // Modified by the Subzero authors. |
| 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | // |
| 11 | // The Subzero Code Generator |
| 12 | // |
| 13 | // This file is distributed under the University of Illinois Open Source |
| 14 | // License. See LICENSE.TXT for details. |
| 15 | // |
| 16 | //===----------------------------------------------------------------------===// |
| 17 | // |
| 18 | // This file implements the Assembler class for MIPS32. |
| 19 | // |
| 20 | //===----------------------------------------------------------------------===// |
| 21 | |
| 22 | #ifndef SUBZERO_SRC_ASSEMBLER_MIPS32_H |
| 23 | #define SUBZERO_SRC_ASSEMBLER_MIPS32_H |
| 24 | |
| 25 | #include "IceAssembler.h" |
| 26 | #include "IceDefs.h" |
| 27 | #include "IceFixups.h" |
| 28 | |
| 29 | namespace Ice { |
| 30 | namespace MIPS32 { |
| 31 | |
| 32 | class AssemblerMIPS32 : public Assembler { |
| 33 | AssemblerMIPS32(const AssemblerMIPS32 &) = delete; |
| 34 | AssemblerMIPS32 &operator=(const AssemblerMIPS32 &) = delete; |
| 35 | |
| 36 | public: |
| 37 | explicit AssemblerMIPS32(bool use_far_branches = false) : Assembler() { |
| 38 | // This mode is only needed and implemented for MIPS32 and ARM. |
| 39 | assert(!use_far_branches); |
| 40 | (void)use_far_branches; |
| 41 | } |
| 42 | ~AssemblerMIPS32() override = default; |
| 43 | |
| 44 | void alignFunction() override { |
| 45 | llvm::report_fatal_error("Not yet implemented."); |
| 46 | } |
| 47 | |
| 48 | SizeT getBundleAlignLog2Bytes() const override { return 4; } |
| 49 | |
| 50 | const char *getNonExecPadDirective() const override { return ".TBD"; } |
| 51 | |
| 52 | llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override { |
| 53 | llvm::report_fatal_error("Not yet implemented."); |
| 54 | } |
| 55 | |
| 56 | void padWithNop(intptr_t Padding) override { |
| 57 | (void)Padding; |
| 58 | llvm::report_fatal_error("Not yet implemented."); |
| 59 | } |
| 60 | |
| 61 | void bindCfgNodeLabel(SizeT NodeNumber) override { |
| 62 | (void)NodeNumber; |
| 63 | llvm::report_fatal_error("Not yet implemented."); |
| 64 | } |
| 65 | |
| 66 | bool fixupIsPCRel(FixupKind Kind) const override { |
| 67 | (void)Kind; |
| 68 | llvm::report_fatal_error("Not yet implemented."); |
| 69 | } |
| 70 | }; |
| 71 | |
| 72 | } // end of namespace MIPS32 |
| 73 | } // end of namespace Ice |
| 74 | |
| 75 | #endif // SUBZERO_SRC_ASSEMBLER_MIPS32_H |