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

Side by Side Diff: lib/Target/ARM/MCTargetDesc/ARMAsmBackendNaClELF.h

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 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
(Empty)
1 //===-- ARMAsmBackendNaClELF.h ARM Asm Backend NaCl ELF --------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_LIB_TARGET_ARM_ARMASMBACKENDNACLELF_H
11 #define LLVM_LIB_TARGET_ARM_ARMASMBACKENDNACLELF_H
12
13 // This whole file is a @LOCALMOD
14 #include "MCTargetDesc/ARMAsmBackendELF.h"
15 #include "MCTargetDesc/ARMMCNaCl.h"
16
17 using namespace llvm;
18
19 namespace {
20 class ARMAsmBackendNaClELF : public ARMAsmBackendELF {
21 public:
22 ARMAsmBackendNaClELF(const Target &T, const StringRef TT, uint8_t _OSABI,
23 bool isLittle)
24 : ARMAsmBackendELF(T, TT, _OSABI, isLittle),
25 STI(ARM_MC::createARMMCSubtargetInfo(TT, "", "")) {
26 assert(isLittle && "NaCl only supports little-endian");
27 State.SaveCount = 0;
28 State.I = 0;
29 State.RecursiveCall = false;
30 }
31
32 ~ARMAsmBackendNaClELF() override {}
33
34 bool CustomExpandInst(const MCInst &Inst, MCStreamer &Out) override {
35 return CustomExpandInstNaClARM(*STI, Inst, Out, State);
36 }
37
38 private:
39 // TODO(jfb) When upstreaming this class we can drop STI since ARMAsmBackend
40 // already has one. It's unfortunately private so we recreate one
41 // here to avoid the extra localmod.
42 std::unique_ptr<MCSubtargetInfo> STI;
43 ARMMCNaClSFIState State;
44 };
45 } // end anonymous namespace
46
47 #endif
OLDNEW
« no previous file with comments | « lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp ('k') | lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698