Commit Graph

31278 Commits

Author SHA1 Message Date
Daniel Dunbar
b2d0b6b8c7 llvm-mc: When handling a .set, make sure to print subsequent references to the
symbol as the symbol name itself, not the expression it was defined to. These
have different semantics due to the quirky .set behavior (which absolutizes an
expression that would otherwise be treated as a relocation).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 19:10:46 +00:00
Anton Korobeynikov
9b9014f2a0 Cleanup the mess in msp430 target registration and hopefully unbreak the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79024 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 19:06:50 +00:00
Evan Cheng
bba9f5f378 Indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 19:01:37 +00:00
Daniel Dunbar
12de0df59f llvm-mc: zerofill shouldn't print quotes around the section,segment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79017 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:51:45 +00:00
Chris Lattner
56ce0f415c fix "pc" to be lower case in a target triple, patch by Yonggang Luo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79016 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:48:13 +00:00
Anton Korobeynikov
37f1cbd522 Hopefully unbreak cmake builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79015 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:46:49 +00:00
Evan Cheng
31b99dd760 Also shrink immediate branches; also more assembler workarounds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:31:44 +00:00
Anton Korobeynikov
960a7c9ad1 Give MSP430 a separate asmprinter lib
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79012 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:28:12 +00:00
Anton Korobeynikov
2247276c6f Properly handle indirect win64 args when they're passed in memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79009 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:19:10 +00:00
Owen Anderson
267a0ff045 Get the CPP backend into some semblance of working by updating for numerous LLVMContext changes,
as well as the StringRef change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79006 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 17:41:33 +00:00
Bob Wilson
22cac0d9b3 Now that all the legal Neon shuffles (or at least the ones that have been
implemented so far) are recognized during legalization, it is easy to fall
back to the default expansion for other shuffles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78995 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 05:16:33 +00:00
Bob Wilson
c1d287b4b7 Create a new ARM-specific DAG node, VDUP, to represent a splat from a
scalar_to_vector.  Generate these VDUP nodes during legalization instead
of trying to recognize the pattern during selection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78994 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 05:13:08 +00:00
Bob Wilson
0ce3710825 During legalization, change Neon vdup_lane operations from shuffles to
target-specific VDUPLANE nodes.  This allows the subreg handling for the
quad-register version to be done easily with Pats in the .td file, instead
of with custom code in ARMISelDAGToDAG.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78993 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 05:08:32 +00:00
Oscar Fuentes
93db2f0f53 CMake: updated list of source files for library MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 04:14:45 +00:00
Daniel Dunbar
c22e0b2443 Update llvm-mc / MCAsmStreamer to print the instruction using the actual target
specific printer (this only works on x86, for now).
 - This makes it possible to do some correctness checking of the parsing and
   matching, since we can compare the results of 'as' on the original input, to
   those of 'as' on the output from llvm-mc.

 - In theory, we could now have an easy ATT -> Intel syntax converter. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78986 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 03:48:55 +00:00
Daniel Dunbar
575327b77e Add virtual printMCInst method to AsmPrinter, as a quick way to expose the API
to print one instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 03:43:57 +00:00
Daniel Dunbar
61466c50df Add X86 instruction printer support for printing MCValue operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78984 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 03:42:12 +00:00
Daniel Dunbar
1689e0cf55 Add MCSymbol::{print, dump}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78983 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 03:41:23 +00:00
Daniel Dunbar
2c11624b65 Add MCValue::{print, dump}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78982 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 03:11:09 +00:00
Daniel Dunbar
7b7f51425e llvm-mc: Move MCAsmToken::getLoc() into MC library where it belongs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78980 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 02:18:40 +00:00
Evan Cheng
7cefd80bd5 Indentation change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78978 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 01:56:37 +00:00
Evan Cheng
a1efbbdbf3 Shrink ADR and LDR from constantpool late during constantpool island pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78970 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 00:32:16 +00:00
Evan Cheng
1135a232eb New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78968 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 00:16:47 +00:00
Dan Gohman
7eb28f3786 Make TargetData optional in GlobalOpt and ArgumentPromotion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78967 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 00:11:03 +00:00
Dan Gohman
fa9ca0f788 Make these matching rules more strict so that they don't
accidentally match unrelated things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78966 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 00:10:19 +00:00
Erick Tryzelaar
22c3f1877d Expose LLVMContext to llvm-c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78964 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 00:01:31 +00:00
Dan Gohman
86cba32bb4 Fix MCSectionELF::ShouldOmitSectionDirective's matching of .data and
friends so that it doesn't match sections like .data.rel.local, which
should not be emitted as section directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78963 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 23:56:34 +00:00
Daniel Dunbar
7894578470 TargetRegistry: Change AsmPrinter constructor to be typed as returning an
AsmPrinter instance (instead of just a FunctionPass)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 23:48:47 +00:00
Daniel Dunbar
011e4db845 llvm-mc: Add dummy MCStreamer implementation, (eventually) for use in profiling.
- Currently unused.

 - A few other random comment fixes lumped in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 23:36:34 +00:00
