summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-04-13 03:55:13 +0000
committerPhilip Reames <listmail@philipreames.com>2019-04-13 03:55:13 +0000
commite03301a3b32d048d8975e0fe21d80489505415c8 (patch)
treeada40bafa605a06d024ff48514210b1af0b3883b /llvm/test/Object
parenteea989a909a3c963a1e99d7e75eb94f25d2bf9fb (diff)
downloadbcm5719-llvm-e03301a3b32d048d8975e0fe21d80489505415c8.tar.gz
bcm5719-llvm-e03301a3b32d048d8975e0fe21d80489505415c8.zip
[StackMaps] Update llvm-readobj to parse V3 Stackmaps
This updates the StackMap parser in the llvm-readobj tool to parse version 3 StackMaps, which were bumped in https://reviews.llvm.org/D32629. Version 3 StackMaps differ in that they have a uint16 sized "location size" field which was added to the Location block in a StackMap record. The record has additional padding for alignment. This was a backwards incompatible change resulting in a StackMap version bump. Patch By: jacob.hughes@kcl.ac.uk (with a rewrite of tests by me) Differential Revision: https://reviews.llvm.org/D59020 llvm-svn: 358325
Diffstat (limited to 'llvm/test/Object')
-rw-r--r--llvm/test/Object/Inputs/stackmap-test.macho-x86-64bin3956 -> 4116 bytes
-rw-r--r--llvm/test/Object/stackmap-dump.test61
2 files changed, 30 insertions, 31 deletions
diff --git a/llvm/test/Object/Inputs/stackmap-test.macho-x86-64 b/llvm/test/Object/Inputs/stackmap-test.macho-x86-64
index 438f5e77a44..c3fcb0301d3 100644
--- a/llvm/test/Object/Inputs/stackmap-test.macho-x86-64
+++ b/llvm/test/Object/Inputs/stackmap-test.macho-x86-64
Binary files differ
diff --git a/llvm/test/Object/stackmap-dump.test b/llvm/test/Object/stackmap-dump.test
index 3c632b83678..a121bc3ce22 100644
--- a/llvm/test/Object/stackmap-dump.test
+++ b/llvm/test/Object/stackmap-dump.test
@@ -1,10 +1,9 @@
RUN: llvm-readobj -stackmap %p/Inputs/stackmap-test.macho-x86-64 | FileCheck %s
; Note: the macho object file in this test was generated in the following way:
-; llc -mtriple=x86_64-apple-darwin %p/test/CodeGen/X86/stackmap.ll -o stackmap.s
-; clang -c stackmap.s -o %p/test/Object/Inputs/stackmap-test.macho-x86-64
+; llc -mtriple=x86_64-apple-darwin test/CodeGen/X86/stackmap.ll -o test/Object/Inputs/stackmap-test.macho-x86-64 -filetype=obj
-CHECK: LLVM StackMap Version: 2
+CHECK: LLVM StackMap Version: 3
CHECK-NEXT: Num Functions: 16
CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
CHECK-NEXT: Function address: 0, stack size: 24, callsite record count: 1
@@ -13,8 +12,8 @@ CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
-CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 1
-CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 1
+CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
+CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 1
CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 1
CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
@@ -79,16 +78,16 @@ CHECK-NEXT: #1: Register R#2, size: 8
CHECK-NEXT: #2: Register R#8, size: 8
CHECK-NEXT: 2 live-outs: [ R#0 (8-bytes) R#7 (8-bytes) ]
-CHECK: Record ID: 11, instruction offset: 42
+CHECK: Record ID: 11, instruction offset: 4
CHECK-NEXT: 17 locations:
CHECK-NEXT: #1: Register R#9, size: 8
-CHECK-NEXT: #2: Register R#14, size: 8
-CHECK-NEXT: #3: Register R#10, size: 8
-CHECK-NEXT: #4: Register R#3, size: 8
-CHECK-NEXT: #5: Register R#0, size: 8
-CHECK-NEXT: #6: Register R#13, size: 8
-CHECK-NEXT: #7: Register R#12, size: 8
-CHECK-NEXT: #8: Register R#15, size: 8
+CHECK-NEXT: #2: Indirect [R#6 + 16], size: 8
+CHECK-NEXT: #3: Indirect [R#6 + 24], size: 8
+CHECK-NEXT: #4: Indirect [R#6 + 32], size: 8
+CHECK-NEXT: #5: Indirect [R#6 + 40], size: 8
+CHECK-NEXT: #6: Indirect [R#6 + 48], size: 8
+CHECK-NEXT: #7: Indirect [R#6 + 56], size: 8
+CHECK-NEXT: #8: Indirect [R#6 + 64], size: 8
CHECK-NEXT: #9: Indirect [R#6 + 72], size: 8
CHECK-NEXT: #10: Indirect [R#6 + 80], size: 8
CHECK-NEXT: #11: Indirect [R#6 + 88], size: 8
@@ -100,21 +99,21 @@ CHECK-NEXT: #16: Indirect [R#6 + 128], size: 8
CHECK-NEXT: #17: Indirect [R#6 + 136], size: 8
CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
-CHECK: Record ID: 12, instruction offset: 62
+CHECK: Record ID: 12, instruction offset: 4
CHECK-NEXT: 17 locations:
CHECK-NEXT: #1: Register R#0, size: 8
-CHECK-NEXT: #2: Register R#14, size: 8
-CHECK-NEXT: #3: Register R#10, size: 8
-CHECK-NEXT: #4: Register R#9, size: 8
-CHECK-NEXT: #5: Register R#8, size: 8
-CHECK-NEXT: #6: Register R#4, size: 8
-CHECK-NEXT: #7: Register R#1, size: 8
-CHECK-NEXT: #8: Register R#2, size: 8
-CHECK-NEXT: #9: Register R#5, size: 8
-CHECK-NEXT: #10: Register R#3, size: 8
-CHECK-NEXT: #11: Register R#13, size: 8
-CHECK-NEXT: #12: Register R#12, size: 8
-CHECK-NEXT: #13: Register R#15, size: 8
+CHECK-NEXT: #2: Indirect [R#6 + 16], size: 8
+CHECK-NEXT: #3: Indirect [R#6 + 24], size: 8
+CHECK-NEXT: #4: Indirect [R#6 + 32], size: 8
+CHECK-NEXT: #5: Indirect [R#6 + 40], size: 8
+CHECK-NEXT: #6: Indirect [R#6 + 48], size: 8
+CHECK-NEXT: #7: Indirect [R#6 + 56], size: 8
+CHECK-NEXT: #8: Indirect [R#6 + 64], size: 8
+CHECK-NEXT: #9: Indirect [R#6 + 72], size: 8
+CHECK-NEXT: #10: Indirect [R#6 + 80], size: 8
+CHECK-NEXT: #11: Indirect [R#6 + 88], size: 8
+CHECK-NEXT: #12: Indirect [R#6 + 96], size: 8
+CHECK-NEXT: #13: Indirect [R#6 + 104], size: 8
CHECK-NEXT: #14: Indirect [R#6 + 112], size: 8
CHECK-NEXT: #15: Indirect [R#6 + 120], size: 8
CHECK-NEXT: #16: Indirect [R#6 + 128], size: 8
@@ -137,15 +136,15 @@ CHECK-NEXT: 1 locations:
CHECK-NEXT: #1: Constant 33, size: 8
CHECK-NEXT: 0 live-outs: [ ]
-CHECK: Record ID: 16, instruction offset: 32
+CHECK: Record ID: 16, instruction offset: 16
CHECK-NEXT: 1 locations:
-CHECK-NEXT: #1: Direct R#6 + -32, size: 8
+CHECK-NEXT: #1: Direct R#6 + -40, size: 8
CHECK-NEXT: 0 live-outs: [ ]
-CHECK: Record ID: 17, instruction offset: 32
+CHECK: Record ID: 17, instruction offset: 16
CHECK-NEXT: 2 locations:
CHECK-NEXT: #1: Direct R#6 + -8, size: 8
-CHECK-NEXT: #2: Direct R#6 + -40, size: 8
+CHECK-NEXT: #2: Direct R#6 + -16, size: 8
CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
CHECK: Record ID: 4294967295, instruction offset: 4
@@ -169,6 +168,6 @@ CHECK-NEXT: 1 locations:
CHECK-NEXT: #1: Indirect [R#6 + -44], size: 4
CHECK-NEXT: 0 live-outs: [ ]
-CHECK: Record ID: 0, instruction offset: 26
+CHECK: Record ID: 0, instruction offset: 25
CHECK-NEXT: 0 locations:
CHECK-NEXT: 0 live-outs: [ ]
OpenPOWER on IntegriCloud