1 //===-- llvm/Target/TargetAsmBackend.h - Target Asm Backend -----*- C++ -*-===//
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 #ifndef LLVM_TARGET_TARGETASMBACKEND_H
11 #define LLVM_TARGET_TARGETASMBACKEND_H
16 /// TargetAsmBackend - Generic interface to target specific assembler backends.
17 class TargetAsmBackend {
18 TargetAsmBackend(const TargetAsmBackend &); // DO NOT IMPLEMENT
19 void operator=(const TargetAsmBackend &); // DO NOT IMPLEMENT
20 protected: // Can only create subclasses.
21 TargetAsmBackend(const Target &);
23 /// TheTarget - The Target that this machine was created for.
24 const Target &TheTarget;
27 virtual ~TargetAsmBackend();
29 const Target &getTarget() const { return TheTarget; }
31 /// hasAbsolutizedSet - Check whether this target "absolutizes"
32 /// assignments. That is, given code like:
38 /// will the value of 'tmp' be a relocatable expression, or the assembly time
39 /// value of L0 - L1. This distinction is only relevant for platforms that
40 /// support scattered symbols, since in the absence of scattered symbols (a -
41 /// b) cannot change after assembly.
42 virtual bool hasAbsolutizedSet() const { return false; }
44 /// hasScatteredSymbols - Check whether this target supports scattered
45 /// symbols. If so, the assembler should assume that atoms can be scattered by
46 /// the linker. In particular, this means that the offsets between symbols
47 /// which are in distinct atoms is not known at link time, and the assembler
48 /// must generate fixups and relocations appropriately.
50 /// Note that the assembler currently does not reason about atoms, instead it
51 /// assumes all temporary symbols reside in the "current atom".
52 virtual bool hasScatteredSymbols() const { return false; }
55 } // End llvm namespace