| 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 "llvm/Target/TargetAsmBackend.h" | 10 #include "llvm/Target/TargetAsmBackend.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 class ELFX86_32AsmBackend : public ELFX86AsmBackend { | 303 class ELFX86_32AsmBackend : public ELFX86AsmBackend { |
| 304 public: | 304 public: |
| 305 ELFX86_32AsmBackend(const Target &T, Triple::OSType OSType) | 305 ELFX86_32AsmBackend(const Target &T, Triple::OSType OSType) |
| 306 : ELFX86AsmBackend(T, OSType) {} | 306 : ELFX86AsmBackend(T, OSType) {} |
| 307 | 307 |
| 308 unsigned getPointerSize() const { | 308 unsigned getPointerSize() const { |
| 309 return 4; | 309 return 4; |
| 310 } | 310 } |
| 311 | 311 |
| 312 MCObjectWriter *createObjectWriter(raw_ostream &OS) const { | 312 MCObjectWriter *createObjectWriter(raw_ostream &OS) const { |
| 313 return new ELFObjectWriter(OS, /*Is64Bit=*/false, | 313 return new X86ELFObjectWriter(OS, /*Is64Bit=*/false, |
| 314 OSType, ELF::EM_386, | 314 OSType, ELF::EM_386, |
| 315 /*IsLittleEndian=*/true, | 315 /*IsLittleEndian=*/true, |
| 316 /*HasRelocationAddend=*/false); | 316 /*HasRelocationAddend=*/false); |
| 317 } | 317 } |
| 318 }; | 318 }; |
| 319 | 319 |
| 320 class ELFX86_64AsmBackend : public ELFX86AsmBackend { | 320 class ELFX86_64AsmBackend : public ELFX86AsmBackend { |
| 321 public: | 321 public: |
| 322 ELFX86_64AsmBackend(const Target &T, Triple::OSType OSType) | 322 ELFX86_64AsmBackend(const Target &T, Triple::OSType OSType) |
| 323 : ELFX86AsmBackend(T, OSType) {} | 323 : ELFX86AsmBackend(T, OSType) {} |
| 324 | 324 |
| 325 unsigned getPointerSize() const { | 325 unsigned getPointerSize() const { |
| 326 return 8; | 326 return 8; |
| 327 } | 327 } |
| 328 | 328 |
| 329 MCObjectWriter *createObjectWriter(raw_ostream &OS) const { | 329 MCObjectWriter *createObjectWriter(raw_ostream &OS) const { |
| 330 return new ELFObjectWriter(OS, /*Is64Bit=*/true, | 330 return new X86ELFObjectWriter(OS, /*Is64Bit=*/true, |
| 331 OSType, ELF::EM_X86_64, | 331 OSType, ELF::EM_X86_64, |
| 332 /*IsLittleEndian=*/true, | 332 /*IsLittleEndian=*/true, |
| 333 /*HasRelocationAddend=*/true); | 333 /*HasRelocationAddend=*/true); |
| 334 } | 334 } |
| 335 }; | 335 }; |
| 336 | 336 |
| 337 class WindowsX86AsmBackend : public X86AsmBackend { | 337 class WindowsX86AsmBackend : public X86AsmBackend { |
| 338 bool Is64Bit; | 338 bool Is64Bit; |
| 339 MCCOFFObjectFormat Format; | 339 MCCOFFObjectFormat Format; |
| 340 | 340 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 case Triple::Darwin: | 474 case Triple::Darwin: |
| 475 return new DarwinX86_64AsmBackend(T); | 475 return new DarwinX86_64AsmBackend(T); |
| 476 case Triple::MinGW64: | 476 case Triple::MinGW64: |
| 477 case Triple::Cygwin: | 477 case Triple::Cygwin: |
| 478 case Triple::Win32: | 478 case Triple::Win32: |
| 479 return new WindowsX86AsmBackend(T, true); | 479 return new WindowsX86AsmBackend(T, true); |
| 480 default: | 480 default: |
| 481 return new ELFX86_64AsmBackend(T, Triple(TT).getOS()); | 481 return new ELFX86_64AsmBackend(T, Triple(TT).getOS()); |
| 482 } | 482 } |
| 483 } | 483 } |
| OLD | NEW |