Craig Topper
a2886c21d9
Convert assert(0) to llvm_unreachable
...
llvm-svn: 149967
2012-02-07 05:05:23 +00:00
Rafael Espindola
3c47e37387
Add support for .cfi_signal_frame. Fixes pr11762.
...
llvm-svn: 148733
2012-01-23 21:51:52 +00:00
Benjamin Kramer
d3309a3434
Add missing breaks to switch.
...
Found by the clang static analyzer.
llvm-svn: 148543
2012-01-20 14:42:37 +00:00
Kevin Enderby
f7d77069ca
This is the matching change for the data structure name changes for the
...
functional change in r147860 to use DW_TAG_label's instead TAG_subprogram's.
This only changes names and updates comments. No functional change.
llvm-svn: 147877
2012-01-10 21:12:34 +00:00
Kevin Enderby
8d4a2204b7
Various crash reporting tools have a problem with the dwarf generated for
...
assembly source when it generates the TAG_subprogram dwarf debug info for
the labels that have nothing between them as in this bit of assembly source:
% cat ZeroLength.s
_func1:
_func2:
nop
One solution would be to not emit the subsequent labels with the same address
and use the next label with a different address or the end of the section for
the AT_high_pc value of the TAG_subprogram.
Turns out in llvm-mc it is not possible in all cases to determine of two
symbols have the same value at the point we put out the TAG_subprogram dwarf
debug info.
So we will have llvm-mc instead of putting out TAG_subprogram's put out
DW_TAG_label's. And the DW_TAG_label does not have a AT_high_pc value which
avoids the problem.
This commit is only the functional change to make the diffs clear as to what is
really being changed. The next commit will be to clean up the names of such
things like MCGenDwarfSubprogramEntry to something like MCGenDwarfLabelEntry.
rdar://10666925
llvm-svn: 147860
2012-01-10 17:52:29 +00:00
Rafael Espindola
4ea99816ef
Implement cfi_restore. Patch by Brian Anderson!
...
llvm-svn: 147356
2011-12-29 21:43:03 +00:00
Rafael Espindola
03dbffd8ce
Rename Remember and Restore to RememberState and RestoreState for consistency.
...
llvm-svn: 147354
2011-12-29 21:09:08 +00:00
Rafael Espindola
ef4aa35164
Implement .cfi_escape. Patch by Brian Anderson!
...
llvm-svn: 147352
2011-12-29 20:24:47 +00:00
Bill Wendling
db0f63e345
Re-re-enable compact unwind after fixing a failure in SingleSource/Benchmarks/Shootout-C++/except.cpp and friends. It was encoding the stored registers in the wrong order.
...
llvm-svn: 146617
2011-12-15 00:14:24 +00:00
Bill Wendling
27a9762b3c
Disable to review some failures.
...
llvm-svn: 146545
2011-12-14 02:16:54 +00:00
Kevin Enderby
e7739d484f
The second part of support for generating dwarf for assembly source files. This
...
generates the dwarf Compile Unit DIE and a dwarf subprogram DIE for each
non-temporary label.
The next part will be to get the clang driver to enable this when assembling
a .s file. rdar://9275556
llvm-svn: 146262
2011-12-09 18:09:40 +00:00
Bill Wendling
efdd2f8fef
Re-enable compact unwind. It seems to work now. <rdar://problem/10441838>
...
llvm-svn: 145977
2011-12-06 22:18:12 +00:00
Bob Wilson
8d1c7dbdff
Disable generation of compact unwind encodings. <rdar://problem/10441578>
...
This still seems to be causing some failures. It needs more testing before
it gets enabled again.
llvm-svn: 144543
2011-11-14 18:21:07 +00:00
Bob Wilson
c391f7ff64
Remove FIXME comment that should have been removed with r144351.
...
llvm-svn: 144392
2011-11-11 17:34:14 +00:00
Bill Wendling
70976ad9c2
Reenable compact unwinding now that <rdar://problem/10430076> is fixed.
...
llvm-svn: 144351
2011-11-11 01:03:50 +00:00
Bill Wendling
f311655e3f
Disable compact unwind generation until I can solve the codegen problems.
...
llvm-svn: 144346
2011-11-11 00:28:42 +00:00
Benjamin Kramer
6312682b46
Simplify code. No functionality change.
...
llvm-svn: 144186
2011-11-09 13:19:15 +00:00
Bill Wendling
39674fc008
Emit the compact unwind *if* we have a compact unwind encoding.
...
*headdesk*
llvm-svn: 144138
2011-11-08 22:23:43 +00:00
Benjamin Kramer
69d57cf9c4
Simplify some uses of utohexstr.
...
As a side effect hex is printed lowercase instead of uppercase now.
llvm-svn: 144013
2011-11-07 21:00:59 +00:00
Bill Wendling
9803abb788
As a first step, emit both the compact unwind and CIE/FDEs for a function.
...
llvm-svn: 139152
2011-09-06 18:37:11 +00:00
Evan Cheng
eee864520c
Some autoconf tests use module level inline asm to test compiler's handling of
...
.cfi_startproc. e.g. libffi:
$ cat confopt.c
asm (".cfi_startproc\n\t.cfi_endproc");
int main () { return 0; }
Teach MC / dwarf emission to handle these cfi directives which essentially
create an empty frame.
rdar://10017184
llvm-svn: 138504
2011-08-24 22:31:37 +00:00
Bill Wendling
4d9aa512f8
Emit the __compact_unwind section first. If there are any frames which weren't
...
emitted, emit them next as CIE/FDEs.
llvm-svn: 135807
2011-07-22 21:18:59 +00:00
Evan Cheng
bbf3b0de8b
Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.
...
There is still a bit more refactoring left to do in Targets. But we are now very
close to fixing all the layering issues in MC.
llvm-svn: 135611
2011-07-20 19:50:42 +00:00
Evan Cheng
76792992d6
Add MCObjectFileInfo and sink the MCSections initialization code from
...
TargetLoweringObjectFileImpl down to MCObjectFileInfo.
TargetAsmInfo is done to one last method. It's *almost* gone!
llvm-svn: 135569
2011-07-20 05:58:47 +00:00
Bill Wendling
ada366c691
Micro-opt: Only emit compact unwind if there is a compact unwind encoding to emit.
...
llvm-svn: 135452
2011-07-19 00:09:25 +00:00
Bill Wendling
49bc680bdf
Use the CompactUnwindEncoding from the Frame, if it's defined.
...
llvm-svn: 135451
2011-07-19 00:06:12 +00:00
Evan Cheng
67c033e6b8
Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
...
better location welcome).
llvm-svn: 135438
2011-07-18 22:29:13 +00:00
Evan Cheng
d60fa58ba1
Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
...
to MCRegisterInfo. Also initialize the mapping at construction time.
This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step
towards fixing the layering violation.
llvm-svn: 135424
2011-07-18 20:57:22 +00:00
Evan Cheng
a83b37a9db
Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatest
...
solution but it is a small step towards removing the horror that is
TargetAsmInfo.
llvm-svn: 135237
2011-07-15 02:09:41 +00:00
Bill Wendling
9b8605f787
Remove setting the bit for personality function. It should be set by the linker.
...
llvm-svn: 135236
2011-07-15 01:42:32 +00:00
Bill Wendling
c998f71d14
Encode that we have a personality function.
...
llvm-svn: 135227
2011-07-15 00:07:31 +00:00
Bill Wendling
dafd598f05
* If we have an LSDA, we need to mark it in the encoding.
...
* The personality function should be encoded as an absolute pointer to the function.
llvm-svn: 135215
2011-07-14 23:34:45 +00:00
Evan Cheng
c7ac690ba2
Unfortunately several files in MC are badly violating layering rule by using
...
TargetAsmInfo, which in turn pulls in TargetRegisterInfo, etc. :-( There are
other cases of violations, but this is probably the worst.
This patch is but one small step towards fixing this. 500 more steps to go. :-(
llvm-svn: 135131
2011-07-14 05:43:07 +00:00
Bill Wendling
ee6e776be2
Don't emit the FDE end label if the last thing emitted was a compact unwind and
...
not the FDE
llvm-svn: 135020
2011-07-13 00:49:09 +00:00
Bill Wendling
b6adf46f62
Add a target hook to encode the compact unwind information.
...
llvm-svn: 134577
2011-07-07 00:54:13 +00:00
Bill Wendling
7ed5625082
Clean up the #includes.
...
llvm-svn: 134557
2011-07-06 22:52:32 +00:00
Bill Wendling
c737ac1816
Remove tabs.
...
llvm-svn: 134212
2011-06-30 23:59:38 +00:00
Bill Wendling
40cc749788
Improve comment: Show the register the DWARF label is added to.
...
llvm-svn: 134209
2011-06-30 23:47:40 +00:00
Bill Wendling
2fd8d775df
Add one more comment to the FDE verbose asm output.
...
llvm-svn: 134200
2011-06-30 22:35:49 +00:00
Bill Wendling
f166ab447e
Add comments to the FDE.
...
llvm-svn: 134196
2011-06-30 22:02:20 +00:00
Bill Wendling
e7fe47e53b
Add more comments to the ASM output for the CIE's "moves".
...
llvm-svn: 134194
2011-06-30 21:45:12 +00:00
Bill Wendling
567a1aee85
Add comments to the ASM output to help understand the compact unwind and CIE tables.
...
llvm-svn: 134191
2011-06-30 21:25:51 +00:00
Bill Wendling
7517466970
* Use the proper size to output the range size.
...
* Rough in the compact encoding part.
llvm-svn: 134119
2011-06-30 00:30:52 +00:00
Bill Wendling
4cdb206e76
Stupid error: If the LSDA and Personality functions aren't there, emit 0 instead
...
of the encoding.
llvm-svn: 134117
2011-06-29 23:53:16 +00:00
Bill Wendling
8fa4ada5cf
We don't want to use relocations inside the compact unwind section. Just use the
...
symbols instead.
llvm-svn: 134115
2011-06-29 23:49:12 +00:00
Bill Wendling
25fbb92320
Use a reference. Don't make a useless copy of the vector.
...
llvm-svn: 133707
2011-06-23 07:55:41 +00:00
Bill Wendling
a4b9d1f97b
Formatting changes. No functionality change.
...
llvm-svn: 133706
2011-06-23 07:44:54 +00:00
Bill Wendling
9af2fa9d1b
Use the presence of the __compact_unwind section to indicate that a target
...
supports compact unwind info instead of having a separate flag indicating this.
llvm-svn: 133685
2011-06-23 05:13:28 +00:00
Bill Wendling
e8fc92ad46
Some skeleton code to emit the compact unwind. If the information is unable to
...
be emitted in a compact way, we then default to emitting a CIE and FDE.
llvm-svn: 133676
2011-06-23 01:06:23 +00:00
Benjamin Kramer
f7cb7ef996
Directly print to a raw_ostream instead of printing to a buffer first.
...
llvm-svn: 133352
2011-06-18 14:42:47 +00:00