1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

304 Commits

Author SHA1 Message Date
Jim Grosbach
86c318e475 ARM .code directive should always go to the streamer.
Even if there's no mode switch performed, the .code directive should still
be sent to the output streamer. Otherwise, for example, an output asm stream
is not equivalent to the input stream which generated it (a dependency on
the input target triple arm vs. thumb is introduced which was not originally
there).

llvm-svn: 139155
2011-09-06 18:46:23 +00:00
Jim Grosbach
44483a9ba5 Thumb2 parsing and encoding of B instruction.
Tweak handling of IT blocks a bit to enable this. The differentiation between
B and Bcc needs special sauce.

llvm-svn: 139049
2011-09-02 23:22:08 +00:00
Jim Grosbach
36ea6726dd ARM 'rscs' mnemonic is carry-setting 'rsc', not 'rs' with a 'cs' condition code.
llvm-svn: 138952
2011-09-01 18:22:13 +00:00
Owen Anderson
d8157fabfb t2Bcc is allowed to have a predicate without a preceding IT instruction.
llvm-svn: 138946
2011-09-01 17:47:45 +00:00
Jim Grosbach
2b04342a91 Thumb2 assembly parsing and encoding for ADD(immediate).
llvm-svn: 138922
2011-09-01 00:28:52 +00:00
Jim Grosbach
3dd66f0c98 Thumb2 t2Bcc should encode as t2B when condition is 'always'.
llvm-svn: 138898
2011-08-31 21:17:31 +00:00
Jim Grosbach
74f916342a Remove FIXME. Thumb2 MOV instruction will use separate custom tricks.
When we want encoding T3 (the wide encoding), we can explicitly check for
that and twiddle the CanAcceptCarrySet accordingly. For now, just correctly
handle encodings T1 and T2 when in Thumb2 mode.

llvm-svn: 138879
2011-08-31 18:39:39 +00:00
Jim Grosbach
4dddfb237c tBcc is OK to be predicated in Thumb2 outside of IT blocks (obviously).
llvm-svn: 138873
2011-08-31 18:29:05 +00:00
Jim Grosbach
a4c1e9d88a Tweak Thumb1 ADD encoding selection a bit.
When the destination register of an add immediate instruction is
explicitly specified, encoding T1 is preferred, else encoding T2 is
preferred.

llvm-svn: 138862
2011-08-31 17:07:33 +00:00
Jim Grosbach
a1aa6a2e8b Thumb2 parsing and encoding for IT blocks.
llvm-svn: 138773
2011-08-29 22:24:09 +00:00
Owen Anderson
e14d6edccc Improve handling of #-0 offsets for many more pre-indexed addressing modes.
llvm-svn: 138754
2011-08-29 19:36:44 +00:00
Owen Anderson
8719e2c1c3 Add support for parsing #-0 on non-memory-operand immediate values, and add a testcase that necessitates it.
llvm-svn: 138739
2011-08-29 17:17:09 +00:00
Jim Grosbach
fb526fdc70 ARM assembly parsing tweak for pldw.
llvm-svn: 138669
2011-08-26 22:21:51 +00:00
Jim Grosbach
6071776c8a Thumb2 assembler parsing and encoding of IT instruction.
This handles only the handling of the IT instruction itself, not the
processing and validation of the instructions in the IT block. That's next,
and will include encoding tests for IT itself.

llvm-svn: 138665
2011-08-26 21:43:41 +00:00
Owen Anderson
af51fd9868 invalid-LDR_PRE-arm.txt was already passing, but for the wrong reasons. We were failing to specify enough fixed bits of LDR_PRE/LDRB_PRE, resulting in decoding conflicts. Separate them into immediate vs. register versions, allowing us to specify the necessary fixed bits. This in turn results in the test being decoded properly, and being rejected as UNPREDICTABLE rather than a hard failure.
llvm-svn: 138653
2011-08-26 20:43:14 +00:00
Jim Grosbach
e8641a3bc7 Explicitly disallow predication in Thumb1 assembly.
llvm-svn: 138562
2011-08-25 17:23:55 +00:00
Jim Grosbach
7374e16344 Thumb .n mnemonic qualifiers can be ignored for now.
We'll need to pay attention to them when we start getting more serious about
the details of parsing thumb2 assembly.

llvm-svn: 138500
2011-08-24 22:19:48 +00:00
Jim Grosbach
effaf1e15d Thumb parsing and encoding for SUB (SP minu immediate).
Fix FiXME in test file. Remove FIXME for SUB (SP minus register) since that
form is Thumb2 only.

llvm-svn: 138494
2011-08-24 21:42:27 +00:00
Jim Grosbach
b2b155a93f Thumb parsing and encoding support for ADD SP instructions.
Fix the test FIXME and add parsing support for the ADD (SP plus immediate)
and ADD (SP plus register) instruction forms.

llvm-svn: 138488
2011-08-24 21:22:15 +00:00
Jim Grosbach
9ae0de4db3 Add missing explicit writeback operand to tSTMIA_UPD.
rdar://10014745

