ac92e77bb8 
								
							 
						 
						
							
							
								
								Correct writeback handling of duplicating VLD instructions.  Discovered by randomized testing.  
							
							... 
							
							
							
							llvm-svn: 138251 
							
						 
						
							2011-08-22 18:22:06 +00:00  
				
					
						
							
							
								 
						
							
								fe29fe431d 
								
							 
						 
						
							
							
								
								Port another swathe of Thumb1 encoding tests over to decoding tests.  
							
							... 
							
							
							
							llvm-svn: 138250 
							
						 
						
							2011-08-22 18:05:49 +00:00  
				
					
						
							
							
								 
						
							
								b49813206b 
								
							 
						 
						
							
							
								
								Fix an incorrect shift when decoding SP-relative stores in Thumb1-mode.  Add more tests.  
							
							... 
							
							
							
							llvm-svn: 138246 
							
						 
						
							2011-08-22 17:56:58 +00:00  
				
					
						
							
							
								 
						
							
								96b7ad2e17 
								
							 
						 
						
							
							
								
								STC2L_POST and STC2L_POST should be handled the same as STCL_POST/LDC_POST for the purposes of decoding all operands except the predicate.  
							
							... 
							
							
							
							Found by randomized testing.
llvm-svn: 138003 
							
						 
						
							2011-08-18 22:47:44 +00:00  
				
					
						
							
							
								 
						
							
								192a760b54 
								
							 
						 
						
							
							
								
								Fix the decoding of RFE instruction.  RFEs have the load bit set, while SRSs have it unset.  
							
							... 
							
							
							
							llvm-svn: 138000 
							
						 
						
							2011-08-18 22:31:17 +00:00  
				
					
						
							
							
								 
						
							
								67d6f11974 
								
							 
						 
						
							
							
								
								Improve handling of failure and unpredictable cases for CPS, STR, and SMLA instructions.  
							
							... 
							
							
							
							Fixes a large class of disassembler crashes found by randomized testing.
llvm-svn: 137995 
							
						 
						
							2011-08-18 22:11:02 +00:00  
				
					
						
							
							
								 
						
							
								90103ccc05 
								
							 
						 
						
							
							
								
								Thumb assembly parsing and encoding for LDM instruction.  
							
							... 
							
							
							
							Fix base register type and canonicallize to the "ldm" spelling rather than
"ldmia." Add diagnostics for incorrect writeback token and out-of-range
registers.
llvm-svn: 137986 
							
						 
						
							2011-08-18 21:50:53 +00:00  
				
					
						
							
							
								 
						
							
								627021d7c0 
								
							 
						 
						
							
							
								
								More Thumb1 decoding tests.  
							
							... 
							
							
							
							llvm-svn: 137974 
							
						 
						
							2011-08-18 20:05:06 +00:00  
				
					
						
							
							
								 
						
							
								9f9371ccb3 
								
							 
						 
						
							
							
								
								Test commit; adding test for invalid LDRD which was part of the patch for r137647 but seemingly didn't get svn add'ed.  
							
							... 
							
							
							
							llvm-svn: 137960 
							
						 
						
							2011-08-18 18:03:02 +00:00  
				
					
						
							
							
								 
						
							
								ec3884c50a 
								
							 
						 
						
							
							
								
								Port over BL/BLX to disassembly tests.  
							
							... 
							
							
							
							llvm-svn: 137954 
							
						 
						
							2011-08-18 17:43:52 +00:00  
				
					
						
							
							
								 
						
							
								a90896397b 
								
							 
						 
						
							
							
								
								Port new Thumb1 encoding tests over to decoding tests.  
							
							... 
							
							
							
							llvm-svn: 137902 
							
						 
						
							2011-08-17 23:37:33 +00:00  
				
					
						
							
							
								 
						
							
								d40d838cc4 
								
							 
						 
						
							
							
								
								Start building a Thumb1 decoding test file based on the Thumb1 parsing/encoding test file.  
							
							... 
							
							
							
							llvm-svn: 137840 
							
						 
						
							2011-08-17 18:21:36 +00:00  
				
					
						
							
							
								 
						
							
								a4043c4b32 
								
							 
						 
						
							
							
								
								Allow the MCDisassembler to return a "soft fail" status code, indicating an instruction that is disassemblable, but invalid.  Only used for ARM UNPREDICTABLE instructions at the moment.  
							
							... 
							
							
							
							Patch by James Molloy.
llvm-svn: 137830 
							
						 
						
							2011-08-17 17:44:15 +00:00  
				
					
						
							
							
								 
						
							
								53440984b3 
								
							 
						 
						
							
							
								
								Add a test file for Thumb2 NEON.  
							
							... 
							
							
							
							llvm-svn: 137687 
							
						 
						
							2011-08-15 23:42:20 +00:00  
				
					
						
							
							
								 
						
							
								5286bd2d01 
								
							 
						 
						
							
							
								
								Add some more comprehensive VFP decoding tests.  
							
							... 
							
							
							
							llvm-svn: 137657 
							
						 
						
							2011-08-15 21:29:01 +00:00  
				
					
						
							
							
								 
						
							
								1d5d2cac8c 
								
							 
						 
						
							
							
								
								Enforce the constraint that Rt must be even on LDRD/STRD instructions in ARM mode.  Update tests to reflect this fact.  
							
							... 
							
							
							
							Patch by James Molloy.