Bruno Cardoso Lopes
fdf229eda9 Remove HasCrazyBSS and add a flag in TAI to indicate that '.section'
must be emitted for PowerPC-Linux '.bss' section


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78958 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 23:30:21 +00:00
Owen Anderson
0e275dc538 Actually privatize a IntegerTypes, and fix a few bugs exposed by this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78955 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 23:27:32 +00:00
Dan Gohman
ec9b26100e When standard output is a terminal, set outs() to be unbuffered, to
mimic the behavior of stdtout, which is line-buffered when the output
is a terminal. This fixes some issues with bugpoint output appearing
being printed out of order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 23:18:56 +00:00
Dan Gohman
6c304f2314 Make formatted_raw_ostream restore the buffer settings of the
underlying stream when it is finished, so that clients don't
have to do this manually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78952 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 23:16:59 +00:00
Dan Gohman
009fc9e5d9 Take the fast path for any named value and any GlobalValue, which doesn't
need TypePrinting despite being a subclass of Constant. This fixes
compile-time problems especially visible on 403.gcc when -asm-verbose is
enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78951 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 23:07:11 +00:00
Owen Anderson
1d0be15f89 Push LLVMContexts through the IntegerType APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 21:58:54 +00:00
Bruno Cardoso Lopes
d163e8b14c Remove hack used to strip unwanted chars from section name
Use MCSectionELF methods as much as possible, removing some
ELFWriter methods which are now unused



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78940 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 21:25:27 +00:00
Bruno Cardoso Lopes
4aa688e997 Add a method to return if the ELF section contains only common symbols!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 21:08:56 +00:00
Dan Gohman
c6126e8f7e Fix a compiler warning about comparing signed with unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78933 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 20:32:03 +00:00
Daniel Dunbar
67d894ea64 TargetRegistry: Reorganize AsmPrinter construction so that clients pass in the
TargetAsmInfo. This eliminates a dependency on TargetMachine.h from
TargetRegistry.h, which technically was a layering violation.
 - Clients probably can only sensibly pass in the same TargetAsmInfo as the
   TargetMachine has, but there are only limited clients of this API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78928 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 19:38:51 +00:00
Dan Gohman
4e8e642eaa Add an assert to check copy_to_buffer's precondition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 18:38:15 +00:00
Dan Gohman
0ba50bb056 Set raw_os_ostream, raw_string_ostream, and raw_svector_ostream to be
unbuffered. std::ostream does its own buffering, and std::string and
SmallVector both have allocation strategies intended to handle frequent
appending.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78924 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 17:41:40 +00:00
Dan Gohman
208ec0f32e Add support to raw_ostream for sizing the buffer according to the
needs of the underlying output mechanism. raw_fd_ostream now uses
st_blksize from fstat to determine a buffer size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 17:27:29 +00:00
Daniel Dunbar
a8c58d572b Reapply pieces of 78914 reverted in 78916, this has been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78921 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 17:08:54 +00:00
Daniel Dunbar
b42dad4761 Revert 78892 and 78895, these break generating working executables on
x86_64-apple-darwin10.

--- Reverse-merging r78895 into '.':
U    test/CodeGen/PowerPC/2008-12-12-EH.ll
U    lib/Target/DarwinTargetAsmInfo.cpp
--- Reverse-merging r78892 into '.':
U    include/llvm/Target/DarwinTargetAsmInfo.h
U    lib/Target/X86/X86TargetAsmInfo.cpp
U    lib/Target/X86/X86TargetAsmInfo.h
U    lib/Target/ARM/ARMTargetAsmInfo.h
U    lib/Target/ARM/ARMTargetMachine.cpp
U    lib/Target/ARM/ARMTargetAsmInfo.cpp
U    lib/Target/PowerPC/PPCTargetAsmInfo.cpp
U    lib/Target/PowerPC/PPCTargetAsmInfo.h
U    lib/Target/PowerPC/PPCTargetMachine.cpp
G    lib/Target/DarwinTargetAsmInfo.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 17:03:38 +00:00
Jim Grosbach
f35d21617e Add missing defs of R2 and D1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78918 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 16:59:44 +00:00
Daniel Dunbar
95cf7e7ed6 Remove obsoleted files (from AsmPrinter move)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78917 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 16:57:03 +00:00
Owen Anderson
e176fc9899 Revert r78914, as it was breaking the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 16:54:39 +00:00
Sanjiv Gupta
2780609a47 Move PIC16 AsmPrinter to PIC16/AsmPrinter directory.
Remove CooperTargetMachine, as currently only one is supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78914 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 16:37:05 +00:00
Jakob Stoklund Olesen
06789e23d1 Track pristine registers as if they were live-in in the register scavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 16:20:04 +00:00
Jakob Stoklund Olesen
a6b677d209 Use pristine register info in machine code verifier.
So far these registers are simply tracked as if they were live-in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 16:19:51 +00:00