Rafael Espindola
b6444c0401
Small cleanups.
...
llvm-svn: 131120
2011-05-10 03:26:21 +00:00
Rafael Espindola
0e130d1d37
Remove unused argument.
...
llvm-svn: 131118
2011-05-10 03:01:39 +00:00
NAKAMURA Takumi
392445823d
Eliminate an unused line to fix a warning.
...
llvm-svn: 131078
2011-05-08 23:19:04 +00:00
Rafael Espindola
ab39c63538
Don't force relaxation of AdvanceLoc instructions on OS X. gdb is happy with
...
the smaller encoding and this cuts 270336 bytes from a release version of
clang and 1246272 bytes from a debug build.
llvm-svn: 131067
2011-05-08 14:35:21 +00:00
Rafael Espindola
bcabcdcedd
Switch Darwin to the generic CIE/FDE printer.
...
llvm-svn: 131031
2011-05-06 22:29:04 +00:00
Daniel Dunbar
f6daf94ab2
MCDwarf: Don't save Twine to local variable, this is almost never safe to do
...
(and should thus never be done).
- Should fix a crash on win32.
llvm-svn: 130793
2011-05-03 21:33:37 +00:00
Rafael Espindola
750cb61553
GCC uses a different encoding of pointers in the FDE when using
...
-fno-dwarf2-cfi-asm. Implement the same behavior.
llvm-svn: 130637
2011-05-01 04:49:54 +00:00
Rafael Espindola
fd05785324
Simplify the handling of pcrel relocations on ELF. Now we do the right thing
...
for all symbol differences and can drop the old EmitPCRelSymbolValue
method.
This also make getExprForFDESymbol on ELF equal to the one on MachO, and it
can be made non-virtual.
llvm-svn: 130634
2011-05-01 03:50:49 +00:00
Rafael Espindola
6a85f9b42e
Avoid some uses of .uleb128. This is a small speedup and more importantly
...
lets this code be used when producing assembly code for old assemblers without
uleb support.
llvm-svn: 130544
2011-04-29 21:50:57 +00:00
Rafael Espindola
68067664c3
Last bit by bit compatibility patch to MCDwarf.cpp: If a FDE with no LSDA is
...
assigned to a CIE that requires one, just output a 0.
llvm-svn: 130472
2011-04-29 03:06:29 +00:00
Rafael Espindola
7c7151512c
Add an alternative implementation of CIE and FDE emission that outputs them
...
in the same order as the one in CodeGen.
llvm-svn: 130471
2011-04-29 02:42:28 +00:00
Rafael Espindola
6bd6a70837
Add the getExprForFDESymbol method that responsible for computing the
...
expressions used in the FDE to refer to symbols.
llvm-svn: 130437
2011-04-28 21:04:39 +00:00
Rafael Espindola
c5dac4df2e
Add a getExprForPersonalitySymbol method to MCAsmInfo. Use it when
...
converting the symbol passed to .cfi_personality into bytes is the file.
llvm-svn: 130400
2011-04-28 16:09:09 +00:00
Rafael Espindola
349c3298da
Mark the EH symbol global or weak if the corresponding function is.
...
llvm-svn: 130397
2011-04-28 12:50:37 +00:00
Rafael Espindola
2eeee8cfef
Add a small temporary hack for producing identical eh_frame sections on OS X.
...
This removes one of the main advantages of moving eh_frame to MC, but
makes the transition a lot easier to debug (run md5).
llvm-svn: 130379
2011-04-28 04:04:14 +00:00
Rafael Espindola
bf60fb0a37
Produce the EH_frame# symbols if needed.
...
llvm-svn: 130378
2011-04-28 03:26:11 +00:00
Rafael Espindola
96b07932a3
Forward isFunctionEHFrameSymbolPrivate. If it is false, produce the foo.eh
...
symbols.
llvm-svn: 130375
2011-04-28 02:46:42 +00:00
Rafael Espindola
ae124da625
Force some values to be absolute and align based on the FDE pointers size. A small
...
step towards using .cfi_* on OS X.
llvm-svn: 130273
2011-04-27 01:43:49 +00:00
Chandler Carruth
bab81b9797
Delete the other unused variable in this function. Sorry I missed this
...
the first time through.
llvm-svn: 129969
2011-04-22 01:29:18 +00:00
Chandler Carruth
ea41470726
Remove an unused variable from a function. This is a likely cut-paste-o.
...
Silences GCC warning.
I wonder why Clang doesn't warn on this...
llvm-svn: 129968
2011-04-22 01:21:06 +00:00
Rafael Espindola
5395f44fe8
Compute the size of the FDE encoding instead of hard coding it. Update
...
X8664_ELFTargetObjectFile::getFDEEncoding to match reality.
llvm-svn: 129959
2011-04-22 00:08:43 +00:00
Rafael Espindola
6aea59268a
Remove unused argument.
...
llvm-svn: 129955
2011-04-21 23:39:26 +00:00
Rafael Espindola
ea61f22dd3
Don't pass address spaces to EmitULEB128IntValue.
...
llvm-svn: 129953
2011-04-21 23:26:40 +00:00
Rafael Espindola
fd794affe5
Remove LastOffset from the asm parser.
...
llvm-svn: 129378
2011-04-12 18:53:30 +00:00
Rafael Espindola
1ec0f46169
Fix the case of a .cfi_rel_offset before any .cfi_def_cfa_offset.
...
llvm-svn: 129362
2011-04-12 16:12:03 +00:00
Rafael Espindola
2e1c9d2188
Implement .cfi_same_value.
...
llvm-svn: 129361
2011-04-12 15:31:05 +00:00
Anton Korobeynikov
2f93128109
Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.
...
llvm-svn: 123170
2011-01-10 12:39:04 +00:00
Benjamin Kramer
570dd787a6
Make a bunch of symbols internal.
...
llvm-svn: 122642
2010-12-30 22:34:44 +00:00
Rafael Espindola
46a5b05207
Correctly encode pcrel|indirect.
...
llvm-svn: 122624
2010-12-29 04:31:26 +00:00
Rafael Espindola
563301dfdb
Fix bug when trying to output uint16_t or uint32_t.
...
llvm-svn: 122615
2010-12-29 02:30:49 +00:00
Rafael Espindola
290d71671e
Implement cfi_def_cfa. Also don't convert to dwarf reg numbers twice. Looks
...
like 6 is a fixed point of that and so the previous tests were OK :-)
llvm-svn: 122614
2010-12-29 01:42:56 +00:00
Rafael Espindola
6bbfb6c06c
Don't produce a "DW_CFA_advance_loc 0".
...
llvm-svn: 122609
2010-12-28 23:38:03 +00:00
Rafael Espindola
85d91982ca
Implement .cfi_remember_state and .cfi_restore_state.
...
llvm-svn: 122602
2010-12-28 18:36:23 +00:00
Duncan Sands
3784c5ea3c
Fix warning about size potentially being used uninitialized
...
when doing a release build.
llvm-svn: 122594
2010-12-28 10:02:42 +00:00
Rafael Espindola
736a35d9ab
Relax address updates in the eh_frame section.
...
llvm-svn: 122591
2010-12-28 05:39:27 +00:00
Rafael Espindola
a75b87b55a
Start adding basic support for emitting the call frame instructions.
...
llvm-svn: 122590
2010-12-28 04:15:37 +00:00
Rafael Espindola
1de2dd0e5e
Add support for .cfi_lsda.
...
llvm-svn: 122584
2010-12-27 15:56:22 +00:00
Rafael Espindola
2ac8355ecd
Add support for the same encodings of the personality function that gnu as
...
supports.
llvm-svn: 122577
2010-12-27 00:36:05 +00:00
Rafael Espindola
54462cd730
Fix .cfi_personality on 32 bit systems.
...
llvm-svn: 122570
2010-12-26 22:47:37 +00:00
Rafael Espindola
9141b611ad
Add basic support for .cfi_personality.
...
llvm-svn: 122566
2010-12-26 20:20:31 +00:00
Rafael Espindola
32c74ea3ab
"Fix" FDE alignment to match what gas does.
...
llvm-svn: 122006
2010-12-17 00:28:02 +00:00
Rafael Espindola
0a017a6db2
Fixed version of 121434 with no new memory leaks.
...
llvm-svn: 121471
2010-12-10 07:39:47 +00:00
Rafael Espindola
a945a34c73
Revert my previous patch to make the valgrind bots happy.
...
llvm-svn: 121461
2010-12-10 04:01:09 +00:00
Rafael Espindola
56eb741237
Initial support for the cfi directives. This is just enough to get
...
f:
.cfi_startproc
nop
.cfi_endproc
assembled (on ELF).
llvm-svn: 121434
2010-12-09 23:48:29 +00:00
Rafael Espindola
d66e65df03
Use const references.
...
llvm-svn: 121426
2010-12-09 23:08:35 +00:00
Rafael Espindola
44bbe36de6
Second try at making direct object emission produce the same results
...
as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc
bootstrap on darwin10 using darwin9's assembler and linker.
llvm-svn: 121006
2010-12-06 17:27:56 +00:00
Rafael Espindola
dee3062373
Revert previous two patches while I try to find out how to make both
...
linux and darwin assemblers happy :-(
llvm-svn: 121004
2010-12-06 15:35:15 +00:00
Rafael Espindola
34a06a0802
Add an EmitAbsValue helper method and use it in cases where we want to be sure
...
that no relocations are used (on MochO).
Fixes llc producing different output from llc + llvm-mc.
llvm-svn: 121000
2010-12-06 14:53:14 +00:00
Rafael Espindola
99e026dbca
Remember the contents of leb and dwarfline fragments when relaxing. This avoids
...
having to evaluate the expression again when writing.
llvm-svn: 120920
2010-12-04 21:58:52 +00:00
Rafael Espindola
1c8ac8f027
There are two reasons why we might want to use
...
foo = a - b
.long foo
instead of just
.long a - b
First, on darwin9 64 bits the assembler produces the wrong result. Second,
if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not
consider a - b to be a constant but will if the dummy foo is created.
Split how we handle these cases. The first one is something MC should take care
of. The second one has to be handled by the caller.
llvm-svn: 120889
2010-12-04 03:21:47 +00:00