llvm-svn: 137647 
							
						 
						
							2011-08-15 20:51:32 +00:00  
				
					
						
							
							
								 
						
							
								944f4923a4 
								
							 
						 
						
							
							
								
								Add a test for Thumb1 LDRSH decoding.  
							
							... 
							
							
							
							llvm-svn: 137645 
							
						 
						
							2011-08-15 20:15:43 +00:00  
				
					
						
							
							
								 
						
							
								f746b0ec53 
								
							 
						 
						
							
							
								
								Add testcase for STRH.  Patch by James Molloy.  
							
							... 
							
							
							
							llvm-svn: 137644 
							
						 
						
							2011-08-15 20:12:03 +00:00  
				
					
						
							
							
								 
						
							
								61a3ece665 
								
							 
						 
						
							
							
								
								Fix incorrect encoding of UMAAL and friends.  Patch by James Molloy.  
							
							... 
							
							
							
							llvm-svn: 137641 
							
						 
						
							2011-08-15 20:08:25 +00:00  
				
					
						
							
							
								 
						
							
								3157f2eebe 
								
							 
						 
						
							
							
								
								Fix decoding LDRSB and LDRSH in Thumb1 mode.  Patch by James Molloy.  
							
							... 
							
							
							
							llvm-svn: 137636 
							
						 
						
							2011-08-15 19:00:06 +00:00  
				
					
						
							
							
								 
						
							
								b9d82f411c 
								
							 
						 
						
							
							
								
								Fix problems decoding the to/from-lane NEON memory instructions, and add a comprehensive NEON decoding testcase.  
							
							... 
							
							
							
							llvm-svn: 137635 
							
						 
						
							2011-08-15 18:44:44 +00:00  
				
					
						
							
							
								 
						
							
								2d1d7a11f8 
								
							 
						 
						
							
							
								
								Fix some remaining issues with decoding ARM-mode memory instructions, and add another batch of tests.  
							
							... 
							
							
							
							llvm-svn: 137502 
							
						 
						
							2011-08-12 20:36:11 +00:00  
				
					
						
							
							
								 
						
							
								ed6d3e813e 
								
							 
						 
						
							
							
								
								Port over the basic ARM encodings test file to a decoding test file.  Greatly increases our test coverage of basic ARM-mode instructions.  
							
							... 
							
							
							
							llvm-svn: 137495 
							
						 
						
							2011-08-12 19:42:45 +00:00  
				
					
						
							
							
								 
						
							
								3a850f28d0 
								
							 
						 
						
							
							
								
								Fix decoding for indexed STRB and LDRB.  Fixes <rdar://problem/9926161>.  
							
							... 
							
							
							
							llvm-svn: 137347 
							
						 
						
							2011-08-11 20:47:56 +00:00  
				
					
						
							
							
								 
						
							
								887c0b1358 
								
							 
						 
						
							
							
								
								Improve operand validation for Thumb2 addressing modes.  
							
							... 
							
							
							
							llvm-svn: 137344 
							
						 
						
							2011-08-11 20:40:40 +00:00  
				
					
						
							
							
								 
						
							
								6066340301 
								
							 
						 
						
							
							
								
								Continue to tighten decoding by performing more operand validation.  
							
							... 
							
							
							
							llvm-svn: 137340 
							
						 
						
							2011-08-11 20:21:46 +00:00  
				
					
						
							
							
								 
						
							
								3477f2cea5 
								
							 
						 
						
							
							
								
								Tighten decoding of addrmode2 instructions to reject more UNPREDICTABLE cases.  
							
							... 
							
							
							
							llvm-svn: 137325 
							
						 
						
							2011-08-11 19:00:18 +00:00  
				
					
						
							
							
								 
						
							
								0e15b48f3c 
								
							 
						 
						
							
							
								
								Tighten operand decoding of addrmode2 instruction.  The offset register cannot be PC.  
							
							... 
							
							
							
							llvm-svn: 137323 
							
						 
						
							2011-08-11 18:55:42 +00:00  
				
					
						
							
							
								 
						
							
								e33c95d39b 
								
							 
						 
						
							
							
								
								Correct immediate range for shifter operands.  Patch by James Molloy, with additional encoding fixes added by me.  
							
							... 
							
							
							
							llvm-svn: 137322 
							
						 
						
							2011-08-11 18:41:59 +00:00  
				
					
						
							
							
								 
						
							
								ed25385227 
								
							 
						 
						
							
							
								
								Improve error checking in the new ARM disassembler.  Patch by James Molloy.  
							
							... 
							
							
							
							llvm-svn: 137320 
							
						 
						
							2011-08-11 18:24:51 +00:00  
				
					
						
							
							
								 
						
							
								c86a5bd219 
								
							 
						 
						
							
							
								
								Add initial support for decoding NEON instructions in Thumb2 mode.  
							
							... 
							
							
							
							llvm-svn: 137236 
							
						 
						
							2011-08-10 19:01:10 +00:00  
				
					
						
							
							
								 
						
							
								8059f0cf8d 
								
							 
						 
						
							
							
								
								Push GPRnopc through a large number of instruction definitions to tighten operand decoding.  
							
							... 
							
							
							
							llvm-svn: 137189 
							
						 
						
							2011-08-10 00:03:03 +00:00  
				
					
						
							
							
								 
						
							
								92b942b1b5 
								
							 
						 
						
							
							
								
								Tighten operand checking of register-shifted-register operands.  
							
							... 
							
							
							
							llvm-svn: 137180 
							
						 
						
							2011-08-09 23:33:27 +00:00  
				
					
						
							
							
								 
						
							
								e008931bf6 
								
							 
						 
						
							
							
								
								Tighten operand checking on memory barrier instructions.  
							
							... 
							
							
							
							llvm-svn: 137176 
							
						 
						
							2011-08-09 23:25:42 +00:00  
				
					
						
							
							
								 
						
							
								3d2e0e9db6 
								
							 
						 
						
							
							
								
								Tighten operand checking on CPS instructions.  
							
							... 
							
							
							
							llvm-svn: 137172 
							
						 
						
							2011-08-09 23:05:39 +00:00  
				
					
						
							
							
								 
						
							
								042619f97d 
								
							 
						 
						
							
							
								
								Create a new register class for the set of all GPRs except the PC.  Use it to tighten our decoding of BFI.  
							
							... 
							
							
							
							llvm-svn: 137168 
							
						 
						
							2011-08-09 22:48:45 +00:00  
				
					
						
							
							
								 
						
							
								406dc1755f 
								
							 
						 
						
							
							
								
								ARM Disassembler: sign extend branch immediates.  
							
							... 
							
							
							
							Not sure about BLXi, but this is what the old disassembler did.
llvm-svn: 137156 
							
						 
						
							2011-08-09 22:02:50 +00:00  
				
					
						
							
							
								 
						
							
								7a2401dbf0 
								
							 
						 
						
							
							
								
								Tighten Thumb1 branch predicate decoding.  
							
							... 
							
							
							
							llvm-svn: 137146 
							
						 
						
							2011-08-09 21:07:45 +00:00  
				
					
						
							
							
								 
						
							
								e0152a73c2 
								
							 
						 
						
							
							
								
								Replace the existing ARM disassembler with a new one based on the FixedLenDecoderEmitter.  
							
							... 
							
							
							
							This new disassembler can correctly decode all the testcases that the old one did, though
some "expected failure" testcases are XFAIL'd for now because it is not (yet) as strict in
operand checking as the old one was.
llvm-svn: 137144 
							
						 
						
							2011-08-09 20:55:18 +00:00  
				
					
						
							
							
								 
						
							
								d359571120 
								
							 
						 
						
							
							
								
								ARM refactoring assembly parsing of memory address operands.  
							
							... 
							
							
							
							Memory operand parsing is a bit haphazzard at the moment, in no small part
due to the even more haphazzard representations of memory operands in the .td
files. Start cleaning that all up, at least a bit.
The addressing modes in the .td files will be being simplified to not be
so monolithic, especially with regards to immediate vs. register offsets
and post-indexed addressing. addrmode3 is on its way with this patch, for
example.
This patch is foundational to enable going back to smaller incremental patches
for the individual memory referencing instructions themselves. It does just
enough to get the basics in place and handle the "make check" regression tests
we already have.
Follow-up work will be fleshing out the details and adding more robust test
cases for the individual instructions, starting with ARM mode and moving from
there into Thumb and Thumb2.
llvm-svn: 136845 
							
						 
						
							2011-08-03 23:50:40 +00:00  
				
					
						
							
							
								 
						
							
								51726e2147 
								
							 
						 
						
							
							
								
								ARM SRS instruction parsing, diassembly  and encoding support.  
							
							... 
							
							
							
							Fix the instruction encoding for operands. Refactor mode to use explicit
instruction definitions per FIXME to be more consistent with loads/stores.
Fix disassembler accordingly. Add tests.
llvm-svn: 136509 
							
						 
						
							2011-07-29 20:26:09 +00:00  
				
					
						
							
							
								 
						
							
								d25c2cdad7 
								
							 
						 
						
							
							
								
								Tweak ARM assembly parsing and printing of MSR instruction.  
							
							... 
							
							
							
							The system register spec should be case insensitive. The preferred form for
output with mask values of 4, 8, and 12 references APSR rather than CPSR.
Update and tidy up tests accordingly.
llvm-svn: 135532 
							
						 
						
							2011-07-19 22:45:10 +00:00  
				
					
						
							
							
								 
						
							
								454e1c7abb 
								
							 
						 
						
							
							
								
								Remove VMOVDneon and VMOVQ, which are just aliases for VORR.  This continues to simplify the path towards an auto-generated disassembler.  
							
							... 
							
							
							
							llvm-svn: 135290 
							
						 
						
							2011-07-15 18:46:47 +00:00  
				
					
						
							
							
								 
						
							
								581da64241 
								
							 
						 
						
							
							
								
								Simplify printing of ARM shifted immediates.  
							
							... 
							
							
							
							Print shifted immediate values directly rather than as a payload+shifter
