[PATCH] D107251: [ARM] Allow using '; ' as asm statement separator in MSVC mode

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 24 01:02:24 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG039b469b8581: [ARM] Allow using ';' as asm statement separator in MSVC mode (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107251/new/

https://reviews.llvm.org/D107251

Files:
  llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
  llvm/test/CodeGen/ARM/cfguard-checks.ll
  llvm/test/MC/ARM/Windows/literals-comments.s


Index: llvm/test/MC/ARM/Windows/literals-comments.s
===================================================================
--- llvm/test/MC/ARM/Windows/literals-comments.s
+++ llvm/test/MC/ARM/Windows/literals-comments.s
@@ -1,4 +1,7 @@
-; RUN: llvm-mc -triple armv7-windows-msvc -filetype obj -o - %s
+@ RUN: llvm-mc -triple armv7-windows-gnu -filetype obj -o %t.obj %s
+@ RUN: llvm-objdump -d %t.obj | FileCheck %s
+@ RUN: llvm-mc -triple armv7-windows-msvc -filetype obj -o %t.obj %s
+@ RUN: llvm-objdump -d %t.obj | FileCheck %s
 
   .syntax unified
   .thumb
@@ -8,6 +11,12 @@
   .global function
   .thumb_func
 function:
-  ; this is a comment
-  mov r0, #42 ; this # was not
+  @ this is a comment
+  mov r0, #42 @ this # was not
+  nop; nop @ This retains both instructions
   bx lr
+
+@ CHECK:  0: 4f f0 2a 00   mov.w   r0, #42
+@ CHECK:  4: 00 bf         nop
+@ CHECK:  6: 00 bf         nop
+@ CHECK:  8: 70 47         bx      lr
Index: llvm/test/CodeGen/ARM/cfguard-checks.ll
===================================================================
--- llvm/test/CodeGen/ARM/cfguard-checks.ll
+++ llvm/test/CodeGen/ARM/cfguard-checks.ll
@@ -101,8 +101,8 @@
 	; CHECK:       blx r1
   ; CHECK-NEXT:  $Mtmp0:
 	; CHECK-NEXT:  blx r4
-  ; CHECK:       ; %common.ret
-  ; CHECK:       ; %lpad
+  ; CHECK:       @ %common.ret
+  ; CHECK:       @ %lpad
 }
 
 declare void @h()
Index: llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
===================================================================
--- llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
+++ llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
@@ -91,7 +91,7 @@
   ExceptionsType = ExceptionHandling::WinEH;
   PrivateGlobalPrefix = "$M";
   PrivateLabelPrefix = "$M";
-  CommentString = ";";
+  CommentString = "@";
 
   // Conditional Thumb 4-byte instructions can have an implicit IT.
   MaxInstLength = 6;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107251.368296.patch
Type: text/x-patch
Size: 1874 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210824/aa922168/attachment.bin>


More information about the llvm-commits mailing list