blob: 2ae8beb9148ed4b33e3f70f939eb640ef5629bad [file] [log] [blame]
Jim Laskey8e8de8f2006-09-07 22:05:02 +00001//===-- IA64TargetAsmInfo.cpp - IA64 asm properties -------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Jim Laskey8e8de8f2006-09-07 22:05:02 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the declarations of the IA64TargetAsmInfo properties.
11//
12//===----------------------------------------------------------------------===//
13
14#include "IA64TargetAsmInfo.h"
Anton Korobeynikov721c2c62009-03-29 17:14:35 +000015#include "llvm/Constants.h"
16#include "llvm/Target/TargetMachine.h"
Jim Laskey8e8de8f2006-09-07 22:05:02 +000017
18using namespace llvm;
19
Anton Korobeynikovdc3ca2e2008-08-07 09:52:35 +000020IA64TargetAsmInfo::IA64TargetAsmInfo(const TargetMachine &TM):
21 ELFTargetAsmInfo(TM) {
Jim Laskey8e8de8f2006-09-07 22:05:02 +000022 CommentString = "//";
23 Data8bitsDirective = "\tdata1\t"; // FIXME: check that we are
24 Data16bitsDirective = "\tdata2.ua\t"; // disabling auto-alignment
25 Data32bitsDirective = "\tdata4.ua\t"; // properly
26 Data64bitsDirective = "\tdata8.ua\t";
27 ZeroDirective = "\t.skip\t";
28 AsciiDirective = "\tstring\t";
29
30 GlobalVarAddrPrefix="";
31 GlobalVarAddrSuffix="";
32 FunctionAddrPrefix="@fptr(";
33 FunctionAddrSuffix=")";
Anton Korobeynikovdc3ca2e2008-08-07 09:52:35 +000034
Jim Laskey8e8de8f2006-09-07 22:05:02 +000035 // FIXME: would be nice to have rodata (no 'w') when appropriate?
36 ConstantPoolSection = "\n\t.section .data, \"aw\", \"progbits\"\n";
37}
Anton Korobeynikovdc3ca2e2008-08-07 09:52:35 +000038
Anton Korobeynikov721c2c62009-03-29 17:14:35 +000039unsigned IA64TargetAsmInfo::RelocBehaviour() const {
40 return (TM.getRelocationModel() != Reloc::Static ?
41 Reloc::LocalOrGlobal : Reloc::Global);
42}
43
Anton Korobeynikovdc3ca2e2008-08-07 09:52:35 +000044// FIXME: Support small data/bss/rodata sections someday.