value pair. This makes for more readable output assembly code, simplifies
the instruction printer, and is consistent with how Thumb immediates are
 displayed.
llvm-svn: 134902 
							
						 
						
							2011-07-11 16:48:36 +00:00  
				
					
						
							
							
								 
						
							
								a0c9c75df2 
								
							 
						 
						
							
							
								
								Fix Bug 9386 - ARM disassembler failed to disassemble conditional bx  
							
							... 
							
							
							
							Modified the patch to .td file supplied by Jyun-Yan You.  Add a test case and
modified ARMDisassemblerCore.cpp a little bit.
llvm-svn: 131859 
							
						 
						
							2011-05-22 17:51:04 +00:00  
				
					
						
							
							
								 
						
							
								071634612d 
								
							 
						 
						
							
							
								
								Disassembly of tBcc was wrongly adding 4 to the SignExtend'ed imm8:'0' immediate operand.  
							
							... 
							
							
							
							llvm-svn: 131565 
							
						 
						
							2011-05-18 20:32:41 +00:00  
				
					
						
							
							
								 
						
							
								c3c7001844 
								
							 
						 
						
							
							
								
								Add tests for A8.6.110 NOP.  
							
							... 
							
							
							
							llvm-svn: 130345 
							
						 
						
							2011-04-27 23:29:21 +00:00  
				
					
						
							
							
								 
						
							
								57c892860e 
								
							 
						 
						
							
							
								
								Disassembly of A8.6.59 LDR (literal) Encoding T1 (16-bit thumb instruction) should  
							
							... 
							
							
							
							print out ldr, not ldr.n.
rdar://problem/9267772
llvm-svn: 130008 
							
						 
						
							2011-04-22 19:12:43 +00:00  
				
					
						
							
							
								 
						
							
								48592ee5af 
								
							 
						 
						
							
							
								
								Thumb2 BFC was insufficiently encoded.  
							
							... 
							
							
							
							rdar://problem/9292717
llvm-svn: 129619 
							
						 
						
							2011-04-15 22:52:15 +00:00  
				
					
						
							
							
								 
						
							
								761e1e3512 
								
							 
						 
						
							
							
								
								A8.6.315 VLD3 (single 3-element structure to all lanes)  
							
							... 
							
							
							
							The a bit must be encoded as 0.
rdar://problem/9292625
llvm-svn: 129618 
							
						 
						
							2011-04-15 22:49:08 +00:00  
				
					
						
							
							
								 
						
							
								421316178e 
								
							 
						 
						
							
							
								
								The ARM disassembler did not handle the alignment correctly for VLD*DUP* instructions  
							
							... 
							
							
							
							(single element or n-element structure to all lanes).
llvm-svn: 129550 
							
						 
						
							2011-04-15 00:10:45 +00:00  
				
					
						
							
							
								 
						
							
								4251b151b1 
								
							 
						 
						
							
							
								
								Add sanity checkings for Thumb2 Load/Store Register Exclusive family of operations.  
							
							... 
							
							
							
							llvm-svn: 129531 
							
						 
						
							2011-04-14 19:13:28 +00:00  
				
					
						
							
							
								 
						
							
								d0fb04f437 
								
							 
						 
						
							
							
								
								Thumb disassembler did not handle tBRIND (indirect branch) properly.  
							
							... 
							
							
							
							rdar://problem/9280370
llvm-svn: 129480 
							
						 
						
							2011-04-13 21:59:01 +00:00  
				
					
						
							
							
								 
						
							
								b6a37bff21 
								
							 
						 
						
							
							
								
								Check for unallocated instruction encodings when disassembling Thumb Branch instructions (tBcc and t2Bcc).  
							
							... 
							
							
							
							rdar://problem/9280470
llvm-svn: 129471 
							
						 
						
							2011-04-13 21:35:49 +00:00  
				
					
						
							
							
								 
						
							
								ffa6378fd6 
								
							 
						 
						
							
							
								
								The LDR*T/STR*T (unpriviledged load/store) operations don't take SP or PC as Rt.  
							
							... 
							
							
							
							rdar://problem/9279440
llvm-svn: 129469 
							
						 
						
							2011-04-13 21:04:32 +00:00  
				
					
						
							
							
								 
						
							
								70591cbc60 
								
							 
						 
						
							
							
								
								Check the corner cases for t2LDRSHi12 correctly and mark invalid encodings as such.  
							
							... 
							
							
							
							rdar://problem/9276651
llvm-svn: 129462 
							
						 
						
							2011-04-13 19:46:05 +00:00  
				
					
						
							
							
								 
						
							
								0d306a7840 
								
							 
						 
						
							
							
								
								Fix a bug where for t2MOVCCi disassembly, the TIED_TO register operand was not properly handled.  
							
							... 
							
							
							
							rdar://problem/9276427
llvm-svn: 129456 
							
						 
						
							2011-04-13 17:51:02 +00:00  
				
					
						
							
							
								 
						
							
								3c2f74c9f3 
								
							 
						 
						
							
							
								
								Add sanity check for Ld/St Dual forms of Thumb2 instructions.  
							
							... 
							
							
							
							rdar://problem/9273947
llvm-svn: 129411 
							
						 
						
							2011-04-12 23:31:00 +00:00  
				
					
						
							
							
								 
						
							
								960eef3db3 
								
							 
						 
						
							
							
								
								The Thumb2 RFE instructions need to have their second halfword fully specified.  
							
							... 
							
							
							
							In addition, the base register is not rGPR, but GPR with th exception that:
    if n == 15 then UNPREDICTABLE
rdar://problem/9273836
llvm-svn: 129391 
							
						 
						
							2011-04-12 21:41:51 +00:00  
				
					
						
							
							
								 
						
							
								01637b9acb 
								
							 
						 
						
							
							
								
								Add bad register checks for Thumb2 Ld/St instructions.  
							
							... 
							
							
							
							rdar://problem/9269047
llvm-svn: 129387 
							
						 
						
							2011-04-12 21:17:51 +00:00  
				
					
						
							
							
								 
						
							
								ab86a519f8 
								
							 
						 
						
							
							
								
								The Thumb2 Ld, St, and Preload instructions with the i12 forms should have its Inst{23}  
							
							... 
							
							
							
							be specified as '1' (add = TRUE).
Also add a utility function for Thumb2.
llvm-svn: 129377 
							
						 
						
							2011-04-12 18:48:00 +00:00  
				
					
						
							
							
								 
						
							
								d0e2be39ea 
								
							 
						 
						
							
							
								
								Print out a debug message when the reglist fails the sanity check for Thumb Ld/St Multiple.  
							
							... 
							
							
							
							llvm-svn: 129365 
							
						 
						
							2011-04-12 17:09:04 +00:00  
				
					
						
							
							
								 
						
							
								f130b7f0f5 
								
							 
						 
						
							
							
								
								Add one test case (svc).  
							
							... 
							
							
							
							llvm-svn: 129327 
							
						 
						
							2011-04-12 00:21:48 +00:00  
				
					
						
							
							
								 
						
							
								672ef14a62 
								
							 
						 
						
							
							
								
								A8.6.16 B  
							
							... 
							
							
							
							Encoding T1 (tBcc)
