summaryrefslogtreecommitdiffstats
path: root/test/MC/X86/faultmap-section-parsing.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/X86/faultmap-section-parsing.s')
-rw-r--r--test/MC/X86/faultmap-section-parsing.s29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/MC/X86/faultmap-section-parsing.s b/test/MC/X86/faultmap-section-parsing.s
new file mode 100644
index 0000000..758e70f
--- /dev/null
+++ b/test/MC/X86/faultmap-section-parsing.s
@@ -0,0 +1,29 @@
+// RUN: llvm-mc < %s -triple=x86_64-apple-macosx -filetype=obj -o - | llvm-objdump -fault-map-section - | FileCheck %s
+
+ .section __LLVM_FAULTMAPS,__llvm_faultmaps
+__LLVM_FaultMaps:
+ .byte 1
+ .byte 0
+ .short 0
+ .long 2
+ .quad 0xFFDEAD
+ .long 1
+ .long 0
+ .long 1
+ .long 100
+ .long 200
+
+ .quad 0xFFDAED
+ .long 1
+ .long 0
+ .long 1
+ .long 400
+ .long 500
+
+// CHECK: FaultMap table:
+// CHECK-NEXT: Version: 0x1
+// CHECK-NEXT: NumFunctions: 2
+// CHECK-NEXT: FunctionAddress: 0xffdead, NumFaultingPCs: 1
+// CHECK-NEXT: Fault kind: FaultingLoad, faulting PC offset: 100, handling PC offset: 200
+// CHECK-NEXT: FunctionAddress: 0xffdaed, NumFaultingPCs: 1
+// CHECK-NEXT: Fault kind: FaultingLoad, faulting PC offset: 400, handling PC offset: 500
OpenPOWER on IntegriCloud