| OLD | NEW |
| (Empty) |
| 1 //===- subzero/src/assembler_arm32.h - Assembler for ARM32 ------*- 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 ARM32. | |
| 19 // | |
| 20 //===----------------------------------------------------------------------===// | |
| 21 | |
| 22 #ifndef SUBZERO_SRC_ASSEMBLER_ARM32_H | |
| 23 #define SUBZERO_SRC_ASSEMBLER_ARM32_H | |
| 24 | |
| 25 #include "IceDefs.h" | |
| 26 #include "IceFixups.h" | |
| 27 | |
| 28 #include "assembler.h" | |
| 29 | |
| 30 namespace Ice { | |
| 31 namespace ARM32 { | |
| 32 | |
| 33 class AssemblerARM32 : public Assembler { | |
| 34 AssemblerARM32(const AssemblerARM32 &) = delete; | |
| 35 AssemblerARM32 &operator=(const AssemblerARM32 &) = delete; | |
| 36 | |
| 37 public: | |
| 38 explicit AssemblerARM32(bool use_far_branches = false) : Assembler() { | |
| 39 // This mode is only needed and implemented for MIPS and ARM. | |
| 40 assert(!use_far_branches); | |
| 41 (void)use_far_branches; | |
| 42 } | |
| 43 ~AssemblerARM32() override = default; | |
| 44 | |
| 45 void alignFunction() override { llvm_unreachable("Not yet implemented."); } | |
| 46 | |
| 47 SizeT getBundleAlignLog2Bytes() const override { return 4; } | |
| 48 | |
| 49 const char *getNonExecPadDirective() const override { return ".p2alignl"; } | |
| 50 | |
| 51 llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override { | |
| 52 // Use a particular UDF encoding -- TRAPNaCl in LLVM: 0xE7FEDEF0 | |
| 53 // http://llvm.org/viewvc/llvm-project?view=revision&revision=173943 | |
| 54 static const uint8_t Padding[] = {0xE7, 0xFE, 0xDE, 0xF0}; | |
| 55 return llvm::ArrayRef<uint8_t>(Padding, 4); | |
| 56 } | |
| 57 | |
| 58 void padWithNop(intptr_t Padding) override { | |
| 59 (void)Padding; | |
| 60 llvm_unreachable("Not yet implemented."); | |
| 61 } | |
| 62 | |
| 63 void BindCfgNodeLabel(SizeT NodeNumber) override { | |
| 64 (void)NodeNumber; | |
| 65 llvm_unreachable("Not yet implemented."); | |
| 66 } | |
| 67 | |
| 68 bool fixupIsPCRel(FixupKind Kind) const override { | |
| 69 (void)Kind; | |
| 70 llvm_unreachable("Not yet implemented."); | |
| 71 } | |
| 72 }; | |
| 73 | |
| 74 } // end of namespace ARM32 | |
| 75 } // end of namespace Ice | |
| 76 | |
| 77 #endif // SUBZERO_SRC_ASSEMBLER_ARM32_H | |
| OLD | NEW |