if cond == '1110' then UNDEFINED;
rdar://problem/9268681
llvm-svn: 129325 
							
						 
						
							2011-04-12 00:14:49 +00:00  
				
					
						
							
							
								 
						
							
								dc8bf9ec08 
								
							 
						 
						
							
							
								
								Thumb disassembler was erroneously rejecting "blx sp" instruction.  
							
							... 
							
							
							
							rdar://problem/9267838
llvm-svn: 129320 
							
						 
						
							2011-04-11 23:33:30 +00:00  
				
					
						
							
							
								 
						
							
								f79d5365de 
								
							 
						 
						
							
							
								
								Fix the bug where the immediate shift amount for Thumb logical shift instructions are incorrectly disassembled.  
							
							... 
							
							
							
							rdar://problem/9266265
llvm-svn: 129298 
							
						 
						
							2011-04-11 21:14:35 +00:00  
				
					
						
							
							
								 
						
							
								66fab75920 
								
							 
						 
						
							
							
								
								Check invalid register encodings for LdFrm/StFrm ARM instructions and flag them as  
							
							... 
							
							
							
							invalid instructions.
llvm-svn: 129286 
							
						 
						
							2011-04-11 18:34:12 +00:00  
				
					
						
							
							
								 
						
							
								a9570f77d5 
								
							 
						 
						
							
							
								
								Hanlde the checking of bad regs for SMMLAR properly, instead of asserting.  
							
							... 
							
							
							
							PR9650
rdar://problem/9257565
llvm-svn: 129147 
							
						 
						
							2011-04-08 19:41:22 +00:00  
				
					
						
							
							
								 
						
							
								875e0e4626 
								
							 
						 
						
							
							
								
								Sanity check the option operand for DMB/DSB.  
							
							... 
							
							
							
							PR9648
rdar://problem/9257634
llvm-svn: 129146 
							
						 
						
							2011-04-08 19:18:07 +00:00  
				
					
						
							
							
								 
						
							
								74c74ba81c 
								
							 
						 
						
							
							
								
								MOVi16 and MOVTi16 does not allow pc as the dest register, while MOVi allows it.  
							
							... 
							
							
							
							Add tests for that.
llvm-svn: 129137 
							
						 
						
							2011-04-08 17:29:58 +00:00  
				
					
						
							
							
								 
						
							
								7e51b4640f 
								
							 
						 
						
							
							
								
								Add sanity checking for bad register specifier(s) for the DPFrm instructions.  
							
							... 
							
							
							
							Add more test cases to exercise the logical branches related to the above change.
llvm-svn: 129117 
							
						 
						
							2011-04-08 00:29:09 +00:00  
				
					
						
							
							
								 
						
							
								165a07adf9 
								
							 
						 
						
							
							
								
								Add a VEXT test.  
							
							... 
							
							
							
							llvm-svn: 129111 
							
						 
						
							2011-04-07 22:04:01 +00:00  
				
					
						
							
							
								 
						
							
								04efb8f6ce 
								
							 
						 
						
							
							
								
								Add sanity checking for invalid register encodings for signed/unsigned extend instructions.  
							
							... 
							
							
							
							Add some test cases.
llvm-svn: 129098 
							
						 
						
							2011-04-07 19:28:58 +00:00  
				
					
						
							
							
								 
						
							
								07606661f9 
								
							 
						 
						
							
							
								
								Add sanity checking for invalid register encodings for saturating instructions.  
							
							... 
							
							
							
							llvm-svn: 129096 
							
						 
						
							2011-04-07 19:02:08 +00:00  
				
					
						
							
							
								 
						
							
								194a2267ad 
								
							 
						 
						
							
							
								
								Add some more comments about checkings of invalid register numbers.  
							
							... 
							
							
							
							And two test cases.
llvm-svn: 129090 
							
						 
						
							2011-04-07 18:33:19 +00:00  
				
					
						
							
							
								 
						
							
								313ec7953a 
								
							 
						 
						
							
							
								
								Sanity check MSRi for invalid mask values and reject it as invalid.  
							
							... 
							
							
							
							rdar://problem/9246844
llvm-svn: 129050 
							
						 
						
							2011-04-07 01:37:34 +00:00  
				
					
						
							
							
								 
						
							
								c0e86fb965 
								
							 
						 
						
							
							
								
								The ARM disassembler was not recognizing USADA8 instruction.  Need to add checking for register values  
							
							... 
							
							
							
							for USAD8 and USADA8.
rdar://problem/9247060
llvm-svn: 129047 
							
						 
						
							2011-04-07 01:05:52 +00:00  
				
					
						
							
							
								 
						
							
								d4cced54b3 
								
							 
						 
						
							
							
								
								Should also check SMLAD for invalid register values.  
							
							... 
							
							
							
							rdar://problem/9246650
llvm-svn: 129042 
							
						 
						
							2011-04-07 00:50:25 +00:00  
				
					
						
							
							
								 
						
							
								bd9a4f8d07 
								
							 
						 
						
							
							
								
								A8.6.393  
							
							... 
							
							
							
							The ARM disassembler should reject invalid (type, align) encodings as invalid instructions.
So, instead of:
Opcode=1641 Name=VST2b32_UPD Format=ARM_FORMAT_NLdSt(30)
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
-------------------------------------------------------------------------------------------------
| 1: 1: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0| 0: 0: 1: 1| 0: 0: 0: 0| 1: 0: 0: 1| 1: 0: 1: 1| 0: 0: 1: 1|
-------------------------------------------------------------------------------------------------
	vst2.32	{d0, d2}, [r3, :256], r3
we now have:
Opcode=1641 Name=VST2b32_UPD Format=ARM_FORMAT_NLdSt(30)
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
-------------------------------------------------------------------------------------------------
| 1: 1: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0| 0: 0: 1: 1| 0: 0: 0: 0| 1: 0: 0: 1| 1: 0: 1: 1| 0: 0: 1: 1|
-------------------------------------------------------------------------------------------------
mc-input.txt:1:1: warning: invalid instruction encoding
0xb3 0x9 0x3 0xf4
^
llvm-svn: 129033 
							
						 
						
							2011-04-06 22:14:48 +00:00  
				
					
						
							
							
								 
						
							
								2ac486e387 
								
							 
						 
						
							
							
								
								A8.6.92 MCR (Encoding A1): if coproc == '101x' then SEE "Advanced SIMD and VFP"  
							
							... 
							
							
							
							Since these "Advanced SIMD and VFP" instructions have more specfic encoding bits
specified, if coproc == 10 or 11, we should reject the insn as invalid.
rdar://problem/9239922
rdar://problem/9239596
llvm-svn: 129027 
							
						 
						
							2011-04-06 20:49:02 +00:00  
				
					
						
							
							
								 
						
							
								8bca174f48 
								
							 
						 
						
							
							
								
								Fix a bug in the disassembly of VGETLNs8 where the lane index was wrong.  
							
							... 
							
							
							
							Also set the encoding bits (for A8.6.303, A8.6.328, A8.6.329) Inst{3-0} = 0b0000,
in class NVLaneOp.
rdar://problem/9240648
llvm-svn: 129015 
							
						 
						
							2011-04-06 18:27:46 +00:00  
				
					
						
							
							
								 
						
							
								0ec0e98a6a 
								
							 
						 
						
							
							
								
								Add a missing opcode (SMLSLDX) to BadRegsMulFrm() function.  
							
							... 
							
							
							
							Add more complete sanity check for LdStFrm instructions where if IBit (Inst{25})
is 1, Inst{4} should be 0.  Otherwise, we should reject the insn as invalid.
rdar://problem/9239347
rdar://problem/9239467
llvm-svn: 128977 
							
						 
						
							2011-04-06 01:18:32 +00:00  
				
					
						
							
							
								 
						
							
								f6e327c6a3 
								
							 
						 
						
							
							
								
								Fix a typo in the handling of PKHTB opcode, plus add sanity check for illegal register  
							
							... 
							
							
							
							encodings for DisassembleArithMiscFrm().
