Commit Graph

95058 Commits

Author SHA1 Message Date
Che-Liang Chiou c03ec0cc42 Add a dummy PTXMCAsmStreamer class
llvm-svn: 118396
2010-11-08 02:58:44 +00:00
Rafael Espindola 9d17a3194e Set default flags for .rodata.
llvm-svn: 118395
2010-11-08 02:47:59 +00:00
Che-Liang Chiou 345b98eddd Add registry hook for assembly text output
llvm-svn: 118394
2010-11-08 02:21:17 +00:00
Greg Clayton 40328bf5f3 Fixed some type parsing that was causing types to thing they were forward
declarations when they should have been.

llvm-svn: 118393
2010-11-08 02:05:08 +00:00
Johnny Chen fa491601b5 Change the test driver so that simply specifying '-f testclass.testmethod' means that
we want to run just the instance of testclass-testmethod combination and nothing else.

Specifying '-g' now will admit the whole .py test module if it does not contain a matching
testclass-testmethod combination at all.

This option arrangement adheres to the RISC principle of making the common cases fast. :-)

rdar://problem/8584914 Can the default for dotest.py's "-g" flag be switched?

llvm-svn: 118392
2010-11-08 01:21:03 +00:00
NAKAMURA Takumi 2fbf57a949 test/CodeGenCXX/rtti-linkage.cpp: Get rid of sort(1) to remove XFAIL: win32.
On the certain system, bogus SORT.EXE is picked up. Its sort-order is incompatible to POSIX.

llvm-svn: 118391
2010-11-08 01:05:10 +00:00
Bill Wendling 424601a9b3 Make RegList an ASM operand so that TableGen will generate code for it. This is
an initial implementation and may change once reglists are fully fleshed out.

llvm-svn: 118390
2010-11-08 00:39:58 +00:00
Bill Wendling 2f9d17c44f Revert.
llvm-svn: 118389
2010-11-08 00:32:40 +00:00
Sean Callanan a4e55178bc Made variable resolution more robust by handling
every external variable reference in the module,
and returning a clean error (instead of letting
LLVM issue a fatal error) if the variable could
not be resolved.

llvm-svn: 118388
2010-11-08 00:31:32 +00:00
Greg Clayton 7481c20f09 Fixed FileSpec's operator == to deal with equivalent paths such as "/tmp/a.c"
and "/private/tmp/a.c". This was done by adding a "mutable bool m_is_resolved;"
member to FileSpec and then modifying the equal operator to check if the
filenames are equal, and if they are, then check the directories. If they are
not equal, then both paths are checked to see if they have been resolved. If
they have been resolved, we resolve the paths in temporary FileSpec objects
and set each of the m_is_resolved bools to try (for lhs and rhs) if the paths
match what is contained in the path. This allows us to do more intelligent
compares without having to resolve all paths found in the debug info (which
can quickly get costly if the files are on remote NFS mounts).

llvm-svn: 118387
2010-11-08 00:28:40 +00:00
Rafael Espindola 96aef794ba Use the integrated assembler when procession .s files on OpenBSD and Linux.
Original patch for OpenBSD by Vladimir Kirillov.

llvm-svn: 118386
2010-11-07 23:13:01 +00:00
Douglas Gregor 1ccc8416a0 Remove broken support for variadic templates, along with the various
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.

But don't get too excited about that happening now.

llvm-svn: 118385
2010-11-07 23:05:16 +00:00
Rafael Espindola 1c76c59bbc Add support for -rdynamic.
llvm-svn: 118384
2010-11-07 22:57:16 +00:00
Greg Clayton 2ccf8cfc4b Modified the DWARF parser for both the single DWARF file and for the case
where the DWARF is in the .o files so they can track down the actual type for
a forward declaration. This was working before for just DWARF files, but not
for DWARF in .o files where the actual definition was in another .o file.

Modified the main thread name in the driver to be more consistent with the
other LLDB thread names.

llvm-svn: 118383
2010-11-07 21:02:03 +00:00
Rafael Espindola c8f008f649 Use ld directly on linux. Changes from the previous try:
*) Try to detect as much as possible from the system itself, not the distro.
   This should make it easier to port to a new distro and more likely to
   work on a unknown one.
*) The distro enum now doesn't include the arch. Just use the existing
   host detection support in LLVM.
*) Correctly handle --sysroot.

A small regression is that now clang will pass bitcode file to the linker.
This is necessary for the gold plugin support to work.

