Chris Lattner
2f4b2d3ea3
eliminate a bunch of code in print_pcrel_imm for printing symbols, using
...
printSymbolOperand instead.
llvm-svn: 75526
2009-07-13 22:07:30 +00:00
Chris Lattner
734c817d24
move a method and add a comment, no functionality change.
...
llvm-svn: 75520
2009-07-13 21:53:19 +00:00
Chris Lattner
1c9a2afaa9
refactor operand printing to remove hte last of the "mem" modifier hack. The
...
only remaining modifier is "subreg".
llvm-svn: 75516
2009-07-13 21:48:33 +00:00
Chris Lattner
575e7ab711
refactor symbol printing so the whole "mem" thing is handled in fewer places.
...
llvm-svn: 75512
2009-07-13 21:41:08 +00:00
Torok Edwin
62902fd6c8
Remove extra \n from LLVM_UNREACHABLE calls.
...
llvm-svn: 75416
2009-07-12 07:15:17 +00:00
Torok Edwin
ae8a3ff177
assert(0) -> LLVM_UNREACHABLE.
...
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.
llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Chris Lattner
a403645785
remove the "debug" modifier, it is only used by one instruction which can
...
never be generated.
llvm-svn: 75305
2009-07-10 22:34:11 +00:00
Chris Lattner
70881971d2
make pcrel and non-pcrel global printing more similar.
...
llvm-svn: 75298
2009-07-10 21:57:21 +00:00
Chris Lattner
478fc8442b
remove the now-dead TM argument to these methods.
...
llvm-svn: 75276
2009-07-10 21:00:45 +00:00
Chris Lattner
9deef50410
add a couple of predicates to test for "stub style pic in PIC mode" and "stub style pic in dynamic-no-pic" mode.
...
llvm-svn: 75273
2009-07-10 20:47:30 +00:00
Chris Lattner
e5b9e93e19
make this more like printOperand. Perhaps some merging will happen
...
tomorrow.
llvm-svn: 75245
2009-07-10 07:50:52 +00:00
Dale Johannesen
faa5bcf31d
Handle 'A' modifier in inline asms.
...
gcc.apple/asm-block-13.c
gcc.apple/asm-block-57.c
llvm-svn: 75169
2009-07-09 20:06:27 +00:00
Chris Lattner
1614fd5095
move reasoning about darwin $non_lazy_ptr stubs from asmprinter into
...
isel.
llvm-svn: 75117
2009-07-09 06:59:17 +00:00
Chris Lattner
5367b4a5bd
reduce nesting by rearranging branches.
...
llvm-svn: 75110
2009-07-09 05:55:04 +00:00
Chris Lattner
f6ad5e86c4
make isel use MO_PIC_BASE_OFFSET when lowering globalvalues on darwin in pic
...
mode, instead of having asmprinter just "know" to print them.
llvm-svn: 75109
2009-07-09 05:47:33 +00:00
Chris Lattner
c58c66f250
various minor cleanups, no functionality change.
...
llvm-svn: 75108
2009-07-09 05:42:07 +00:00
Chris Lattner
f42a8c82d9
make isel decide whether to emit $stub's on darwin instead of asmprinter.
...
llvm-svn: 75107
2009-07-09 05:27:35 +00:00
Chris Lattner
e144356fba
pc-relative references are *always* to functions, never to globals. ISel
...
is incapable of lowering direct references to globals like this, zap the code.
llvm-svn: 75106
2009-07-09 05:19:23 +00:00
Chris Lattner
ec30d37e60
make cygwin use its own stubs set, instead of overloading a darwin one.
...
llvm-svn: 75105
2009-07-09 05:09:24 +00:00
Chris Lattner
06266970b0
Make isel determine where to emit PLT-relative calls instead of having
...
asmprinter do it.
llvm-svn: 75104
2009-07-09 05:02:21 +00:00
Chris Lattner
2e128cac89
isPICStyleStub() is now never true in -static mode, so simplify code.
...
llvm-svn: 75102
2009-07-09 04:43:12 +00:00
Chris Lattner
af31be8192
one more added assert.
...
llvm-svn: 75088
2009-07-09 02:43:55 +00:00
Chris Lattner
5cdf9d71f5
move handling of dllimport linkage in isel, not in asmprinter.
...
llvm-svn: 75086
2009-07-09 00:58:53 +00:00
Chris Lattner
428267bc11
one more assertion!
...
llvm-svn: 75083
2009-07-09 00:49:29 +00:00
Chris Lattner
49def58ec8
add some more assertions. Remove code to handle dllimport on darwin.
...
llvm-svn: 75082
2009-07-09 00:47:59 +00:00
Chris Lattner
904ac2e074
remove "asmcall", using print_pcrel_imm instead of printOperand.
...
llvm-svn: 75080
2009-07-09 00:39:19 +00:00
Chris Lattner
c513c000af
simplify some logic
...
llvm-svn: 75079
2009-07-09 00:32:12 +00:00
Chris Lattner
f321f1f93f
* add some assertions for sanity checking.
...
* remove some old code that was needed when we'd put ESP in the scale instead of
the base of some instructions.
* Fix a bug with the P modifier in inline asm that caused us to drop it.
llvm-svn: 75077
2009-07-09 00:27:29 +00:00
Chris Lattner
b6e82dd20c
* manually concatenate two string literals
...
* remove some dead code: darwin doesn't support dllimport linkage.
llvm-svn: 75066
2009-07-08 23:09:14 +00:00
Torok Edwin
358888da3a
Implement changes from Chris's feedback.
...
Finish converting lib/Target.
llvm-svn: 75043
2009-07-08 20:53:28 +00:00
Torok Edwin
ad3be984b7
Start converting to new error handling API.
...
cerr+abort -> llvm_report_error
assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included)
llvm-svn: 75018
2009-07-08 18:01:40 +00:00
Dale Johannesen
7a31324b42
Commit the file I actually changed as part of last
...
patch, instead of one I didn't.
llvm-svn: 74968
2009-07-07 23:28:22 +00:00
Daniel Dunbar
bc3d149e98
Remove unused AsmPrinter OptLevel argument, and propogate.
...
- This more or less amounts to a revert of r65379. I'm curious to know what
happened that caused this variable to become unused.
llvm-svn: 74579
2009-07-01 01:48:54 +00:00
Bill Wendling
c0fb316bd3
Add an "alignment" field to the MachineFunction object. It makes more sense to
...
have the alignment be calculated up front, and have the back-ends obey whatever
alignment is decided upon.
This allows for future work that would allow for precise no-op placement and the
like.
llvm-svn: 74564
2009-06-30 22:38:32 +00:00
David Greene
c702ce1ab3
Add 256-bit memory operand support.
...
llvm-svn: 74548
2009-06-30 19:24:59 +00:00
Chris Lattner
4d88bfc0d6
remove a bunch of fixmes (old checking code) and commonize all the
...
target-specific operand printing functionality. Yay.
llvm-svn: 74379
2009-06-27 05:46:24 +00:00
Chris Lattner
9571347ce0
pull @GOT, @GOTOFF, @GOTPCREL handling into isel from the asmprinter.
...
llvm-svn: 74378
2009-06-27 05:39:56 +00:00
Chris Lattner
19eb0dad26
Reimplement rip-relative addressing in the X86-64 backend. The new
...
implementation primarily differs from the former in that the asmprinter
doesn't make a zillion decisions about whether or not something will be
RIP relative or not. Instead, those decisions are made by isel lowering
and propagated through to the asm printer. To achieve this, we:
1. Represent RIP relative addresses by setting the base of the X86 addr
mode to X86::RIP.
2. When ISel Lowering decides that it is safe to use RIP, it lowers to
X86ISD::WrapperRIP. When it is unsafe to use RIP, it lowers to
X86ISD::Wrapper as before.
3. This removes isRIPRel from X86ISelAddressMode, representing it with
a basereg of RIP instead.
4. The addressing mode matching logic in isel is greatly simplified.
5. The asmprinter is greatly simplified, notably the "NotRIPRel" predicate
passed through various printoperand routines is gone now.
6. The various symbol printing routines in asmprinter now no longer infer
when to emit (%rip), they just print the symbol.
I think this is a big improvement over the previous situation. It does have
two small caveats though: 1. I implemented a horrible "no-rip" modifier for
the inline asm "P" constraint modifier. This is a short term hack, there is
a much better, but more involved, solution. 2. I had to xfail an
-aggressive-remat testcase because it isn't handling the use of RIP in the
constant-pool reading instruction. This specific test is easy to fix without
-aggressive-remat, which I intend to do next.
llvm-svn: 74372
2009-06-27 04:16:01 +00:00
Evan Cheng
016ed65455
Add x86 support for 'n' inline asm modifier. This will be handled target independently as part of MC work.
...
llvm-svn: 74336
2009-06-26 22:00:19 +00:00
Chris Lattner
3a48623aef
simplify printing of MO_ExternalSymbol in a non-pcrel context.
...
llvm-svn: 74334
2009-06-26 21:47:27 +00:00
Chris Lattner
a8ee785cef
add %rip to the GR64 register class. Lets avoid allocating it to anything though! :)
...
llvm-svn: 74328
2009-06-26 21:25:00 +00:00
Chris Lattner
1f3d17f45d
Move all the TLS processing logic into isel, don't do it in asmprinter at all.
...
llvm-svn: 74327
2009-06-26 21:20:29 +00:00
Chris Lattner
a56bff5e36
minor cleanup/framework changes.
...
llvm-svn: 74316
2009-06-26 20:00:05 +00:00
Chris Lattner
0a0494b4f9
move magic for PIC constantpool references from asmprinter to isel.
...
llvm-svn: 74313
2009-06-26 19:22:52 +00:00
Chris Lattner
45946d9021
use jump table operand flags in asm printer instead of "magic predicates"
...
llvm-svn: 74310
2009-06-26 18:55:01 +00:00
Devang Patel
a7a5664fbb
Let's ignore MDStrings also!
...
llvm-svn: 74255
2009-06-26 02:26:12 +00:00
Chris Lattner
2aaaf51beb
simplify shouldPrintPLT
...
llvm-svn: 74186
2009-06-25 17:58:52 +00:00
Chris Lattner
8c562c2f76
Use target-specific machine operand flags to eliminate a gross hack
...
from the asmprinter.
llvm-svn: 74184
2009-06-25 17:38:33 +00:00
Douglas Gregor
7841f61ced
Add missing dependencies to the CMake build system.
...
llvm-svn: 74161
2009-06-25 05:03:06 +00:00
Chris Lattner
ec41c5f7ac
fix comments to be correct.
...
llvm-svn: 74154
2009-06-25 01:15:47 +00:00