rdar://problem/9238659
llvm-svn: 128958 
							
						 
						
							2011-04-05 23:28:00 +00:00  
				
					
						
							
							
								 
						
							
								c3656d29f6 
								
							 
						 
						
							
							
								
								A7.3 register encoding  
							
							... 
							
							
							
							Qd -> bit[12] == 0
    Qn -> bit[16] == 0
    Qm -> bit[0]  == 0
If one of these bits is 1, the instruction is UNDEFINED.
rdar://problem/9238399
rdar://problem/9238445
llvm-svn: 128949 
							
						 
						
							2011-04-05 22:57:07 +00:00  
				
					
						
							
							
								 
						
							
								9da60e016b 
								
							 
						 
						
							
							
								
								ARM disassembler was erroneously accepting an invalid RSC instruction.  
							
							... 
							
							
							
							Added checks for regs which should not be 15.
rdar://problem/9237734
llvm-svn: 128945 
							
						 
						
							2011-04-05 22:18:07 +00:00  
				
					
						
							
							
								 
						
							
								25883487a1 
								
							 
						 
						
							
							
								
								ARM disassembler was erroneously accepting an invalid LSL instruction.  
							
							... 
							
							
							
							For register-controlled shifts, we should check that the encoding constraint
Inst{7} = 0 and Inst{4} = 1 is satisfied.
rdar://problem/9237693
llvm-svn: 128941 
							
						 
						
							2011-04-05 21:49:44 +00:00  
				
					
						
							
							
								 
						
							
								e9c644d4a0 
								
							 
						 
						
							
							
								
								The r128085 checkin modified the operand ordering for MRC/MRC2 instructions.  
							
							... 
							
							
							
							Modify DisassembleCoprocessor() of ARMDisassemblerCore.cpp to react to the change.
rdar://problem/9236873
llvm-svn: 128922 
							
						 
						
							2011-04-05 20:32:23 +00:00  
				
					
						
							
							
								 
						
							
								151582492d 
								
							 
						 
						
							
							
								
								ARM disassembler should flag (rGPRRegClassID, r13|r15) as an error.  
							
							... 
							
							
							
							llvm-svn: 128913 
							
						 
						
							2011-04-05 19:42:11 +00:00  
				
					
						
							
							
								 
						
							
								56c15c64b0 
								
							 
						 
						
							
							
								
								LDRD now prints out two dst registers.  
							
							... 
							
							
							
							llvm-svn: 128909 
							
						 
						
							2011-04-05 18:53:14 +00:00  
				
					
						
							
							
								 
						
							
								33d3a9fadc 
								
							 
						 
						
							
							
								
								Constants with multiple encodings (ARM):  
							
							... 
							
							
							
							An alternative syntax is available for a modified immediate constant that permits the programmer to specify
the encoding directly. In this syntax, #<const> is instead written as #<byte>,#<rot>, where:
    <byte> is the numeric value of abcdefgh, in the range 0-255
    <rot> is twice the numeric value of rotation, an even number in the range 0-30.
llvm-svn: 128897 
							
						 
						
							2011-04-05 18:02:46 +00:00  
				
					
						
							
							
								 
						
							
								268d63f307 
								
							 
						 
						
							
							
								
								Check for invalid register encodings for UMAAL and friends where:  
							
							... 
							
							
							
							if dLo == 15 || dHi == 15 || n == 15 || m == 15 then UNPREDICTABLE;
    if dHi == dLo then UNPREDICTABLE;
rdar://problem/9230202
llvm-svn: 128895 
							
						 
						
							2011-04-05 17:43:10 +00:00  
				
					
						
							
							
								 
						
							
								9b3ccba636 
								
							 
						 
						
							
							
								
								Fix SRS/SRSW encoding bits.  
							
							... 
							
							
							
							rdar://problem/9230801 ARM disassembler discrepancy: erroneously accepting SRS
Plus add invalid-RFEorLDMIA-arm.txt test which should have been checked in with
http://llvm.org/viewvc/llvm-project?view=rev&revision=128859 .
llvm-svn: 128864 
							
						 
						
							2011-04-05 00:16:18 +00:00  
				
					
						
							
							
								 
						
							
								8372006296 
								
							 
						 
						
							
							
								
								Fix incorrect alignment for NEON VST2b32_UPD.  
							
							... 
							
							
							
							rdar://problem/9225433
llvm-svn: 128841 
							
						 
						
							2011-04-04 20:35:31 +00:00  
				
					
						
							
							
								 
						
							
								8904cc49db 
								
							 
						 
						
							
							
								
								Fixed a bug in disassembly of STR_POST, where the immediate is the second operand in am2offset;  
							
							... 
							
							
							
							instead of the second operand in addrmode_imm12.
rdar://problem/9225289
llvm-svn: 128757 
							
						 
						
							2011-04-02 02:24:54 +00:00  
				
					
						
							
							
								 
						
							
								387b36eaae 
								
							 
						 
						
							
							
								
								Fixed MOVr for "should be" encoding bits for Inst{19-16} = 0b0000.  
							
							... 
							
							
							
							rdar://problem/9224276
llvm-svn: 128749 
							
						 
						
							2011-04-01 23:30:25 +00:00  
				
					
						
							
							
								 
						
							
								6615fa1de0 
								
							 
						 
						
							
							
								
								MOVs should have Inst{19-16} as 0b0000, otherwise, the instruction is UNPREDICTABLE.  
							
							... 
							
							
							
							rdar://problem/9224120
llvm-svn: 128748 
							
						 
						
							2011-04-01 23:15:50 +00:00  
				
					
						
							
							
								 
						
							
								1e1010f56f 
								
							 
						 
						
							
							
								
								Fix the instruction table entries for AI1_adde_sube_s_irs multiclass definition so that  
							
							... 
							
							
							
							all the instruction have:
    let Inst{31-27} = 0b1110; // non-predicated
Before, the ARM decoder was confusing:
> 0x40 0xf3 0xb8 0x80
as:
Opcode=16 Name=ADCSSrs Format=ARM_FORMAT_DPSOREGFRM(5)
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
-------------------------------------------------------------------------------------------------
| 1: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 1: 0: 0: 0| 1: 1: 1: 1| 0: 0: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0|
-------------------------------------------------------------------------------------------------
	adcs	pc, r8, r0, asr #6 
since the cond field for ADCSSrs is a wild card, and so is ADCrs, with the ADCSSrs having Inst{20} as '1'.
Now, the AR decoder behaves correctly:
> 0x40 0xf3 0xb8 0x80
> END
Executing command: /Volumes/data/lldb/llvm/Debug+Asserts/bin/llvm-mc -disassemble -triple=arm-apple-darwin -debug-only=arm-disassembler mc-input.txt
Opcode=19 Name=ADCrs Format=ARM_FORMAT_DPSOREGFRM(5)
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
-------------------------------------------------------------------------------------------------
| 1: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 1: 0: 0: 0| 1: 1: 1: 1| 0: 0: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0|
-------------------------------------------------------------------------------------------------
	adcshi	pc, r8, r0, asr #6 
> 
rdar://problem/9223094
llvm-svn: 128746 
							
						 
						
							2011-04-01 22:32:51 +00:00  
				
					
						
							
							
								 
						
							
								3dfb80afbf 
								
							 
						 
						
							
							
								
								Fix a LDRT/LDRBT decoding bug where for Encoding A2, if Inst{4} != 0, we should reject the instruction  
							
							... 
							
							
							
							as invalid.
