[lld] r202874 - [PECOFF] Sort x64 exception handler table.

Rui Ueyama ruiu at google.com
Tue Mar 4 10:39:12 PST 2014


Author: ruiu
Date: Tue Mar  4 12:39:12 2014
New Revision: 202874

URL: http://llvm.org/viewvc/llvm-project?rev=202874&view=rev
Log:
[PECOFF] Sort x64 exception handler table.

Just like x86 exception handler table, the table for x64 needs to be sorted
so that runtime can binary search on it. Unlike x86, the table entry for x64
has multiple fields, and they need to be sorted according to its BeginAddress
field. This patch also fixes a bug in relocations.

Added:
    lld/trunk/test/pecoff/Inputs/unwind.obj.yaml
Removed:
    lld/trunk/test/pecoff/Inputs/hello64.obj.yaml
Modified:
    lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
    lld/trunk/test/pecoff/seh64.test

Modified: lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp?rev=202874&r1=202873&r2=202874&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp Tue Mar  4 12:39:12 2014
@@ -46,10 +46,11 @@
 #include "llvm/Support/FileOutputBuffer.h"
 #include "llvm/Support/Format.h"
 
+using llvm::COFF::DataDirectoryIndex;
+using llvm::object::coff_runtime_function_x64;
 using llvm::support::ulittle16_t;
 using llvm::support::ulittle32_t;
 using llvm::support::ulittle64_t;
