[PATCH] D49637: [AArch64] Use MCAsmInfoMicrosoft and MCAsmInfoGNUCOFF as base classes

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 23 15:15:36 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL337755: [AArch64] Use MCAsmInfoMicrosoft and MCAsmInfoGNUCOFF as base classes (authored by mstorsjo, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D49637?vs=156686&id=156892#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D49637

Files:
  llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
  llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h
  llvm/trunk/test/CodeGen/AArch64/win_cst_pool.ll


Index: llvm/trunk/test/CodeGen/AArch64/win_cst_pool.ll
===================================================================
--- llvm/trunk/test/CodeGen/AArch64/win_cst_pool.ll
+++ llvm/trunk/test/CodeGen/AArch64/win_cst_pool.ll
@@ -0,0 +1,13 @@
+; RUN: llc < %s -mtriple=aarch64-win32-gnu | FileCheck -check-prefix=MINGW %s
+
+define double @double() {
+  ret double 0x0000000000800000
+}
+; MINGW:              .section        .rdata,"dr"
+; MINGW-NEXT:         .p2align  3
+; MINGW-NEXT: [[LABEL:\.LC.*]]:
+; MINGW-NEXT:         .xword   8388608
+; MINGW:      double:
+; MINGW:               adrp    x8, [[LABEL]]
+; MINGW-NEXT:          ldr     d0, [x8, [[LABEL]]]
+; MINGW-NEXT:          ret
Index: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h
===================================================================
--- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h
+++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h
@@ -34,15 +34,11 @@
   explicit AArch64MCAsmInfoELF(const Triple &T);
 };
 
-struct AArch64MCAsmInfoCOFF : public MCAsmInfoCOFF {
-  explicit AArch64MCAsmInfoCOFF();
-};
-
-struct AArch64MCAsmInfoMicrosoftCOFF : public AArch64MCAsmInfoCOFF {
+struct AArch64MCAsmInfoMicrosoftCOFF : public MCAsmInfoMicrosoft {
   explicit AArch64MCAsmInfoMicrosoftCOFF();
 };
 
-struct AArch64MCAsmInfoGNUCOFF : public AArch64MCAsmInfoCOFF {
+struct AArch64MCAsmInfoGNUCOFF : public MCAsmInfoGNUCOFF {
   explicit AArch64MCAsmInfoGNUCOFF();
 };
 
Index: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
+++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
@@ -101,7 +101,7 @@
   HasIdentDirective = true;
 }
 
-AArch64MCAsmInfoCOFF::AArch64MCAsmInfoCOFF() {
+AArch64MCAsmInfoMicrosoftCOFF::AArch64MCAsmInfoMicrosoftCOFF() {
   PrivateGlobalPrefix = ".L";
   PrivateLabelPrefix = ".L";
 
@@ -112,14 +112,23 @@
   AlignmentIsInBytes = false;
   SupportsDebugInformation = true;
   CodePointerSize = 8;
-}
 
-AArch64MCAsmInfoMicrosoftCOFF::AArch64MCAsmInfoMicrosoftCOFF() {
   CommentString = ";";
   ExceptionsType = ExceptionHandling::WinEH;
 }
 
 AArch64MCAsmInfoGNUCOFF::AArch64MCAsmInfoGNUCOFF() {
+  PrivateGlobalPrefix = ".L";
+  PrivateLabelPrefix = ".L";
+
+  Data16bitsDirective = "\t.hword\t";
+  Data32bitsDirective = "\t.word\t";
+  Data64bitsDirective = "\t.xword\t";
+
+  AlignmentIsInBytes = false;
+  SupportsDebugInformation = true;
+  CodePointerSize = 8;
+
   CommentString = "//";
   ExceptionsType = ExceptionHandling::DwarfCFI;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49637.156892.patch
Type: text/x-patch
Size: 2665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180723/0fe537f5/attachment.bin>


More information about the llvm-commits mailing list