Johnny Chen
82c50b11fa
Fixed another assert exposed by fuzzing. Now, the DisassembleVFPLdStMulFrm()
...
function checks whether we have a valid submode for VLDM/VSTM (must be either
"ia" or "db") before calling ARM_AM::getAM5Opc(AMSubMode, unsigned char).
llvm-svn: 101306
2010-04-14 22:37:17 +00:00
Jim Grosbach
32bb362655
Add -arm-long-calls option to force calls to be indirect. This makes the
...
kernel linker happier when dealing with kexts.
Radar 7805069
llvm-svn: 101303
2010-04-14 22:28:31 +00:00
Dan Gohman
0b4df0425f
Constify GetConstantStringInfo.
...
llvm-svn: 101298
2010-04-14 22:20:45 +00:00
Nicolas Geoffray
99bfbca6ec
Don't use DILocation when processing a DebugLoc.
...
llvm-svn: 101294
2010-04-14 22:06:37 +00:00
Johnny Chen
9aaaf4d5fa
For t2BFI disassembly, apply the same error checking as in r101205.
...
Change the error msg to read "Encoding error: msb < lsb".
llvm-svn: 101293
2010-04-14 22:04:45 +00:00
Dan Gohman
7a3dff329f
Move a bunch of methods from CallSite to CallSiteBase, so that they can
...
be used in ImmutableCallSite too.
llvm-svn: 101292
2010-04-14 21:47:32 +00:00
Johnny Chen
7637827064
Fixed another assert exposed by fuzzing. The utility function getRegisterEnum()
...
was asserting because the (RegClass, RegNum) combination doesn't make sense from
an encoding point of view.
Since getRegisterEnum() is used all over the place, to change the code to check
for encoding error after each call would not only bloat the code, but also make
it less readable. An Err flag is added to the ARMBasicMCBuilder where a client
can set a non-zero value to indicate some kind of error condition while building
up the MCInst. ARMBasicMCBuilder::BuildIt() checks this flag and returns false
if a non-zero value is detected.
llvm-svn: 101290
2010-04-14 21:03:13 +00:00
Evan Cheng
21b588b678
- Code clean up to reduce indentation.
...
- TryToOptimizeStoreOfMallocToGlobal should check if TargetData is available and bail out if it is not. The transformations being done requires TD.
llvm-svn: 101285
2010-04-14 20:52:55 +00:00
Bob Wilson
c05b887c84
Don't custom lower bit converts to ARM VMOVDRRD or VMOVDRR when the operand
...
does not have a legal type. The legalizer does not know how to handle those
nodes. Radar 7854640.
llvm-svn: 101282
2010-04-14 20:45:23 +00:00
Dan Gohman
c87b74d913
Delete unneeeded arguments.
...
llvm-svn: 101276
2010-04-14 20:17:22 +00:00
Dan Gohman
a3918ecdf5
Delete unused arguments.
...
llvm-svn: 101275
2010-04-14 20:05:00 +00:00
Dan Gohman
7deb447781
Factor out EH landing pad code into a separate function, and constify
...
a bunch of stuff to support it.
llvm-svn: 101273
2010-04-14 19:53:31 +00:00
Dan Gohman
c2c08d19b8
Reset the debug location even if the instruction was a terminator.
...
llvm-svn: 101272
2010-04-14 19:30:02 +00:00
Dan Gohman
cacd4f2401
Refine #includes.
...
llvm-svn: 101269
2010-04-14 18:49:17 +00:00
Dan Gohman
8ebcbe949a
Pull utility routines with no SelectionDAG dependence out of
...
SelectionDAGBuilder. FunctionLoweringInfo isn't an ideal place for
them to live, but it's better than SelectionDAGBuilder for now.
llvm-svn: 101267
2010-04-14 18:31:02 +00:00
Dan Gohman
f5cca35750
Fix typos in comments.
...
llvm-svn: 101266
2010-04-14 18:24:06 +00:00
Gabor Greif
fefdd42644
performance: cache the dereferenced use_iterator
...
llvm-svn: 101265
2010-04-14 18:13:29 +00:00
Dan Gohman
fea9ba18ff
Delete an obsolete comment.
...
llvm-svn: 101264
2010-04-14 17:40:25 +00:00
Dan Gohman
3215eae4a3
Delete an unused function.
...
llvm-svn: 101263
2010-04-14 17:22:02 +00:00
Dan Gohman
094fc7b09e
Clear the FunctionLoweringInfo object before doing other things that
...
don't need it.
llvm-svn: 101262
2010-04-14 17:13:16 +00:00
Dan Gohman
ad0b3ea3cc
Move this assert out of SelectionDAGISel into FunctionLoweringInfo, and
...
drop the redundant #ifndef NDEBUG.
llvm-svn: 101261
2010-04-14 17:11:23 +00:00
Dan Gohman
0f405c8d73
Add a comment.
...
llvm-svn: 101260
2010-04-14 17:09:37 +00:00
Dan Gohman
2ca8fb229c
Move the code for initialing the entry block livein set out of
...
SelectionDAGISel.
llvm-svn: 101258
2010-04-14 17:05:00 +00:00
Dan Gohman
4bfb437ec9
Reorgnaize this code to be more tidy and readable.
...
llvm-svn: 101256
2010-04-14 17:02:07 +00:00
Dan Gohman
1939b5f130
Trim #includes.
...
llvm-svn: 101255
2010-04-14 16:54:39 +00:00
Dan Gohman
2b79ee8bc8
Move the code for emitting livein copies out of SelectionDAGISel.
...
llvm-svn: 101254
2010-04-14 16:51:49 +00:00
Gabor Greif
c08e5df836
performance: cache the dereferenced use_iterator
...
llvm-svn: 101253
2010-04-14 16:48:56 +00:00
Dan Gohman
69e8e322d9
Sink landing-pad marking code out of
...
SelectionDAGISel::runOnMachineFunction into FunctionLowering.
llvm-svn: 101252
2010-04-14 16:32:56 +00:00
Dan Gohman
f57117d166
It's not necessary to recompute EB here.
...
llvm-svn: 101251
2010-04-14 16:30:40 +00:00
Gabor Greif
a49686fa3e
performance: cache the dereferenced use_iterator
...
llvm-svn: 101250
2010-04-14 16:13:56 +00:00
Dan Gohman
65de3d140d
Add a comment.
...
llvm-svn: 101248
2010-04-14 16:08:56 +00:00
Nick Lewycky
cc924c7483
Enable RTTI again. While this works fine for LLVM, it creates an ABI
...
incompatibility with some clients covered by the buildbots, such as llvm-gcc.
llvm-svn: 101237
2010-04-14 05:51:59 +00:00
Nick Lewycky
81f8f03dc9
Turn off RTTI for VMCore. Yay!
...
llvm-svn: 101233
2010-04-14 05:30:13 +00:00
Nick Lewycky
163a743b51
I don't know how, but I managed to goof the revert. Remove function that should
...
have been removed in r101231.
llvm-svn: 101232
2010-04-14 05:03:50 +00:00
Nick Lewycky
ca615eb0d6
Revert r101213.
...
llvm-svn: 101231
2010-04-14 04:51:58 +00:00
Nick Lewycky
7cd1aa31ac
Fix 80 column ruler.
...
llvm-svn: 101229
2010-04-14 04:40:35 +00:00
Chris Lattner
6b55cb9cd8
implement mc asmparser support for '.', which gets the
...
current PC. rdar://7834775
We now produce an identical .o file compared to the cctools
assembler for something like this:
_f0:
L0:
jmp L1
.long . - L0
L1:
jmp A
.long . - L1
.zerofill __DATA,_bss,A,0
llvm-svn: 101227
2010-04-14 04:40:28 +00:00
Nick Lewycky
087d59cf25
Remove tab.
...
llvm-svn: 101223
2010-04-14 04:19:05 +00:00
Nick Lewycky
3cdae269f0
While DAE can't modify the function signature of an externally visible function,
...
it can check whether the visible direct callers are passing in parameters to
dead arguments and replace those with undef.
This reinstates r94322 with bugs fixed.
llvm-svn: 101213
2010-04-14 03:38:11 +00:00
Dan Gohman
5f40d34958
Generalize this code to handle Instructions in addition to ConstantExprs.
...
llvm-svn: 101210
2010-04-14 02:33:23 +00:00
Dan Gohman
9162fb07be
Reorder the methods of this class to be a little more organized.
...
llvm-svn: 101206
2010-04-14 02:09:45 +00:00
Johnny Chen
48bbf4910e
Fixed another assert exposed by fuzzing. Now, when an encoding error occurs
...
involing getBFCInvMask() where lsb <= msb does not hold true, the disassembler
just returns false, instead of assert, to indicate disassembly error.
llvm-svn: 101205
2010-04-14 02:05:29 +00:00
Devang Patel
b7eadda495
Clear MachineInstr->MCSymbol maps at the end of a function.
...
llvm-svn: 101202
2010-04-14 01:18:28 +00:00
Johnny Chen
82c3cadad6
Fixed an assert() exposed by fuzzing. Now, instead of assert when an invalid
...
instruction encoding is encountered, we just return a NULL ARMBasicMCBuilder
instance and the client just returns false to indicate disassembly error.
llvm-svn: 101201
2010-04-14 01:17:37 +00:00
Douglas Gregor
9078f954bf
Unbreak CMake build by improving the EnhancedDisassembly makefile a
...
bit (we're not trying to build a shared library yet) and generating
the X86GenEDInfo.inc and ARMGenEDInfo.inc files as necessary.
llvm-svn: 101188
2010-04-13 22:47:43 +00:00
Evan Cheng
87585d72a5
Fast path implicit_def check.
...
llvm-svn: 101183
2010-04-13 22:13:34 +00:00
Bob Wilson
699bdf7adf
Handle a v2f64 formal parameter that is split between registers and memory
...
such that the entire second half is in memory. Radar 7855014.
llvm-svn: 101181
2010-04-13 22:03:22 +00:00
Sean Callanan
814e69b171
Fixed a nasty layering violation in the edis source
...
code. It used to #include the enhanced disassembly
information for the targets it supported straight
out of lib/Target/{X86,ARM,...} but now it uses a
new interface provided by MCDisassembler, and (so
far) implemented by X86 and ARM.
Also removed hacky #define-controlled initialization
of targets in edis. If clients only want edis to
initialize a limited set of targets, they can set
--enable-targets on the configure command line.
llvm-svn: 101179
2010-04-13 21:21:57 +00:00
Johnny Chen
44d7d183fa
Changed getSOImmValRotate()'s hunt retry logic to ignore the low order 6 bits,
...
instead of 7, because we are only looking for even rotate amount.
llvm-svn: 101172
2010-04-13 20:35:16 +00:00
Devang Patel
12d150ea43
Do not include types without any definition in pubtypes list.
...
llvm-svn: 101171
2010-04-13 20:35:04 +00:00