1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/MC/X86/faultmap-section-parsing.s
Sanjoy Das bea61317e9 [FaultMaps] Add a parser for the __llvm__faultmaps section.
Summary:
The parser is exercised by llvm-objdump using -print-fault-maps.  As is
probably obvious, the code itself was "heavily inspired" by
http://reviews.llvm.org/D10434.

Reviewers: reames, atrick, JosephTremoulet

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10491

llvm-svn: 240304
2015-06-22 18:03:02 +00:00

30 lines
736 B
ArmAsm

// 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