| OLD | NEW |
| 1 //===-- X86AsmBackend.cpp - X86 Assembler Backend -------------------------===// | 1 //===-- X86AsmBackend.cpp - X86 Assembler Backend -------------------------===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 | 9 |
| 10 #include "MCTargetDesc/X86BaseInfo.h" | 10 #include "MCTargetDesc/X86BaseInfo.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 } | 378 } |
| 379 }; | 379 }; |
| 380 | 380 |
| 381 // @LOCALMOD-BEGIN | 381 // @LOCALMOD-BEGIN |
| 382 class NaClX86_32AsmBackend : public ELFX86_32AsmBackend { | 382 class NaClX86_32AsmBackend : public ELFX86_32AsmBackend { |
| 383 public: | 383 public: |
| 384 NaClX86_32AsmBackend(const Target &T, uint8_t OSABI, StringRef CPU) | 384 NaClX86_32AsmBackend(const Target &T, uint8_t OSABI, StringRef CPU) |
| 385 : ELFX86_32AsmBackend(T, OSABI, CPU) { | 385 : ELFX86_32AsmBackend(T, OSABI, CPU) { |
| 386 State.PrefixSaved = 0; | 386 State.PrefixSaved = 0; |
| 387 State.PrefixPass = false; | 387 State.PrefixPass = false; |
| 388 State.EmitRaw = false; |
| 388 } | 389 } |
| 389 | 390 |
| 390 bool CustomExpandInst(const MCInst &Inst, MCStreamer &Out) { | 391 bool CustomExpandInst(const MCInst &Inst, MCStreamer &Out) { |
| 391 return CustomExpandInstNaClX86(Inst, Out, State); | 392 return CustomExpandInstNaClX86(Inst, Out, State); |
| 392 } | 393 } |
| 393 private: | 394 private: |
| 394 X86MCNaClSFIState State; | 395 X86MCNaClSFIState State; |
| 395 }; | 396 }; |
| 396 | 397 |
| 397 class NaClX86_64AsmBackend : public ELFX86_64AsmBackend { | 398 class NaClX86_64AsmBackend : public ELFX86_64AsmBackend { |
| 398 public: | 399 public: |
| 399 NaClX86_64AsmBackend(const Target &T, uint8_t OSABI, StringRef CPU) | 400 NaClX86_64AsmBackend(const Target &T, uint8_t OSABI, StringRef CPU) |
| 400 : ELFX86_64AsmBackend(T, OSABI, CPU) { | 401 : ELFX86_64AsmBackend(T, OSABI, CPU) { |
| 401 State.PrefixSaved = 0; | 402 State.PrefixSaved = 0; |
| 402 State.PrefixPass = false; | 403 State.PrefixPass = false; |
| 404 State.EmitRaw = false; |
| 403 } | 405 } |
| 404 | 406 |
| 405 bool CustomExpandInst(const MCInst &Inst, MCStreamer &Out) { | 407 bool CustomExpandInst(const MCInst &Inst, MCStreamer &Out) { |
| 406 return CustomExpandInstNaClX86(Inst, Out, State); | 408 return CustomExpandInstNaClX86(Inst, Out, State); |
| 407 } | 409 } |
| 408 private: | 410 private: |
| 409 X86MCNaClSFIState State; | 411 X86MCNaClSFIState State; |
| 410 }; | 412 }; |
| 411 // @LOCALMOD-END | 413 // @LOCALMOD-END |
| 412 | 414 |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 if (TheTriple.isOSWindows() && TheTriple.getEnvironment() != Triple::ELF) | 873 if (TheTriple.isOSWindows() && TheTriple.getEnvironment() != Triple::ELF) |
| 872 return new WindowsX86AsmBackend(T, true, CPU); | 874 return new WindowsX86AsmBackend(T, true, CPU); |
| 873 | 875 |
| 874 uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TheTriple.getOS()); | 876 uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TheTriple.getOS()); |
| 875 // @LOCALMOD-BEGIN | 877 // @LOCALMOD-BEGIN |
| 876 if (TheTriple.isOSNaCl()) | 878 if (TheTriple.isOSNaCl()) |
| 877 return new NaClX86_64AsmBackend(T, OSABI, CPU); | 879 return new NaClX86_64AsmBackend(T, OSABI, CPU); |
| 878 // @LOCALMOD-END | 880 // @LOCALMOD-END |
| 879 return new ELFX86_64AsmBackend(T, OSABI, CPU); | 881 return new ELFX86_64AsmBackend(T, OSABI, CPU); |
| 880 } | 882 } |
| OLD | NEW |