1 //===-- X86AsmBackend.cpp - X86 Assembler Backend -------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/Target/TargetAsmBackend.h"
12 #include "llvm/Target/TargetRegistry.h"
13 #include "llvm/Target/TargetAsmBackend.h"
18 class X86AsmBackend : public TargetAsmBackend {
20 X86AsmBackend(const Target &T)
21 : TargetAsmBackend(T) {}
24 class DarwinX86AsmBackend : public X86AsmBackend {
26 DarwinX86AsmBackend(const Target &T)
29 virtual bool hasAbsolutizedSet() const { return true; }
31 virtual bool hasScatteredSymbols() const { return true; }
36 TargetAsmBackend *llvm::createX86_32AsmBackend(const Target &T,
37 const std::string &TT) {
38 switch (Triple(TT).getOS()) {
40 return new DarwinX86AsmBackend(T);
42 return new X86AsmBackend(T);
46 TargetAsmBackend *llvm::createX86_64AsmBackend(const Target &T,
47 const std::string &TT) {
48 switch (Triple(TT).getOS()) {
50 return new DarwinX86AsmBackend(T);
52 return new X86AsmBackend(T);