summaryrefslogtreecommitdiff
path: root/lib/MC/MCWin64EH.cpp
Commit message (Collapse)AuthorAge
* Fix alignment of unwind data.Kai Nacke2013-09-15
| | | | | | | | | | | | For alignment purposes, the instruction array will always have an even number of entries, with the final entry potentially unused (in which case the array will be one longer than indicated by the count of unwind codes field). Reviewed by Anton Korobeynikov, Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190767 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEHKai Nacke2013-09-15
| | | | | | | | | | | | | | | data structures. The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding the VK_COFF_IMGREL32 modifier to the symbol reference. Change also references to start and end of the SEH range of a function as offsets to start of the function. Reviewed by Jim Grosbach, Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190766 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-08-27
| | | | | | | | | | | | | The code offset for unwind code SET_FPREG is wrong because it is set to constant 0. The fix is to do the same as for the other unwind codes: emit a label and later the absolute difference between the label and the begin of the prologue. Also enables the failing test case MC/COFF/seh.s Reviewed by Jim Grosbach, Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189309 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert: Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185793 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert: Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH data structures.Kai Nacke2013-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185791 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert: Fix alignment of unwind data.Kai Nacke2013-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185790 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix alignment of unwind data.Kai Nacke2013-07-06
| | | | | | | | | | | | For alignment purposes, the instruction array will always have an even number of entries, with the final entry potentially unused (in which case the array will be one longer than indicated by the count of unwind codes field). Reviewed by Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185760 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEHKai Nacke2013-07-06
| | | | | | | | | | | | | | | data structures. The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding the VK_COFF_IMGREL32 modifier to the symbol reference. Change also references to start and end of the SEH range of a function as offsets to start of the function. Reviewed by Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185759 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-07-06
| | | | | | | | | | | | | The code offset for unwind code SET_FPREG is wrong because it is set to constant 0. The fix is to do the same as for the other unwind codes: emit a label and later the absolute difference between the label and the begin of the prologue. Also enables the failing test case MC/COFF/seh.s Reviewed by Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185758 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-03
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for .pdata and .xdata section attributes on COFF.Anton Korobeynikov2012-08-08
| | | | | | | Patch by kai@redstar.de ! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161487 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MCObjectFileInfo and sink the MCSections initialization code fromEvan Cheng2011-07-20
| | | | | | | | | TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135569 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatestEvan Cheng2011-07-15
| | | | | | | | solution but it is a small step towards removing the horror that is TargetAsmInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135237 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a parameter to the Win64 EH section getters to get a section with aCharles Davis2011-05-27
| | | | | | | | | | | suffix (e.g. .xdata$myfunc). The suffix part isn't implemented yet, but I'll get to it in the next patch. Fix up all callers of the affected functions. Make them pass said suffix to the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132205 91177308-0d34-0410-b5e6-96231b3b80d8
* Assorted fixes for Win64 EH unwind info emission:Charles Davis2011-05-27
| | | | | | | | | | | - Flip order of bitfields. This gets our output matching GAS. - Handle case where the end of the prolog wasn't specified. - If the resulting unwind info struct is less than 8 bytes, pad to 8 bytes. Add a test for the latter two. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132188 91177308-0d34-0410-b5e6-96231b3b80d8
* Start keeping track of where the various unwind instructions are in the prolog.Charles Davis2011-05-27
| | | | | | | | Use them to calculate the offset inside the prolog. Emit this value when emitting the unwind codes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132177 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing break statements. Align UNWIND_INFO and RUNTIME_FUNCTION structsCharles Davis2011-05-27
| | | | | | | | | to 4 bytes. I'm surprised no one caught the missing break statements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132176 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement emission of all Win64 exception tables. Make the COFF streamer emitCharles Davis2011-05-22
| | | | | | | these tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131833 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the COFF streamer emit unwind info when processing a .seh_handlerdataCharles Davis2011-05-22
directive. Implement emission of Win64 EH unwind info. Pull in <cassert> in MCWin64EH.h so it can use the assert() macro. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131832 91177308-0d34-0410-b5e6-96231b3b80d8