Commit Graph

2115 Commits

Author SHA1 Message Date
Johnny Chen
906d57ffe8 Added coprocessor Instructions CDP, CDP2, MCR, MCR2, MRC, MRC2, MCRR, MCRR2,
MRRC, MRRc2.  For disassembly only.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95955 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 01:44:23 +00:00
Johnny Chen
e4c7f0f6ec Added LDRT/LDRBT/STRT/STRBT for disassembly only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95916 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 20:31:08 +00:00
Johnny Chen
811663f799 Forgot to also check in this file for vcvt (floating-point <-> fixed-point, VFP).
Sorry!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95892 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 18:47:03 +00:00
Johnny Chen
27bb8d0a88 Added VCVT (between floating-point and fixed-point, VFP) for disassembly.
A8.6.297


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95885 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 18:17:16 +00:00
Johnny Chen
c6f7b27fda Added BKPT/tBKPT (breakpoint) to the instruction table for disassembly purpose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 18:12:29 +00:00
Johnny Chen
ba6e033f4f Add pseudo instruction TRAP for disassembly, which is encoded according to A5-21
as the "Permanently UNDEFINED" instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 17:14:31 +00:00
Johnny Chen
85d5a89f8d Added NOP, DBG, SVC to the instruction table for disassembly purpose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95784 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 18:02:25 +00:00
Chris Lattner
8e089a9e4d print all the newlines at the end of instructions with
OutStreamer.AddBlankLine instead of textually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95734 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 00:36:00 +00:00
Johnny Chen
4814e711ab Add VBIF/VBIT for disassembly only.
A8.6.279


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95713 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 23:05:23 +00:00
Johnny Chen
c9745049e6 Added VMRS/VMSR for disassembly only.
A8.6.335 & A8.6.336


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 22:35:38 +00:00
Chris Lattner
518bb53485 move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h.  #include the new TargetOpcodes.h
into MachineInstr.  Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the 
codebase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 19:54:29 +00:00
Jim Grosbach
4152778605 Radar 7417921
tMOVCCi pattern only valid for low registers, as the Thumb1 mov immediate to
register instruction only works with low registers. Allowing high registers
for the instruction resulted in the assembler choosing the wide (32-bit)
encoding for the mov, but LLVM though the instruction was only 16 bits wide,
so offset calculations for constant pools became incorrect, leading to
out of range constant pool entries.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 19:51:37 +00:00
Johnny Chen
2d658df873 Added vcvtb/vcvtt (between half-precision and single-precision, VFP).
For disassembly only.

A8.6.300


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95669 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 17:21:56 +00:00
Chris Lattner
c133457269 this is done, tested by CodeGen/ARM/iabs.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 23:48:10 +00:00
Jim Grosbach
a87ded2695 tighten up eh.setjmp sequence a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95603 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 23:22:00 +00:00
Johnny Chen
15b423f772 Add VCVTR (between floating-point and integer, VFP) for disassembly purpose.
The 'R' suffix means the to-integer operations use the rounding mode specified
by the FPSCR, encoded as Inst{7} = 0.

