[PATCH] D24337: Fix the Thumb test for vfloat intrinsics
Pablo Barrio via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 12 08:13:17 PDT 2016
pbarrio updated this revision to Diff 71010.
pbarrio added a comment.
Removed vector float intrinsic test from this review. That
part of the patch has now been committed and the review can
be followed in https://reviews.llvm.org/D24398
This is now only the fix to add .code 32 to ARM functions
and its corresponding test.
https://reviews.llvm.org/D24337
Files:
lib/Target/ARM/ARMAsmPrinter.cpp
test/CodeGen/ARM/interwork.ll
test/DebugInfo/ARM/header.ll
Index: test/DebugInfo/ARM/header.ll
===================================================================
--- test/DebugInfo/ARM/header.ll
+++ test/DebugInfo/ARM/header.ll
@@ -8,7 +8,8 @@
; CHECK-NEXT: .syntax unified
; CHECK-NEXT: .globl _f
; CHECK-NEXT: .p2align 2
-; CHECK-NEXT: _f: @ @f
+; CHECK-NEXT: .code 32 @ @f
+; CHECK-NEXT: _f:
; CHECK: .section __DWARF,__debug_str,regular,debug
@@ -21,7 +22,7 @@
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "foo", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
!1 = !DIFile(filename: "/foo/test.c", directory: "/foo")
!2 = !{}
-!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2)
+!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{null}
!7 = !{i32 2, !"Dwarf Version", i32 4}
Index: test/CodeGen/ARM/interwork.ll
===================================================================
--- /dev/null
+++ test/CodeGen/ARM/interwork.ll
@@ -0,0 +1,23 @@
+; One file may have multiple functions targeted at different (ARM, Thumb)
+; instruction sets. Passing this information to the linker and the assembler
+; is done through the ".code 16" and ".code 32" directives.
+;
+; RUN: llc -mtriple=arm-arm-none-eabi %s -o - | FileCheck %s
+
+define void @ft() #0 {
+; CHECK: .code 16
+; CHECK: .thumb_func
+; CHECK-LABEL: ft:
+entry:
+ ret void
+}
+
+define void @fz() #1 {
+; CHECK: .code 32
+; CHECK-LABEL: fz:
+entry:
+ ret void
+}
+
+attributes #0 = { "target-features"="+thumb-mode" }
+attributes #1 = { "target-features"="-thumb-mode" }
Index: lib/Target/ARM/ARMAsmPrinter.cpp
===================================================================
--- lib/Target/ARM/ARMAsmPrinter.cpp
+++ lib/Target/ARM/ARMAsmPrinter.cpp
@@ -74,8 +74,9 @@
if (AFI->isThumbFunction()) {
OutStreamer->EmitAssemblerFlag(MCAF_Code16);
OutStreamer->EmitThumbFunc(CurrentFnSym);
+ } else {
+ OutStreamer->EmitAssemblerFlag(MCAF_Code32);
}
-
OutStreamer->EmitLabel(CurrentFnSym);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24337.71010.patch
Type: text/x-patch
Size: 2417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160912/877b4f53/attachment.bin>
More information about the llvm-commits
mailing list