Chris Lattner
|
92aba5a817
|
propagate cookie management out one layer of function calls.
llvm-svn: 100510
|
2010-04-06 00:58:50 +00:00 |
|
Chris Lattner
|
59126b2500
|
report errors through LLVMContext's inline asm handler if available.
llvm-svn: 100509
|
2010-04-06 00:55:39 +00:00 |
|
Devang Patel
|
fc4a1db23b
|
Remove unnecessary include.
llvm-svn: 100505
|
2010-04-06 00:38:32 +00:00 |
|
Chris Lattner
|
3b21e4d404
|
Give AsmParser an option to control whether it finalizes
the stream. New demo:
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
000000000000000b movl %eax,(%rsp)
000000000000000e movl %eax,0x04(%rsp)
0000000000000012 addq $0x08,%rsp
0000000000000016 ret
llvm-svn: 100492
|
2010-04-05 23:15:42 +00:00 |
|
Chris Lattner
|
8900ef1931
|
add .o file writing for inline asm in llc. Here's a silly
demo:
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
LLVM ERROR: Error parsing inline asm
Only problem seems to be that the parser finalizes OutStreamer
at the end of the first inline asm, which isn't what we want.
For example:
$ cat asm.c
int foo(int X) {
__asm__ ("incl %0" : "+r" (X));
return X;
}
$ clang asm.c -S -o - -emit-llvm | llc
...
subq $8, %rsp
movl %edi, (%rsp)
movl %edi, %eax
## InlineAsm Start
incl %eax
## InlineAsm End
movl %eax, (%rsp)
movl %eax, 4(%rsp)
addq $8, %rsp
ret
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
$
don't stop at inc!
llvm-svn: 100491
|
2010-04-05 23:11:24 +00:00 |
|
Bill Wendling
|
30346347b3
|
Output floating point representations in DWARF format. This is done by outputing
the FP encoding directly as a hex representation.
llvm-svn: 100487
|
2010-04-05 22:59:21 +00:00 |
|
Chris Lattner
|
0e45d24a4e
|
stringref-ize the MemoryBuffer::get apis. This requires
a co-committed clang patch.
llvm-svn: 100485
|
2010-04-05 22:42:30 +00:00 |
|
Chris Lattner
|
28f2fdafcd
|
hopefully sate the clang self host build, which is apparently
instantiating some folding set stuff that GCC isn't, requiring
some types to not be incomplete.
I don't know if clang is right or wrong, but unbreaking the
bot is goodness. Here's the broken build:
http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/1813/steps/compile.llvm.stage2/logs/stdio
llvm-svn: 100418
|
2010-04-05 06:12:01 +00:00 |
|
Chris Lattner
|
64a168efb6
|
privatize more stuff, eliminate vtables.
llvm-svn: 100410
|
2010-04-05 05:32:45 +00:00 |
|
Chris Lattner
|
acda87bdb1
|
reprivatize now that DwarfWriter is gone.
llvm-svn: 100409
|
2010-04-05 05:31:04 +00:00 |
|
Chris Lattner
|
da790ea006
|
prune #includes, MMI can never be null
llvm-svn: 100408
|
2010-04-05 05:28:23 +00:00 |
|
Chris Lattner
|
3f3fb970e4
|
prune #includes, realize the MMI can never be null.
llvm-svn: 100407
|
2010-04-05 05:24:55 +00:00 |
|
Chris Lattner
|
10cb0f4338
|
finally blast DwarfWriter away.
llvm-svn: 100406
|
2010-04-05 05:12:59 +00:00 |
|
Chris Lattner
|
f0d6bd3ef4
|
change AsmPrinter to use DwarfDebug/DwarfException directly
instead of going through DwarfWriter.
llvm-svn: 100405
|
2010-04-05 05:11:15 +00:00 |
|
Chris Lattner
|
f5d0636850
|
trim some spurious references to DwarfWriter. SDIsel really doesn't
need it anymore, so don't addRequire it.
llvm-svn: 100400
|
2010-04-05 04:09:20 +00:00 |
|
Chris Lattner
|
196dbdc160
|
eliminate DwarfDebug::shouldEmit, which is the same now as MMI::hasDebugInfo
llvm-svn: 100386
|
2010-04-05 03:52:55 +00:00 |
|
Chris Lattner
|
d2f5062c6d
|
fix a regression on 2009-08-17-DebugInfo.m
llvm-svn: 100385
|
2010-04-05 03:49:26 +00:00 |
|
Chris Lattner
|
7cfa70e9b3
|
fastisel doesn't need DwarfWriter, remove some tendricles.
llvm-svn: 100381
|
2010-04-05 02:19:28 +00:00 |
|
Chris Lattner
|
626cb66fdb
|
just have all targets create the DwarfWriter.
llvm-svn: 100377
|
2010-04-05 00:42:55 +00:00 |
|
Chris Lattner
|
eeaa6d67a2
|
nuke DwarfPrinter
llvm-svn: 100375
|
2010-04-05 00:27:29 +00:00 |
|
Chris Lattner
|
fd79502e08
|
make DwarfException not inherit from DwarfPrinter.
llvm-svn: 100374
|
2010-04-05 00:26:50 +00:00 |
|
Chris Lattner
|
5a00dea332
|
change SizeOf to take AsmPrinter instead of TargetData,
simplifying a bunch of code.
llvm-svn: 100373
|
2010-04-05 00:18:22 +00:00 |
|
Chris Lattner
|
3a383cb7d9
|
1) make DIE take AsmPrinter instead of DwarfPrinter.
2) change DwarfDebug to not inherit from DwarfPrinter.
llvm-svn: 100372
|
2010-04-05 00:13:49 +00:00 |
|
Chris Lattner
|
aabc6041de
|
Move EmitFrameMoves into AsmPrinter.
llvm-svn: 100371
|
2010-04-04 23:41:46 +00:00 |
|
Chris Lattner
|
8423cae590
|
simplify code and reduce indentation.
llvm-svn: 100369
|
2010-04-04 23:31:58 +00:00 |
|
Chris Lattner
|
70a4fcea1e
|
now that the magic is dispelled, move EmitSectionOffset to AsmPrinter.
llvm-svn: 100368
|
2010-04-04 23:25:33 +00:00 |
|
Chris Lattner
|
324c86600d
|
eliminate the magic AbsoluteDebugSectionOffsets MAI hook,
which is really a property of the section being referenced.
Add a predicate to MCSection to replace it.
Yay for reduction in magic.
llvm-svn: 100367
|
2010-04-04 23:22:29 +00:00 |
|
Chris Lattner
|
d442aa368d
|
only emit section labels if we have debug info, fixing a few
regtest failures.
llvm-svn: 100366
|
2010-04-04 23:17:54 +00:00 |
|
Chris Lattner
|
e58b547460
|
I was wrong, ocaml isn't referencing 'Ldata_begin', so remove it.
llvm-svn: 100365
|
2010-04-04 23:10:38 +00:00 |
|
Chris Lattner
|
0d3f3bdd3c
|
add some assertions to EmitSectionOffset.
llvm-svn: 100364
|
2010-04-04 23:06:31 +00:00 |
|
Chris Lattner
|
1fbf53b970
|
stop emitting some dead L labels.
llvm-svn: 100363
|
2010-04-04 23:02:02 +00:00 |
|
Chris Lattner
|
6629ca978e
|
Store an use the symbols emitted at the start of the debug
sections instead of magically rematerializing them later.
llvm-svn: 100362
|
2010-04-04 22:59:04 +00:00 |
|
Chris Lattner
|
46355d87a8
|
remove the didInitial ivar, rename emitInitial to be more
descriptive, change EmitSectionOffset back to taking a
symbol instead of a string.
llvm-svn: 100361
|
2010-04-04 22:33:59 +00:00 |
|
Chris Lattner
|
78528f9a36
|
simplify EmitSectionOffset a little bit, improve comments.
llvm-svn: 100360
|
2010-04-04 22:25:14 +00:00 |
|
Chris Lattner
|
638b3e0000
|
The "IsSmall" argument to EmitSectionOffset is always true,
constant fold it away.
llvm-svn: 100356
|
2010-04-04 21:34:40 +00:00 |
|
Chris Lattner
|
c7cc815522
|
eliminate the "isEH" argument to EmitSectionOffset.
llvm-svn: 100355
|
2010-04-04 21:31:54 +00:00 |
|
Chris Lattner
|
e239fa05cd
|
isAbsoluteEHSectionOffsets always returns false, eliminate it
and substitute false at the one call site.
llvm-svn: 100354
|
2010-04-04 21:29:44 +00:00 |
|
Chris Lattner
|
e619c0d3e9
|
move some more stuff to asmprinter.
llvm-svn: 100351
|
2010-04-04 20:20:50 +00:00 |
|
Chris Lattner
|
07c1b94faa
|
simplify some code.
llvm-svn: 100350
|
2010-04-04 20:10:41 +00:00 |
|
Chris Lattner
|
b75af3c5a9
|
move EmitEncodingByte to AsmPrinter.
llvm-svn: 100349
|
2010-04-04 20:04:21 +00:00 |
|
Chris Lattner
|
baf2be0561
|
move EmitCFAByte to AsmPrinter.
llvm-svn: 100348
|
2010-04-04 20:01:25 +00:00 |
|
Chris Lattner
|
f1429f1fe3
|
inline EmitDifference away.
llvm-svn: 100347
|
2010-04-04 19:58:12 +00:00 |
|
Chris Lattner
|
4e4549deea
|
resolve a fixme.
llvm-svn: 100346
|
2010-04-04 19:28:59 +00:00 |
|
Chris Lattner
|
a179b52361
|
move gettemplabel and getdwlabel to AsmPrinter and rename
them for consistency.
llvm-svn: 100345
|
2010-04-04 19:25:43 +00:00 |
|
Chris Lattner
|
9efd118938
|
move uleb/sleb printing into AsmPrinter from DwarfPrinter.
llvm-svn: 100344
|
2010-04-04 19:09:29 +00:00 |
|
Chris Lattner
|
2b40a207bc
|
more interface cleanup make some helpers static functions.
llvm-svn: 100343
|
2010-04-04 18:58:53 +00:00 |
|
Chris Lattner
|
7bde8c07a7
|
clean up the asmprinter header and privatize some stuff.
llvm-svn: 100342
|
2010-04-04 18:52:31 +00:00 |
|
Chris Lattner
|
baa2c972e9
|
use stringref instead of strtol to avoid errno gymnastics.
llvm-svn: 100341
|
2010-04-04 18:42:18 +00:00 |
|
Chris Lattner
|
1e15869d1f
|
split inline asm support out to its own .cpp file.
llvm-svn: 100340
|
2010-04-04 18:34:07 +00:00 |
|
Chris Lattner
|
8ff29c523e
|
inline processDebugLoc and simplify it.
llvm-svn: 100339
|
2010-04-04 18:18:51 +00:00 |
|