A8.6.295


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95584 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 22:02:41 +00:00
Johnny Chen
7edd8e38c4 Add VCMP (VFP floating-point compare without 'E' bit set) for disassembly purpose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 19:41:48 +00:00
Johnny Chen
23401d6f8c Added VMOVRRS/VMOVSRR to ARMInstrVFP.td for disassembly purpose.
A8.6.331 VMOV (between two ARM core registers and two single-precision registers)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95548 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 17:26:09 +00:00
Bob Wilson
e6373eb826 Handle AddrMode6 (for NEON load/stores) in Thumb2's rewriteT2FrameIndex.
Radar 7614112.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-06 00:24:38 +00:00
Johnny Chen
7acca6707b VMOVRRD and VMOVDRR both have Inst{7-6} = 0b00.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95397 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-05 18:04:58 +00:00
Chris Lattner
d269a6e460 make MachineModuleInfoMachO hold non-const MCSymbol*'s instead
of const ones.  non-const ones aren't very useful, because you can't
even, say, emit them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 06:18:30 +00:00
Chris Lattner
850d2e2a1b print instructions through the mcstreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95181 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 01:16:28 +00:00
Chris Lattner
d1ff72b8a7 rejigger the world so that EmitInstruction prints the \n at
the end of the instruction instead of expecting the caller to
do it.  This currently causes the asm-verbose instruction 
comments to be on the next line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 01:09:55 +00:00
Chris Lattner
0d883e3f84 sink handling of target-independent machine instrs (other
than DEBUG_VALUE :(  ) into the target indep AsmPrinter.cpp
file.   This allows elimination of the 
NO_ASM_WRITER_BOILERPLATE hack among other things.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95177 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 01:00:52 +00:00
Jim Grosbach
985d45dea3 As of r79039, we still try to eliminate the frame pointer on leaf functions,
even when -disable-fp-elim is specified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95161 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:56:14 +00:00
Evan Cheng
022d9e1cef Revert 95130.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:55:14 +00:00
Chris Lattner
56591ab218 refactor code so that LLVMTargetMachine creates the asmstreamer and
mccontext instead of having AsmPrinter do it.  This allows other 
types of MCStreamer's to be passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:37:42 +00:00
Chris Lattner
55fed86353 tidy some targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95146 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 22:13:21 +00:00
Chris Lattner
33fabd7cc1 detemplatize ARM code emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95138 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:48:51 +00:00
Chris Lattner
e0faa54705 remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95134 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:38:59 +00:00
Chris Lattner
f1d6b107d2 eliminate all the dead addSimpleCodeEmitter implementations.
eliminate random "code emitter" stuff in Alpha, except for
the JIT path.  Next up, remove the template cruft.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95131 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:31:47 +00:00
Evan Cheng
942619695f Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:29:10 +00:00
Johnny Chen
9474d550ff Added t2BFI (Bitfield Insert) entry for disassembler, with blank pattern field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95112 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 19:31:58 +00:00
Johnny Chen
92e63d817f MOVi16 should also be marked as a UnaryDP instruction, i.e., it doesn't have a
Rn operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95025 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:06:04 +00:00
Johnny Chen
48d5ccf86a For MVNr and MVNs, we need to set Inst{25} = 0 so as not to confuse the decoder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94955 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-31 11:22:28 +00:00
Anton Korobeynikov
90cfc130d6 Fix a gross typo: ARMv6+ may or may not support unaligned memory operations.
Even if they are suported by the core, they can be disabled
(this is just a configuration bit inside some register).

Allow unaligned memops on darwin and conservatively disallow them otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 14:08:12 +00:00
Johnny Chen
69a8c7f497 Modified encoding bits specification for VFP instructions. In particular, the D
bit (Inst{22}) and the M bit (Inst{5}) should be left unspecified.  For binary
format instructions, Inst{6} and Inst{4} need to specified for proper decodings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94855 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 23:21:10 +00:00
Chris Lattner
d49fe1b6bc Give AsmPrinter the most common expected implementation of
runOnMachineFunction, and switch PPC to use EmitFunctionBody.
The two ppc asmprinters now don't heave to define 
runOnMachineFunction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94722 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:28:58 +00:00
Chris Lattner
a786ceac5c switch ARM to EmitFunctionBody().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94719 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:10:34 +00:00
Chris Lattner
14c38ec2af Remove the argument from EmitJumpTableInfo, because it doesn't need it.
Move the X86 implementation of function body emission up to 
AsmPrinter::EmitFunctionBody, which works by calling the virtual
EmitInstruction method.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94716 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:02:27 +00:00
Chris Lattner
a2406190ca Drop the argument to AsmPrinter::EmitConstantPool and make it virtual.
Overload it in the ARM backend to do nothing, since is does insane
constant pool emission.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94708 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 00:19:24 +00:00
Chris Lattner
953ebb769a switch ARM to use EmitFunctionHeader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 23:58:11 +00:00
Chris Lattner
7d7dab0278 eliminate the ARMFunctionInfo::Align member, using
MachineFunction::Alignment instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94701 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 23:37:36 +00:00
Jeffrey Yasskin
f0356fe140 Kill ModuleProvider and ghost linkage by inverting the relationship between
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.

Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods.  The bindings to
other languages still use the ModuleProvider concept.  It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.

Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 20:34:15 +00:00
Jim Grosbach
c90a153ad0 Adjust setjmp instruction sequence to not need 32-bit alignment padding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 00:07:20 +00:00
Evan Cheng
0c439eb2c8 Eliminate target hook IsEligibleForTailCallOptimization.
Target independent isel should always pass along the "tail call" property. Change
target hook LowerCall's parameter "isTailCall" into a refernce. If the target
decides it's impossible to honor the tail call request, it should set isTailCall
to false to make target independent isel happy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94626 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 00:07:07 +00:00
Chris Lattner
30c6b75ac2 constify a method argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:15:09 +00:00
Chris Lattner
cee63322ea Eliminate SetDirective, and replace it with HasSetDirective.
Default HasSetDirective to true, since most targets have it.

The targets that claim to not have it probably do, or it is
spelled differently. These include Blackfin, Mips, Alpha, and
PIC16.  All of these except pic16 are normal ELF targets, so
they almost certainly have it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94585 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:40:54 +00:00
Rafael Espindola
2e2563bf8e Emit .comm alignment in bytes but .align in powers of 2 for ARM ELF.
Original patch by Sandeep Patel and updated by me.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:21:43 +00:00
Chris Lattner
b3732fbabd don't set to the default value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94580 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:17:34 +00:00