From d7d0f7162921513876c50a3997e3065983e7da94 Mon Sep 17 00:00:00 2001 From: Dylan McKay Date: Sat, 21 May 2016 01:06:37 +0000 Subject: [PATCH] [AVR] Add AVRMCAsmInfo llvm-svn: 270302 --- lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp | 28 ++++++++++++++++++ lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h | 31 ++++++++++++++++++++ lib/Target/AVR/MCTargetDesc/CMakeLists.txt | 1 + 3 files changed, 60 insertions(+) create mode 100644 lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp create mode 100644 lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h diff --git a/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp b/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp new file mode 100644 index 00000000000..cca3bcc4968 --- /dev/null +++ b/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp @@ -0,0 +1,28 @@ +//===-- AVRMCAsmInfo.cpp - AVR asm properties -----------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the declarations of the AVRMCAsmInfo properties. +// +//===----------------------------------------------------------------------===// + +#include "AVRMCAsmInfo.h" + +#include "llvm/ADT/Triple.h" + +namespace llvm { + +AVRMCAsmInfo::AVRMCAsmInfo(const Triple &TT) { + PointerSize = 2; + CalleeSaveStackSlotSize = 2; + CommentString = ";"; + PrivateGlobalPrefix = ".L"; + UsesELFSectionDirectiveForBSS = true; +} + +} // end of namespace llvm diff --git a/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h b/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h new file mode 100644 index 00000000000..cc2207a3cfa --- /dev/null +++ b/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h @@ -0,0 +1,31 @@ +//===-- AVRMCAsmInfo.h - AVR asm properties ---------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the declaration of the AVRMCAsmInfo class. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_AVR_ASM_INFO_H +#define LLVM_AVR_ASM_INFO_H + +#include "llvm/MC/MCAsmInfo.h" + +namespace llvm { + +class Triple; + +/// Specifies the format of AVR assembly files. +class AVRMCAsmInfo : public MCAsmInfo { +public: + explicit AVRMCAsmInfo(const Triple &TT); +}; + +} // end namespace llvm + +#endif // LLVM_AVR_ASM_INFO_H diff --git a/lib/Target/AVR/MCTargetDesc/CMakeLists.txt b/lib/Target/AVR/MCTargetDesc/CMakeLists.txt index 1ef14f307df..3cceb49acb3 100644 --- a/lib/Target/AVR/MCTargetDesc/CMakeLists.txt +++ b/lib/Target/AVR/MCTargetDesc/CMakeLists.txt @@ -1,5 +1,6 @@ add_llvm_library(LLVMAVRDesc AVRELFStreamer.cpp + AVRMCAsmInfo.cpp AVRTargetStreamer.cpp )