[llvm] r270302 - [AVR] Add AVRMCAsmInfo

Dylan McKay via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 18:06:38 PDT 2016


Author: dylanmckay
Date: Fri May 20 20:06:37 2016
New Revision: 270302

URL: http://llvm.org/viewvc/llvm-project?rev=270302&view=rev
Log:
[AVR] Add AVRMCAsmInfo

Added:
    llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp
    llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h
Modified:
    llvm/trunk/lib/Target/AVR/MCTargetDesc/CMakeLists.txt

Added: llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp?rev=270302&view=auto
==============================================================================
--- llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp (added)
+++ llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp Fri May 20 20:06:37 2016
@@ -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

Added: llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h?rev=270302&view=auto
==============================================================================
--- llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h (added)
+++ llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h Fri May 20 20:06:37 2016
@@ -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

Modified: llvm/trunk/lib/Target/AVR/MCTargetDesc/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/CMakeLists.txt?rev=270302&r1=270301&r2=270302&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/MCTargetDesc/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/AVR/MCTargetDesc/CMakeLists.txt Fri May 20 20:06:37 2016
@@ -1,5 +1,6 @@
 add_llvm_library(LLVMAVRDesc
   AVRELFStreamer.cpp
+  AVRMCAsmInfo.cpp
   AVRTargetStreamer.cpp
 )
 




More information about the llvm-commits mailing list