llvm-6502/lib
Mihai Popa e921f32353 Fix assembling of Thumb2 branch instructions.
The long encoding for Thumb2 unconditional branches is broken.
Additionally, there is no range checking for target operands; as such 
for instructions originating in assembly code, only short Thumb encodings
are generated, regardless of the bitsize needed for the offset.

Adding range checking is non trivial due to the representation of Thumb
branch instructions. There is no true difference between conditional and
unconditional branches in terms of operands and syntax - even unconditional
branches have a predicate which is expected to match that of the IT block
they are in. Yet, the encodings and the permitted size of the offset differ.

Due to this, for any mnemonic there are really 4 encodings to choose for.

The problem cannot be handled in the parser alone or by manipulating td files.
Because the parser builds first a set of match candidates and then checks them
one by one, whatever tablegen-only solution might be found will ultimately be
dependent of the parser's evaluation order. What's worse is that due to the fact
that all branches have the same syntax and the same kinds of operands, that 
order is governed by the lexicographical ordering of the names of operand 
classes...

To circumvent all this, any necessary disambiguation is added to the instruction
validation pass.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188067 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 10:38:32 +00:00
..
Analysis Disable inlining between sanitized and non-sanitized functions. 2013-08-08 08:22:39 +00:00
AsmParser Target/X86: Add explicit Win64 and System V/x86-64 calling conventions. 2013-07-12 06:02:35 +00:00
Bitcode Make .bc en/decoding of AttrKind stable 2013-07-26 04:16:55 +00:00
CodeGen Change asserts at the top of getVectorShuffle to check that LHS and RHS have the same type as the result. 2013-08-09 04:37:24 +00:00
DebugInfo Store compile unit corresponding to each chain of inlined debug info entries. No functionality change. 2013-08-06 10:49:15 +00:00
ExecutionEngine Optimistically ignore scattered relocations in MachO in RuntimeDyld. This 2013-08-09 00:57:01 +00:00
IR Make sure that if we're going to attempt to add a type to a DIE that 2013-08-08 07:40:37 +00:00
IRReader Add 'const' qualifiers to static const char* variables. 2013-07-16 01:17:10 +00:00
Linker Extend RemapInstruction and friends to take an optional new parameter, a ValueMaterializer. 2013-05-28 15:17:05 +00:00
MC [CodeGen] prevent abnormal on invalid attributes 2013-08-09 01:52:03 +00:00
Object Add back missing PPC relocation types. 2013-08-09 09:42:14 +00:00
Option Option/CMakeLists.txt: Don't use target_link_libraries. LLVMBuild knows dependencies. 2013-08-06 05:56:32 +00:00
Support Fix off-by-one error in Regex::isValid 2013-08-08 17:32:45 +00:00
TableGen Remove some std stream usage from Support and TableGen 2013-08-06 22:51:21 +00:00
Target Fix assembling of Thumb2 branch instructions. 2013-08-09 10:38:32 +00:00
Transforms Revert "[objc-arc] Track if we encountered an additive overflow while computing {TopDown,BottomUp}PathCounts and do nothing if it occured." 2013-08-08 00:41:18 +00:00
CMakeLists.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
LLVMBuild.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
Makefile Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00