It might be better to detect this at configure/cmake time, but doing it in
c++ first is a lot easier.

llvm-svn: 118382
2010-11-07 20:14:31 +00:00
Anders Carlsson 2ceb347e8b A union cannot contain static data members or data members of reference type.
llvm-svn: 118381
2010-11-07 19:13:55 +00:00
Duncan Sands a620bd1fa3 Add simplification of floating point comparisons with the result
of a select instruction, the same as already exists for integer
comparisons.

llvm-svn: 118379
2010-11-07 16:46:25 +00:00
Duncan Sands f532d31198 Fix a README item: when doing a comparison with the result
of a select instruction, see if doing the compare with the
true and false values of the select gives the same result.
If so, that can be used as the value of the comparison.

llvm-svn: 118378
2010-11-07 16:12:23 +00:00
Rafael Espindola 20b11eaa01 Speed up AddSectionToTheEnd. It was walking all fragments in all sections.
This is really slow with we have 1000s of sections each with a corresponding
relocation section. Also, it is only used by the ELF writer to add
basic data, so there is no need to force a new layout pass.

Should fix PR8563.

llvm-svn: 118377
2010-11-07 15:03:27 +00:00
Rafael Espindola 5a27007bb7 typos
llvm-svn: 118376
2010-11-07 13:48:10 +00:00
Bill Wendling 68bac75190 In this context, a reglist is a reg.
llvm-svn: 118375
2010-11-07 13:08:28 +00:00
Ted Kremenek 6a15337ded Change the StringSet used by CalculateHiddenNames() to use a BumpPtrAllocator.
llvm-svn: 118372
2010-11-07 06:11:36 +00:00
Ted Kremenek b4ea9a843a Fix memory leak of IdentifierIterator object.
llvm-svn: 118371
2010-11-07 06:11:33 +00:00
Ted Kremenek 3e100cf582 Fix memory leak in StringRef::edit_distance(). 'Allocated' could be leaked on an early return.
llvm-svn: 118370
2010-11-07 06:09:02 +00:00
Dale Johannesen 7bcbfe9c80 Testcase for llvm-gcc 118368. 8629268.
llvm-svn: 118369
2010-11-07 04:58:48 +00:00
Rafael Espindola 559b8fbffc Add method for checking if a path is a symbolic link.
llvm-svn: 118367
2010-11-07 04:36:50 +00:00
John McCall 2faab302e0 ARM EH uses a different personality function in C.
llvm-svn: 118366
2010-11-07 02:35:25 +00:00
Rafael Espindola 5665a93bc5 Relax dwarf line fragments. This fixes a crash in the included testcase.
llvm-svn: 118365
2010-11-07 02:07:12 +00:00
Chris Lattner 0530c024b6 implement aliases for div/idiv that have an explicit A register operand,
implementing rdar://8431864

llvm-svn: 118364
2010-11-06 22:41:18 +00:00
Bill Wendling e18980aeaa Add support for parsing register lists. We can't use a bitfield to keep track of
the registers, because the register numbers may be much greater than the number
of bits available in the machine's register.

I extracted the register list verification code out of the actual parsing of the
registers. This made checking for errors much easier. It also limits the number
of warnings that would be emitted for cascading infractions.

llvm-svn: 118363
2010-11-06 22:36:58 +00:00
Chris Lattner 9654e108d7 add aliases for movs between seg registers and mem. There are multiple
different forms of this instruction (movw/movl/movq) which we reported
as being ambiguous.  Since they all do the same thing, gas just picks the
one with the shortest encoding.  Follow its lead here.

This implements rdar://8208615

llvm-svn: 118362
2010-11-06 22:35:34 +00:00
Chris Lattner 7923358842 move the "sh[lr]d op,op" -> "shld $1, op,op" aliases to the .td file.
llvm-svn: 118361
2010-11-06 22:25:39 +00:00
Bill Wendling b884a8ee44 Return the base register of a register list for the "getReg()" method. This is
to satisfy the ClassifyOperand method of the Asm matcher without having to add a
RegList type to every back-end.

llvm-svn: 118360
2010-11-06 22:19:43 +00:00
Chris Lattner d6746d5b46 pass literals like $$1 through to the asm matcher. This isn't right yet, but doesn't hurt.
llvm-svn: 118359
2010-11-06 22:06:03 +00:00
Chris Lattner 2abbeded98 work-in-progress
llvm-svn: 118358
2010-11-06 22:05:43 +00:00
Bill Wendling ee7f1f9914 General cleanup:
- Make ARMOperand a class so that some things are internal to the class.
- Reformatting.