llvm-svn: 128734 
							
						 
						
							2011-04-01 20:21:38 +00:00  
				
					
						
							
							
								 
						
							
								fe6fba3fe6 
								
							 
						 
						
							
							
								
								Fix LDRi12 immediate operand, which was changed to be the second operand in $addrmode_imm12 => (ops GPR:$base, i32imm:$offsimm).  
							
							... 
							
							
							
							rdar://problem/9219356
llvm-svn: 128722 
							
						 
						
							2011-04-01 18:26:38 +00:00  
				
					
						
							
							
								 
						
							
								9cd9c4e5c9 
								
							 
						 
						
							
							
								
								Add a test case for a malformed LDC/LDC2 instructions with PUDW = 0b0000, which  
							
							... 
							
							
							
							amounts to an UNDEFINED instruction.
llvm-svn: 128668 
							
						 
						
							2011-03-31 20:54:30 +00:00  
				
					
						
							
							
								 
						
							
								7b203f9cae 
								
							 
						 
						
							
							
								
								Fix single word and unsigned byte data transfer instruction encodings so that  
							
							... 
							
							
							
							Inst{4} = 0.
rdar://problem/9213022
llvm-svn: 128662 
							
						 
						
							2011-03-31 19:28:35 +00:00  
				
					
						
							
							
								 
						
							
								13baa0e650 
								
							 
						 
						
							
							
								
								Add BLXi to the instruction table for disassembly purpose.  
							
							... 
							
							
							
							A8.6.23 BLX (immediate)
rdar://problem/9212921
llvm-svn: 128644 
							
						 
						
							2011-03-31 17:53:50 +00:00  
				
					
						
							
							
								 
						
							
								0ae2501fd2 
								
							 
						 
						
							
							
								
								Add a test case for thumb stc2 instruction.  
							
							... 
							
							
							
							llvm-svn: 128517 
							
						 
						
							2011-03-30 01:02:06 +00:00  
				
					
						
							
							
								 
						
							
								a0f0b5d9f0 
								
							 
						 
						
							
							
								
								Add a test case for MSRi.  
							
							... 
							
							
							
							llvm-svn: 128494 
							
						 
						
							2011-03-29 21:52:02 +00:00  
				
					
						
							
							
								 
						
							
								dcb29ae8ee 
								
							 
						 
						
							
							
								
								Add a thumb test file for printf (iOS 4.3).  
							
							... 
							
							
							
							llvm-svn: 128487 
							
						 
						
							2011-03-29 21:09:30 +00:00  
				
					
						
							
							
								 
						
							
								4bc2baeb28 
								
							 
						 
						
							
							
								
								A8.6.188 STC, STC2  
							
							... 
							
							
							
							The STC_OPTION and STC2_OPTION instructions should have their coprocessor option enclosed in {}.
rdar://problem/9200661
llvm-svn: 128478 
							
						 
						
							2011-03-29 19:49:38 +00:00  
				
					
						
							
							
								 
						
							
								7927569f05 
								
							 
						 
						
							
							
								
								Rename invalid-VLDMSDB-arm.txt to be invalid-VLDMSDB_UPD-arm.txt.  
							
							... 
							
							
							
							llvm-svn: 128477 
							
						 
						
							2011-03-29 19:10:06 +00:00  
				
					
						
							
							
								 
						
							
								ec6f76ed38 
								
							 
						 
						
							
							
								
								Add and modify some tests.  
							
							... 
							
							
							
							llvm-svn: 128476 
							
						 
						
							2011-03-29 19:08:52 +00:00  
				
					
						
							
							
								 
						
							
								d6c5a741b5 
								
							 
						 
						
							
							
								
								Get rid of the non-writeback versions VLDMDB and VSTMDB, which don't actually exist.  
							
							... 
							
							
							
							llvm-svn: 128461 
							
						 
						
							2011-03-29 16:45:53 +00:00  
				
					
						
							
							
								 
						
							
								f9cd139369 
								
							 
						 
						
							
							
								
								Fix ARM disassembly for PLD/PLDW/PLI which suffers from code rot and add some test cases.  
							
							... 
							
							
							
							Add comments to ThumbDisassemblerCore.h for recent change made for t2PLD disassembly.
llvm-svn: 128417 
							
						 
						
							2011-03-28 18:41:58 +00:00  
				
					
						
							
							
								 
						
							
								923f3dac01 
								
							 
						 
						
							
							
								
								Fixed the t2PLD and friends disassembly and add two test cases.  
							
							... 
							
							
							
							llvm-svn: 128322 
							
						 
						
							2011-03-26 01:32:48 +00:00  
				
					
						
							
							
								 
						
							
								1572bf40b4 
								
							 
						 
						
							
							
								
								Add test for A8.6.246 UMULL to both arm-tests.txt amd thumb-tests.txt.  
							
							... 
							
							
							
							llvm-svn: 128306 
							
						 
						
							2011-03-25 23:02:58 +00:00  
				
					
						
							
							
								 
						
							
								6e31bf1f6f 
								
							 
						 
						
							
							
								
								Add two test cases t2SMLABT and t2SMMULR for DisassembleThumb2Mul().  
							
							... 
							
							
							
							llvm-svn: 128305 
							
						 
						
							2011-03-25 22:43:28 +00:00  
				
					
						
							
							
								 
						
							
								49316e40ba 
								
							 
						 
						
							
							
								
								Fix DisassembleThumb2DPReg()'s handling of RegClass.  Cannot hardcode GPRRegClassID.  
							
							... 
							
							
							
							Also add some test cases.
rdar://problem/9189829
llvm-svn: 128304 
							
						 
						
							2011-03-25 22:19:07 +00:00  
				
					
						
							
							
								 
						
							
								aaf2c69400 
								
							 
						 
						
							
							
								
								DisassembleThumb2LdSt() did not handle t2LDRs correctly with respect to RegClass.  Add two test cases.  
							
							... 
							
							
							
							rdar://problem/9182892
llvm-svn: 128299 
							
						 
						
							2011-03-25 19:35:37 +00:00  
				
					
						
							
							
								 
						
							
								4fd2194638 
								
							 
						 
						
							
							
								
								A8.6.226 TBB, TBH:  
							
							... 
							
							
							
							Add two test cases.
llvm-svn: 128295 
							
						 
						
							2011-03-25 18:40:21 +00:00  
				
					
						
							
							
								 
						
							
								b35548f44d 
								
							 
						 
						
							
							
								
								Modify DisassembleThumb2LdStEx() to be more robust/correct in light of recent change to  
							
							... 
							
							
							
							t2LDREX/t2STREX instructions.  Add two test cases.
llvm-svn: 128293 
							
						 
						
							2011-03-25 18:29:49 +00:00  
				
					
						
							
							
								 
						
							
								aa84d41dfc 
								
							 
						 
						
							
							
								
								Instruction formats of SWP/SWPB were changed from LdStExFrm to MiscFrm.  Modify the disassembler to handle that.  
							
							... 
							
							
							
							rdar://problem/9184053
llvm-svn: 128285 
							
						 
						
							2011-03-25 17:31:16 +00:00  
				
					
						
							
							
								 
						
							
								757ca69770 
								
							 
						 
						
							
							
								
								Also need to handle invalid imod values for CPS2p.  
							
							... 
							
							
							
							rdar://problem/9186136