-using llvm::COFF::DataDirectoryIndex;
 
 namespace lld {
 namespace pecoff {
@@ -566,10 +567,10 @@ void AtomChunk::applyRelocations64(uint8
         *relocSite64 = targetAddr;
         break;
       case llvm::COFF::IMAGE_REL_AMD64_ADDR32:
-        *relocSite32 = targetAddr;
+        *relocSite32 = targetAddr + imageBase;
         break;
       case llvm::COFF::IMAGE_REL_AMD64_ADDR32NB:
-        *relocSite32 = targetAddr - imageBase;
+        *relocSite32 = targetAddr;
         break;
       case llvm::COFF::IMAGE_REL_AMD64_REL32:
         *relocSite32 = targetAddr - atomRva[atom] + ref->offsetInAtom() + 4;
@@ -837,6 +838,8 @@ private:
   void applyAllRelocations(uint8_t *bufferStart);
   void printAllAtomAddresses() const;
   void reorderSEHTableEntries(uint8_t *bufferStart);
+  void reorderSEHTableEntriesX86(uint8_t *bufferStart);
+  void reorderSEHTableEntriesX64(uint8_t *bufferStart);
 
   void addChunk(Chunk *chunk);
   void addSectionChunk(SectionChunk *chunk, SectionHeaderTableChunk *table);
@@ -1069,12 +1072,20 @@ void PECOFFWriter::printAllAtomAddresses
       chunk->printAtomAddresses(_ctx.getBaseAddress());
 }
 
+void PECOFFWriter::reorderSEHTableEntries(uint8_t *bufferStart) {
+  auto machineType = _ctx.getMachineType();
+  if (machineType == llvm::COFF::IMAGE_FILE_MACHINE_I386)
+    reorderSEHTableEntriesX86(bufferStart);
+  if (machineType == llvm::COFF::IMAGE_FILE_MACHINE_AMD64)
+    reorderSEHTableEntriesX64(bufferStart);
+}
+
 /// It seems that the entries in .sxdata must be sorted. This function is called
 /// after a COFF file image is created in memory and before it is written to
 /// disk. It is safe to reorder entries at this stage because the contents of
 /// the entries are RVAs and there's no reference to a .sxdata entry other than
 /// to the beginning of the section.
-void PECOFFWriter::reorderSEHTableEntries(uint8_t *bufferStart) {
+void PECOFFWriter::reorderSEHTableEntriesX86(uint8_t *bufferStart) {
   for (std::unique_ptr<Chunk> &chunk : _chunks) {
     if (SectionChunk *section = dyn_cast<SectionChunk>(chunk.get())) {
       if (section->getSectionName() == ".sxdata") {
@@ -1086,6 +1097,25 @@ void PECOFFWriter::reorderSEHTableEntrie
     }
   }
 }
+
+/// The entries in .pdata must be sorted according to its BeginAddress field
+/// value. It's safe to do it because of the same reason as .sxdata.
+void PECOFFWriter::reorderSEHTableEntriesX64(uint8_t *bufferStart) {
+  for (std::unique_ptr<Chunk> &chunk : _chunks) {
+    if (SectionChunk *section = dyn_cast<SectionChunk>(chunk.get())) {
+      if (section->getSectionName() != ".pdata")
+        continue;
+      int numEntries = section->size() / sizeof(coff_runtime_function_x64);
+      coff_runtime_function_x64 *begin =
+          (coff_runtime_function_x64 *)(bufferStart + section->fileOffset());
+      coff_runtime_function_x64 *end = begin + numEntries;
+      std::sort(begin, end, [](const coff_runtime_function_x64 &lhs,
+                               const coff_runtime_function_x64 &rhs) {
+        return lhs.BeginAddress < rhs.BeginAddress;
+      });
+    }
+  }
+}
 
 void PECOFFWriter::addChunk(Chunk *chunk) {
   _chunks.push_back(std::unique_ptr<Chunk>(chunk));

Removed: lld/trunk/test/pecoff/Inputs/hello64.obj.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/Inputs/hello64.obj.yaml?rev=202873&view=auto
==============================================================================
--- lld/trunk/test/pecoff/Inputs/hello64.obj.yaml (original)
+++ lld/trunk/test/pecoff/Inputs/hello64.obj.yaml (removed)
@@ -1,186 +0,0 @@
----
-header:
-  Machine:         IMAGE_FILE_MACHINE_AMD64
-  Characteristics: [  ]
-sections:
-  - Name:            .drectve
-    Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
-    Alignment:       1
-    SectionData:     2020202F44454641554C544C49423A224C4942434D5422202F44454641554C544C49423A224F4C444E414D45532220
-  - Name:            '.debug$S'
-    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
-    Alignment:       1
-    SectionData:     04000000F1000000620000002400011100000000433A5C63796777696E5C686F6D655C727569755C68656C6C6F2E6F626A003A003C1100620000D0001100000066EE00001100000066EE00004D6963726F736F667420285229204F7074696D697A696E6720436F6D70696C6572000000
-  - Name:            .data
-    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
-    Alignment:       8
-    SectionData:     48656C6C6F20776F726C640A0000000048656C6C6F207374646F75740A00000048656C6C6F207374646572720A00
-  - Name:            .text
-    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
-    Alignment:       16
-    SectionData:     4883EC28488D0D00000000E800000000E800000000B930000000486BC9014803C1488D1500000000488BC8E800000000E800000000B930000000486BC9024803C1488D1500000000488BC8E80000000033C04883C428C3
-    Relocations:
-      - VirtualAddress:  7
-        SymbolName:      '$SG2923'
-        Type:            IMAGE_REL_AMD64_REL32
-      - VirtualAddress:  12
-        SymbolName:      printf
-        Type:            IMAGE_REL_AMD64_REL32
-      - VirtualAddress:  17
-        SymbolName:      __iob_func
-        Type:            IMAGE_REL_AMD64_REL32
-      - VirtualAddress:  36
-        SymbolName:      '$SG2924'
-        Type:            IMAGE_REL_AMD64_REL32
-      - VirtualAddress:  44
-        SymbolName:      fprintf
-        Type:            IMAGE_REL_AMD64_REL32
-      - VirtualAddress:  49
-        SymbolName:      __iob_func
-        Type:            IMAGE_REL_AMD64_REL32
-      - VirtualAddress:  68
-        SymbolName:      '$SG2925'
-        Type:            IMAGE_REL_AMD64_REL32
-      - VirtualAddress:  76
-        SymbolName:      fprintf
-        Type:            IMAGE_REL_AMD64_REL32
-  - Name:            .xdata
-    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
-    Alignment:       4
-    SectionData:     0104010004420000
-  - Name:            .pdata
-    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
-    Alignment:       4
-    SectionData:     000000005700000000000000
-    Relocations:
-      - VirtualAddress:  0
-        SymbolName:      '$LN3'
-        Type:            IMAGE_REL_AMD64_ADDR32NB
-      - VirtualAddress:  4
-        SymbolName:      '$LN3'
-        Type:            IMAGE_REL_AMD64_ADDR32NB
-      - VirtualAddress:  8
-        SymbolName:      '$unwind$main'
-        Type:            IMAGE_REL_AMD64_ADDR32NB
-symbols:
-  - Name:            '@comp.id'
-    Value:           13561446
-    SectionNumber:   65535
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-  - Name:            '@feat.00'
-    Value:           2147484048
-    SectionNumber:   65535
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-  - Name:            .drectve
-    Value:           0
-    SectionNumber:   1
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    NumberOfAuxSymbols: 1
-    AuxiliaryData:   2F0000000000000000000000000000000000
-  - Name:            '.debug$S'
-    Value:           0
-    SectionNumber:   2
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    NumberOfAuxSymbols: 1
-    AuxiliaryData:   700000000000000000000000000000000000
-  - Name:            .data
-    Value:           0
-    SectionNumber:   3
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    NumberOfAuxSymbols: 1
-    AuxiliaryData:   2E00000000000000F46EC63A000000000000
-  - Name:            '$SG2923'
-    Value:           0
-    SectionNumber:   3
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-  - Name:            '$SG2924'
-    Value:           16
-    SectionNumber:   3
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-  - Name:            '$SG2925'
-    Value:           32
-    SectionNumber:   3
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-  - Name:            .text
-    Value:           0
-    SectionNumber:   4
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    NumberOfAuxSymbols: 1
-    AuxiliaryData:   5700000008000000F1D53755000000000000
-  - Name:            __iob_func
-    Value:           0
-    SectionNumber:   0
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
-    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
-  - Name:            fprintf
-    Value:           0
-    SectionNumber:   0
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
-    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
-  - Name:            printf
-    Value:           0
-    SectionNumber:   0
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
-    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
-  - Name:            main
-    Value:           0
-    SectionNumber:   4
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
-    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
-  - Name:            '$LN3'
-    Value:           0
-    SectionNumber:   4
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_LABEL
-  - Name:            .xdata
-    Value:           0
-    SectionNumber:   5
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    NumberOfAuxSymbols: 1
-    AuxiliaryData:   0800000000000000D139C50F000000000000
-  - Name:            '$unwind$main'
-    Value:           0
-    SectionNumber:   5
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-  - Name:            .pdata
-    Value:           0
-    SectionNumber:   6
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    NumberOfAuxSymbols: 1
-    AuxiliaryData:   0C00000003000000DFFAE35F000000000000
-  - Name:            '$pdata$main'
-    Value:           0
-    SectionNumber:   6
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-...

Added: lld/trunk/test/pecoff/Inputs/unwind.obj.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/Inputs/unwind.obj.yaml?rev=202874&view=auto
==============================================================================
--- lld/trunk/test/pecoff/Inputs/unwind.obj.yaml (added)
+++ lld/trunk/test/pecoff/Inputs/unwind.obj.yaml Tue Mar  4 12:39:12 2014
@@ -0,0 +1,117 @@
+---
+header:
+  Machine:         IMAGE_FILE_MACHINE_AMD64
+  Characteristics: [  ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    Alignment:       4
+    SectionData:     4883EC184889742410440F110424534889E3488D235B4883C418C3C34881ECF0FF00004881ECF0FF80004881C4F0FF80004881C4F0FF0000C3
+  - Name:            .xdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    Alignment:       4
+    SectionData:     0912080312030F300E880000096402000422001A000000000000000021000000000000001B000000000000000100000000000000010E06000E11F0FF80000701FE1F001A
+    Relocations:
+      - VirtualAddress:  20
+        SymbolName:      __C_specific_handler
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  32
+        SymbolName:      func
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  36
+        SymbolName:      func
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  40
+        SymbolName:      .xdata
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+  - Name:            .pdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    Alignment:       4
+    SectionData:     000000001B0000000000000012000000120000001C00000000000000010000002C000000000000001D00000034000000
+    Relocations:
+      - VirtualAddress:  0
+        SymbolName:      func
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  4
+        SymbolName:      func
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  8
+        SymbolName:      .xdata
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  12
+        SymbolName:      func
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  16
+        SymbolName:      func
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  20
+        SymbolName:      .xdata
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  24
+        SymbolName:      smallFunc
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  28
+        SymbolName:      smallFunc
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  32
+        SymbolName:      .xdata
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  36
+        SymbolName:      allocFunc
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  40
+        SymbolName:      allocFunc
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  44
+        SymbolName:      .xdata
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+symbols:
+  - Name:            .text
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    NumberOfAuxSymbols: 1
+    AuxiliaryData:   390000000000000000000000010000000000
+  - Name:            .xdata
+    Value:           0
+    SectionNumber:   2
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    NumberOfAuxSymbols: 1
+    AuxiliaryData:   440000000400000000000000020000000000
+  - Name:            .pdata
+    Value:           0
+    SectionNumber:   3
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    NumberOfAuxSymbols: 1
+    AuxiliaryData:   300000000C00000000000000030000000000
+  - Name:            func
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+  - Name:            __C_specific_handler
+    Value:           0
+    SectionNumber:   0
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+  - Name:            smallFunc
+    Value:           27
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+  - Name:            allocFunc
+    Value:           28
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+...

Modified: lld/trunk/test/pecoff/seh64.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/seh64.test?rev=202874&r1=202873&r2=202874&view=diff
==============================================================================
--- lld/trunk/test/pecoff/seh64.test (original)
+++ lld/trunk/test/pecoff/seh64.test Tue Mar  4 12:39:12 2014
@@ -1,7 +1,77 @@
-# RUN: yaml2obj %p/Inputs/hello64.obj.yaml > %t.obj
+# RUN: yaml2obj %p/Inputs/unwind.obj.yaml > %t.obj
 #
 # RUN: lld -flavor link /machine:x64 /out:%t.exe /subsystem:console /force \
 # RUN:   /nodefaultlib -- %t.obj
-# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
+# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=HEADER %s
+# RUN: llvm-objdump -unwind-info %t.exe | FileCheck -check-prefix=UNWIND %s
 
-CHECK: ExceptionTableRVA: 0x3000
+HEADER: ExceptionTableRVA: 0x1000
+
+UNWIND: Function Table:
+UNWIND:   Start Address: 0x2000
+UNWIND:   End Address: 0x2000
+UNWIND:   Unwind Info Address: 0x3000
+UNWIND:   Version: 1
+UNWIND:   Flags: 1 UNW_ExceptionHandler
+UNWIND:   Size of prolog: 18
+UNWIND:   Number of Codes: 8
+UNWIND:   Frame register: RBX
+UNWIND:   Frame offset: 0
+UNWIND:   Unwind Codes:
+UNWIND:     0x12: UOP_SetFPReg
+UNWIND:     0x0f: UOP_PushNonVol RBX
+UNWIND:     0x0e: UOP_SaveXMM128 XMM8 [0x0000]
+UNWIND:     0x09: UOP_SaveNonVol RSI [0x0010]
+UNWIND:     0x04: UOP_AllocSmall 24
+UNWIND:     0x00: UOP_PushMachFrame w/o error code
+UNWIND: Function Table:
+UNWIND:   Start Address: 0x2000
+UNWIND:   End Address: 0x2000
+UNWIND:   Unwind Info Address: 0x3000
+UNWIND:   Version: 1
+UNWIND:   Flags: 1 UNW_ExceptionHandler
+UNWIND:   Size of prolog: 18
+UNWIND:   Number of Codes: 8
+UNWIND:   Frame register: RBX
+UNWIND:   Frame offset: 0
+UNWIND:   Unwind Codes:
+UNWIND:     0x12: UOP_SetFPReg
+UNWIND:     0x0f: UOP_PushNonVol RBX
+UNWIND:     0x0e: UOP_SaveXMM128 XMM8 [0x0000]
+UNWIND:     0x09: UOP_SaveNonVol RSI [0x0010]
+UNWIND:     0x04: UOP_AllocSmall 24
+UNWIND:     0x00: UOP_PushMachFrame w/o error code
+UNWIND: Function Table:
+UNWIND:   Start Address: 0x201b
+UNWIND:   End Address: 0x201b
+UNWIND:   Unwind Info Address: 0x3000
+UNWIND:   Version: 1
+UNWIND:   Flags: 1 UNW_ExceptionHandler
+UNWIND:   Size of prolog: 18
+UNWIND:   Number of Codes: 8
+UNWIND:   Frame register: RBX
+UNWIND:   Frame offset: 0
+UNWIND:   Unwind Codes:
+UNWIND:     0x12: UOP_SetFPReg
+UNWIND:     0x0f: UOP_PushNonVol RBX
+UNWIND:     0x0e: UOP_SaveXMM128 XMM8 [0x0000]
+UNWIND:     0x09: UOP_SaveNonVol RSI [0x0010]
+UNWIND:     0x04: UOP_AllocSmall 24
+UNWIND:     0x00: UOP_PushMachFrame w/o error code
+UNWIND: Function Table:
+UNWIND:   Start Address: 0x201c
+UNWIND:   End Address: 0x201c
+UNWIND:   Unwind Info Address: 0x3000
+UNWIND:   Version: 1
+UNWIND:   Flags: 1 UNW_ExceptionHandler
+UNWIND:   Size of prolog: 18
+UNWIND:   Number of Codes: 8
+UNWIND:   Frame register: RBX
+UNWIND:   Frame offset: 0
+UNWIND:   Unwind Codes:
+UNWIND:     0x12: UOP_SetFPReg
+UNWIND:     0x0f: UOP_PushNonVol RBX
+UNWIND:     0x0e: UOP_SaveXMM128 XMM8 [0x0000]
+UNWIND:     0x09: UOP_SaveNonVol RSI [0x0010]
+UNWIND:     0x04: UOP_AllocSmall 24
+UNWIND:     0x00: UOP_PushMachFrame w/o error code





More information about the llvm-commits mailing list