llvm-svn: 138457
2011-08-24 18:19:42 +00:00
Evan Cheng
420bf5446c Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.

llvm-svn: 138450
2011-08-24 18:08:43 +00:00
Evan Cheng
ed13551c1d Some refactoring so TargetRegistry.h no longer has to include any files
from MC.

llvm-svn: 138367
2011-08-23 20:15:21 +00:00
Jim Grosbach
3b20e779cd Thumb parsing and encoding for STM.
llvm-svn: 138345
2011-08-23 18:15:37 +00:00
Jim Grosbach
709c1644b0 Factor low reg checking into a helper function.
llvm-svn: 138344
2011-08-23 18:13:04 +00:00
Jim Grosbach
d299db0857 Thumb parsing and encoding for SBC.
llvm-svn: 138311
2011-08-22 23:55:58 +00:00
Jim Grosbach
5ae40d73a6 Thumb parsing and encoding for RSB.
llvm-svn: 138308
2011-08-22 23:47:13 +00:00
Jim Grosbach
54234257fa Improve error checking for tPUSH and tPOP register lists.
llvm-svn: 138295
2011-08-22 23:17:34 +00:00
Jim Grosbach
ec3958e68e Thumb assemmbly parsing diagnostic improvements for LDM.
llvm-svn: 138287
2011-08-22 23:01:07 +00:00
Jim Grosbach
303d34cede Tighten up ARM reglist validation a bit.
llvm-svn: 138258
2011-08-22 18:50:36 +00:00
Jim Grosbach
be94868d66 Thumb parsing and encoding support for NOP.
The irony is not lost that this is not a completely trivial patchset.

llvm-svn: 138143
2011-08-19 23:24:36 +00:00
Jim Grosbach
326e78be7a Thumb assembly parsing and encoding for NEG.
llvm-svn: 138131
2011-08-19 22:51:03 +00:00
Jim Grosbach
a97661cac4 Be more lenient on tied operand matching for MUL.
llvm-svn: 138124
2011-08-19 22:30:46 +00:00
Jim Grosbach
8e2d4a63dc Thumb assembly parsing and encoding for MUL.
llvm-svn: 138108
2011-08-19 22:07:46 +00:00
Jim Grosbach
cf35d78b16 Thumb assembly parsing and encoding for MOV.
llvm-svn: 138076
2011-08-19 20:46:54 +00:00
Jim Grosbach
7d707b4fb1 Thumb assembly parsing and encoding for LSL(immediate).
llvm-svn: 138063
2011-08-19 19:29:25 +00:00
Jim Grosbach
27001ee5fd Thumb assembly parsing and encoding for LDRH.
llvm-svn: 138060
2011-08-19 18:55:51 +00:00
Jim Grosbach
36fb75a109 Thumb assembly parsing and encoding for LDRB.
llvm-svn: 138059
2011-08-19 18:49:59 +00:00
Jim Grosbach
d429ab26cb Thumb assembly parsing and encoding for LDR(immediate) form T2.
llvm-svn: 138050
2011-08-19 18:13:48 +00:00
Jim Grosbach
ce30deef35 Use helper function to check for low registers.
llvm-svn: 138048
2011-08-19 17:57:22 +00:00
Jim Grosbach
35b968afdc Thumb assembly parsing and encoding for LDR(immediate) form T1.
llvm-svn: 138047
2011-08-19 17:55:24 +00:00
Jim Grosbach
7ecefeb594 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
Jim Grosbach
95db9c2dee Add missing 'break'.
llvm-svn: 137941
2011-08-18 16:08:39 +00:00
Jim Grosbach
b0e8cd2bfa Thumb assembly parsing and encoding for B.
llvm-svn: 137891
2011-08-17 22:57:40 +00:00
Jim Grosbach
1b761bd2d5 Thumb assembly parsing and encoding for ASR.
llvm-svn: 137889
2011-08-17 22:49:09 +00:00
Jim Grosbach
3efc45bfad ARM clean up the imm_sr operand class representation.
Represent the operand value as it will be encoded in the instruction. This
allows removing the specialized encoder and decoder methods entirely. Add
an assembler match class while we're at it to lay groundwork for parsing the
thumb shift instructions.

llvm-svn: 137879
2011-08-17 21:51:27 +00:00
Jim Grosbach
ae9f7f938f Thumb ADD(immediate) parsing support.
llvm-svn: 137788
2011-08-16 23:57:34 +00:00
Jim Grosbach
7a5c6948ca Thumb parsing diagnostics for low-reg requirements on ADD and MOV.
llvm-svn: 137779
2011-08-16 22:20:01 +00:00
Jim Grosbach
af9f949620 Add missing exit for 'case'.
llvm-svn: 137774
2011-08-16 21:42:31 +00:00
Jim Grosbach
850f937ecc Thumb assembly parsing and encoding for ADD(register) instruction.
llvm-svn: 137759
2011-08-16 21:34:08 +00:00
Jim Grosbach
3a2466aee5 Move some logic into a helper function and expand the commentary.
llvm-svn: 137756
2011-08-16 21:12:37 +00:00