llvm-svn: 128283 
							
						 
						
							2011-03-25 17:03:12 +00:00  
				
					
						
							
							
								 
						
							
								a52143bff3 
								
							 
						 
						
							
							
								
								Modify the wrong logic in the assert of DisassembleThumb2LdStDual() (the register classes were changed),  
							
							... 
							
							
							
							modify the comment to be up-to-date, and add a test case for A8.6.66 LDRD (immediate) Encoding T1.
llvm-svn: 128252 
							
						 
						
							2011-03-25 01:09:48 +00:00  
				
					
						
							
							
								 
						
							
								72f4a95144 
								
							 
						 
						
							
							
								
								delegate the disassembly of t2ADR to the more generic t2ADDri12/t2SUBri12 instructions, and add a test case for that.  
							
							... 
							
							
							
							llvm-svn: 128249 
							
						 
						
							2011-03-25 00:17:42 +00:00  
				
					
						
							
							
								 
						
							
								ceef55466a 
								
							 
						 
						
							
							
								
								The opcode names ("tLDM", "tLDM_UPD") used for conflict resolution have been stale since  
							
							... 
							
							
							
							the change to ("tLDMIA", "tLDMIA_UPD").  Update the conflict resolution code and add
test cases for that.
llvm-svn: 128247 
							
						 
						
							2011-03-24 23:42:31 +00:00  
				
					
						
							
							
								 
						
							
								73193f2475 
								
							 
						 
						
							
							
								
								The ARM disassembler was confused with the 16-bit tSTMIA instruction.  
							
							... 
							
							
							
							According to A8.6.189 STM/STMIA/STMEA (Encoding T1), there's only tSTMIA_UPD available.
Ignore tSTMIA for the decoder emitter and add a test case for that.
llvm-svn: 128246 
							
						 
						
							2011-03-24 23:21:14 +00:00  
				
					
						
							
							
								 
						
							
								9302df0ad9 
								
							 
						 
						
							
							
								
								Handle the added VBICiv*i* NEON instructions, too.  
							
							... 
							
							
							
							llvm-svn: 128243 
							
						 
						
							2011-03-24 22:04:39 +00:00  
				
					
						
							
							
								 
						
							
								6469ca0c33 
								
							 
						 
						
							
							
								
								T2 Load/Store Multiple:  
							
							... 
							
							
							
							These instructions were changed to not embed the addressing mode within the MC instructions
We also need to update the corresponding assert stmt.  Also add a test case.
llvm-svn: 128240 
							
						 
						
							2011-03-24 21:36:56 +00:00  
				
					
						
							
							
								 
						
							
								dd9eb21c3f 
								
							 
						 
						
							
							
								
								Plug a leak in the arm disassembler and put the tests back.  
							
							... 
							
							
							
							llvm-svn: 128238 
							
						 
						
							2011-03-24 21:14:28 +00:00  
				
					
						
							
							
								 
						
							
								471f5aa233 
								
							 
						 
						
							
							
								
								Remove these two test files as they cause llvm-i686-linux-vg_leak build to fail 'test-llvm'.  
							
							... 
							
							
							
							These two are test cases which should result in 'invalid instruction encoding' from running llvm-mc -disassemble.
llvm-svn: 128235 
							
						 
						
							2011-03-24 20:56:23 +00:00  
				
					
						
							
							
								 
						
							
								8bbc12824a 
								
							 
						 
						
							
							
								
								ADR was added with the wrong encoding for inst{24-21}, and the ARM decoder was fooled.  
							
							... 
							
							
							
							Set the encoding bits to {0,?,?,0}, not 0.  Plus delegate the disassembly of ADR to
the more generic ADDri/SUBri instructions, and add a test case for that.
llvm-svn: 128234 
							
						 
						
							2011-03-24 20:42:48 +00:00  
				
					
						
							
							
								 
						
							
								c5207f7167 
								
							 
						 
						
							
							
								
								The r118201 added support for VORR (immediate).  Update ARMDisassemblerCore.cpp to disassemble the  
							
							... 
							
							
							
							VORRiv*i* instructions properly within the DisassembleN1RegModImmFrm() function.  Add a test case.
llvm-svn: 128226 
							
						 
						
							2011-03-24 18:40:38 +00:00  
				
					
						
							
							
								 
						
							
								1dd041083d 
								
							 
						 
						
							
							
								
								Add comments to the handling of opcode CPS3p to reject invalid instruction encoding,  
							
							... 
							
							
							
							a test case of invalid CPS3p encoding and one for invalid VLDMSDB due to regs out of range.
llvm-svn: 128220 
							
						 
						
							2011-03-24 17:04:22 +00:00  
				
					
						
							
							
								 
						
							
								0f5d52d658 
								
							 
						 
						
							
							
								
								Load/Store Multiple:  
							
							... 
							
							
							
							These instructions were changed to not embed the addressing mode within the MC instructions
We also need to update the corresponding assert stmt.  Also add two test cases.
llvm-svn: 128191 
							
						 
						
							2011-03-24 01:40:42 +00:00  
				
					
						
							
							
								 
						
							
								1de8cc6f95 
								
							 
						 
						
							
							
								
								STRT and STRBT was incorrectly tagged as IndexModeNone during the refactorings (r119821).  
							
							... 
							
							
							
							We now tag them as IndexModePost.
llvm-svn: 128189 
							
						 
						
							2011-03-24 01:07:26 +00:00  
				
					
						
							
							
								 
						
							
								f949d8e13d 
								
							 
						 
						
							
							
								
								The r128103 fix to cope with the removal of addressing modes from the MC instructions  
							
							... 
							
							
							
							were incomplete.  The assert stmt needs to be updated and the operand index incrment is wrong.
Fix the bad logic and add some sanity checking to detect bad instruction encoding;
and add a test case.
llvm-svn: 128186 
							
						 
						
							2011-03-24 00:28:38 +00:00  
				
					
						
							
							
								 
						
							
								122a6304ef 
								
							 
						 
						
							
							
								
								Add disassembly test cases for:  
							
							... 
							
							
							
							A8.6.292 VCMPE
llvm-svn: 128120 
							
						 
						
							2011-03-22 23:08:56 +00:00  
				
					
						
							
							
								 
						
							
								30350cdbdf 
								
							 
						 
						
							
							
								
								LDRT and LDRBT was incorrectly tagged as IndexModeNone during the refactorings (r119821).  
							
							... 
							
							
							
							We now tag them as IndexModePost.
This fixed http://llvm.org/bugs/show_bug.cgi?id=9530 .
llvm-svn: 128113 
							
						 
						
							2011-03-22 22:28:49 +00:00  
				
					
						
							
							
								 
						
							
								0cf62f5045 
								
							 
						 
						
							
							
								
								Add one more test case for VFP Load/Store Multiple (vpop).  
							
							... 
							
							
							
							llvm-svn: 128106 
							
						 
						
							2011-03-22 20:21:08 +00:00  
				
					
						
							
							
								 
						
							
								230268261b 
								
							 
						 
						
							
							
								
								A8.6.399 VSTM:  
							
							... 
							
							
							
							VFP Load/Store Multiple Instructions used to embed the IA/DB addressing mode within the
MC instruction; that has been changed so that now, for example, VSTMDDB_UPD and VSTMDIA_UPD
are two instructions.  Update the ARMDisassemblerCore.cpp's DisassembleVFPLdStMulFrm()
to reflect the change.
Also add a test case.
llvm-svn: 128103 
							
						 
						
							2011-03-22 20:00:10 +00:00  
				
					
						
							
							
								 
						
							
								0c5f670fe7 
								
							 
						 
						
							
							
								
								Fixed an assert by the ARM disassembler for LDRD_PRE/POST.  
							
							... 
							
							
							
							The relevant instruction table entries were changed sometime ago to no longer take