llvm-svn: 118357
2010-11-06 21:42:12 +00:00
Chris Lattner ca7801e472 go to great lengths to work around a GAS bug my previous patch
exposed:

GAS doesn't accept "fcomip %st(1)", it requires "fcomip %st(1), %st(0)"
even though st(0) is implicit in all other fp stack instructions.

Fortunately, there is an alias for fcomip named "fcompi" and gas does
accept the default argument for the alias (boggle!).

As such, switch the canonical form of this instruction to "pi" instead
of "ip".  This makes the code generator and disassembler generate pi,
avoiding the gas bug.

llvm-svn: 118356
2010-11-06 21:37:06 +00:00
Chris Lattner 64f91b9825 rework the rotate-by-1 instructions to be defined like the
shift-by-1 instructions, where the asmstring doesn't contain
the implicit 1.  It turns out that a bunch of these rotate
instructions were completely broken because they used 1 
instead of $1.

This fixes assembly mismatches on "rclb	$1, %bl" and friends,
where we used to generate the 3 byte form, we now generate the
proper 2-byte form.

llvm-svn: 118355
2010-11-06 21:23:40 +00:00
Chris Lattner 05031e7f1a change the fp comparison instructions to not have %st0 explicitly
listed in its asm string, for consistency with the other similar
instructions.

llvm-svn: 118354
2010-11-06 20:55:09 +00:00
Chris Lattner 290199f8ee move the plethora of fp stack aliases to the .td file.
llvm-svn: 118353
2010-11-06 20:47:38 +00:00
Chris Lattner 4869d346e3 add (and document) the ability for alias results to have
fixed physical registers.  Start moving fp comparison
aliases to the .td file (which default to using %st1 if
nothing is specified).

llvm-svn: 118352
2010-11-06 19:57:21 +00:00
Bill Wendling 7cef447c14 Add a RegList (register list) object to ARMOperand. It will be used soon to hold
(surprise!) a list of registers. Register lists are consecutive, so we only need
to record the start register plus the number of registers.

llvm-svn: 118351
2010-11-06 19:56:04 +00:00
Chris Lattner b6f8e8248d generalize alias support to allow the result of an alias to
add fixed immediate values.  Move the aad and aam aliases to
use this, and document it.

llvm-svn: 118350
2010-11-06 19:25:43 +00:00
Chris Lattner 161bf7de25 move fnstsw aliases to .td file, fix typo
llvm-svn: 118349
2010-11-06 18:58:32 +00:00
Chris Lattner ec66010e80 move in/out aliases to the .td files.
llvm-svn: 118348
2010-11-06 18:52:40 +00:00
Chris Lattner 6881e175c3 move sldt, imul, and movabsq aliases from c++ to .td file.
llvm-svn: 118347
2010-11-06 18:44:26 +00:00
Chris Lattner fab9413b01 correct suffix matching to search for s/l/t suffixes on
floating point stack instructions instead of looking for b/w/l/q.

This fixes issues where we'd accidentally match fistp to fistpl,
when it is in fact an ambiguous instruction.

This changes the behavior of llvm-mc to reject fstp, which was the
correct fix for rdar://8456389:
t.s:1:1: error: ambiguous instructions require an explicit suffix (could be 'fstps', 'fstpl', or 'fstpt')
fstp	(%rax)

it also causes us to correctly reject fistp and fist, which addresses
PR8528:

t.s:2:1: error: ambiguous instructions require an explicit suffix (could be 'fistps', or 'fistpl')
fistp (%rax)
^
t.s:3:1: error: ambiguous instructions require an explicit suffix (could be 'fists', or 'fistl')
fist (%rax)
^

Thanks to Ismail Donmez for tracking down the issue here!

llvm-svn: 118346
2010-11-06 18:28:02 +00:00
Argyrios Kyrtzidis 48e672a380 Add a comment.
llvm-svn: 118345
2010-11-06 18:09:55 +00:00
Anders Carlsson 3fd50319d3 Don't warn when matching %p to nullptr.
llvm-svn: 118344
2010-11-06 14:58:53 +00:00
Benjamin Kramer 63abc84630 Prune includes.
llvm-svn: 118342
2010-11-06 11:45:59 +00:00