<Rt2> as an operand.  Modify ARMDisassemblerCore.cpp to accomodate the change and
add a test case.
llvm-svn: 127935 
							
						 
						
							2011-03-19 01:16:20 +00:00  
				
					
						
							
							
								 
						
							
								e387f8a5e9 
								
							 
						 
						
							
							
								
								The disassembler for Thumb was wrongly adding 4 to the computed imm32 offset.  
							
							... 
							
							
							
							Remove the offending logic and update the test cases.
llvm-svn: 127843 
							
						 
						
							2011-03-18 00:38:03 +00:00  
				
					
						
							
							
								 
						
							
								221a014ea3 
								
							 
						 
						
							
							
								
								It used to be that t_addrmode_s4 was used for both:  
							
							... 
							
							
							
							o A8.6.195 STR (register) -- Encoding T1
o A8.6.193 STR (immediate, Thumb) -- Encoding T1
It has been changed so that now they use different addressing modes
and thus different MC representation (Operand Infos).  Modify the
disassembler to reflect the change, and add relevant tests.
llvm-svn: 127833 
							
						 
						
							2011-03-17 22:04:05 +00:00  
				
					
						
							
							
								 
						
							
								a4c3154fca 
								
							 
						 
						
							
							
								
								There were two issues fixed:  
							
							... 
							
							
							
							1. The ARM Darwin *r9 call instructions were pseudo-ized recently.
   Modify the ARMDisassemblerCore.cpp file to accomodate the change.
2. The disassembler was unnecessarily adding 8 to the sign-extended imm24:
   imm32 = SignExtend(imm24:'00', 32); // A8.6.23 BL, BLX (immediate)
                                       // Encoding A1
   It has no business doing such.  Removed the offending logic.
Add test cases to arm-tests.txt.
llvm-svn: 127707 
							
						 
						
							2011-03-15 22:27:33 +00:00  
				
					
						
							
							
								 
						
							
								7a2873dfbe 
								
							 
						 
						
							
							
								
								Fixed an ARM disassembler bug where it does not handle STRi12 correctly because an extra  
							
							... 
							
							
							
							register operand was erroneously added.  Remove an incorrect assert which triggers the bug.
rdar://problem/9131529
llvm-svn: 127642 
							
						 
						
							2011-03-15 01:13:17 +00:00  
				
					
						
							
							
								 
						
							
								9363d41f14 
								
							 
						 
						
							
							
								
								LLVM combines the offset mode of A8.6.199 A1 & A2 into STRBT.  
							
							... 
							
							
							
							The insufficient encoding information of the combined instruction confuses the decoder wrt
UQADD16.  Add extra logic to recover from that.
Fixed an assert reported by Sean Callanan
llvm-svn: 127354 
							
						 
						
							2011-03-09 20:01:14 +00:00  
				
					
						
							
							
								 
						
							
								6f6d739b6e 
								
							 
						 
						
							
							
								
								TableGen should not ignore BX instructions for the ARM disassembler. pr9368.  
							
							... 
							
							
							
							llvm-svn: 126931 
							
						 
						
							2011-03-03 07:19:52 +00:00  
				
					
						
							
							
								 
						
							
								ec84568904 
								
							 
						 
						
							
							
								
								pr9367: Add missing predicated BLX instructions.  
							
							... 
							
							
							
							Patch by Jyun-Yan You, with some minor adjustments and a testcase from me.
llvm-svn: 126915 
							
						 
						
							2011-03-03 01:41:01 +00:00  
				
					
						
							
							
								 
						
							
								b8b6041734 
								
							 
						 
						
							
							
								
								Fixes an assertion failure while disassembling ARM rsbs reg/reg form.  
							
							... 
							
							
							
							Patch by Ted Kremenek!
llvm-svn: 126895 
							
						 
						
							2011-03-02 23:08:33 +00:00  
				
					
						
							
							
								 
						
							
								58775fea6f 
								
							 
						 
						
							
							
								
								Fix the arm's disassembler for blx that was building an MCInst without the  
							
							... 
							
							
							
							needed two predicate operands before the imm operand.
llvm-svn: 126662 
							
						 
						
							2011-02-28 18:46:31 +00:00  
				
					
						
							
							
								 
						
							
								9cd43977c3 
								
							 
						 
						
							
							
								
								Add assembly parsing support for "msr" and also fix its encoding. Also add  
							
							... 
							
							
							
							testcases for the disassembler to make sure it still works for "msr".
llvm-svn: 125948 
							
						 
						
							2011-02-18 19:45:59 +00:00  
				
					
						
							
							
								 
						
							
								90d1dfe4c6 
								
							 
						 
						
							
							
								
								Fix encoding and add parsing support for the arm/thumb CPS instruction:  
							
							... 
							
							
							
							- Add custom operand matching for imod and iflags.
- Rename SplitMnemonicAndCC to SplitMnemonic since it splits more than CC
  from mnemonic.
- While adding ".w" as an operand, don't change "Head" to avoid passing the
  wrong mnemonic to ParseOperand.
- Add asm parser tests.
- Add disassembler tests just to make sure it can catch all cps versions.
llvm-svn: 125489 
							
						 
						
							2011-02-14 13:09:44 +00:00  
				
					
						
							
							
								 
						
							
								4ebf471c9b 
								
							 
						 
						
							
							
								
								Revert both r121082 (which broke a bunch of constant pool stuff) and r125074 (which worked around it).  This should get us back to the old, correct behavior, though it will make the integrated assembler unhappy for the time being.  
							
							... 
							
							
							
							llvm-svn: 125127 
							
						 
						
							2011-02-08 22:39:40 +00:00  
				
					
						
							
							
								 
						
							
								775eec2280 
								
							 
						 
						
							
							
								
								PR9030: Fix disassembly of ARM "mov pc, lr" instruction.  
							
							... 
							
							
							
							Patch by Jyun-Yan You.
llvm-svn: 124492 
							
						 
						
							2011-01-28 17:50:30 +00:00  
				
					
						
							
							
								 
						
							
								ec47597ecd 
								
							 
						 
						
							
							
								
								As far as I can tell, unified syntax uses c0-c15 instead of cr0-cr15 for mcr and friends.  
							
							... 
							
							
							
							llvm-svn: 123407 
							
						 
						
							2011-01-13 22:38:16 +00:00  
				
					
						
							
							
								 
						
							
								99ea8a3510 
								
							 
						 
						
							
							
								
								Second attempt at converting Thumb2's LDRpci, including updating the gazillion places that need to know about it.  
							
							... 
							
							
							
							llvm-svn: 121082 
							
						 
						
							2010-12-07 00:45:21 +00:00  
				
					
						
							
							
								 
						
							
								ca7eaaafda 
								
							 
						 
						
							
							
								
								When using the 'push' mnemonic for Thumb2 stmdb, be explicit when it's the  
							
							... 
							
							
							
							32-bit wide version by adding the .w suffix.
llvm-svn: 120838 
							
						 
						
							2010-12-03 20:33:01 +00:00  
				
					
						
							
							
								 
						
							
								943fb60b1f 
								
							 
						 
						
							
							
								
								Add correct encodings for STRD and LDRD, including fixup support.  Additionally, update these to unified syntax.  
							
							... 
							
							
							
							llvm-svn: 120589 
							
						 
						
							2010-12-01 19:18:46 +00:00  
				
					
						
							
							
								 
						
							
								2cd8b08207 
								
							 
						 
						
							
							
								
								Segregate tests by target.  
							
							... 
							
							
							
							llvm-svn: 119050 
							
						 
						
							2010-11-14 18:14:32 +00:00