Weiming Zhao
8f56f88661
Remove hard coded registers in ARM ldrexd and strexd instructions
...
This patch replaces the hard coded GPR pair [R0, R1] of
Intrinsic:arm_ldrexd and [R2, R3] of Intrinsic:arm_strexd with
even/odd GPRPair reg class.
Similar to the lowering of atomic_64 operation.
llvm-svn: 168207
2012-11-16 21:55:34 +00:00
Chad Rosier
f0e8720054
[ms-inline asm] Add support for creating AsmRewrites in the target specific
...
AsmParser logic. To be used/tested in a subsequent commit.
llvm-svn: 166714
2012-10-25 20:41:34 +00:00
Chad Rosier
4996355592
[ms-inline asm] Remove the MatchInstruction() function. Previously, this was
...
the interface between the front-end and the MC layer when parsing inline
assembly. Unfortunately, this is too deep into the parsing stack. Specifically,
we're unable to handle target-independent assembly (i.e., assembly directives,
labels, etc.). Note the MatchAndEmitInstruction() isn't the correct
abstraction either. I'll be exposing target-independent hooks shortly, so this
is really just a cleanup.
llvm-svn: 165858
2012-10-13 00:26:04 +00:00
Chad Rosier
2f480a8a50
[ms-inline asm] Use the new API introduced in r165830 in lieu of the
...
MapAndConstraints vector. Also remove the unused Kind argument.
llvm-svn: 165833
2012-10-12 22:53:36 +00:00
Craig Topper
a004b0d303
In parseMSRMaskOperand, add an explicit check for the operand being an identifier instead of just having an assert.
...
llvm-svn: 165480
2012-10-09 04:55:28 +00:00
Chad Rosier
8f06e7dea4
[ms-inline asm] Add a few typedefs to simplify future changes.
...
llvm-svn: 165324
2012-10-05 18:41:14 +00:00
Chad Rosier
f4e35dc672
[ms-inline asm] Add the convertToMapAndConstraints() function that is used to
...
map constraints and MCInst operands to inline asm operands. This replaces the
getMCInstOperandNum() function.
The logic to determine the constraints are not in place, so we still default to
a register constraint (i.e., "r"). Also, we no longer build the MCInst but
rather return just the opcode to get the MCInstrDesc.
llvm-svn: 164979
2012-10-01 23:45:51 +00:00
Sylvestre Ledru
91ce36c986
Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767
...
llvm-svn: 164768
2012-09-27 10:14:43 +00:00
Sylvestre Ledru
721cffd53a
Fix a typo 'iff' => 'if'
...
llvm-svn: 164767
2012-09-27 09:59:43 +00:00
Jim Grosbach
e974a6afaf
ARM: 'add Rd, pc, #imm' is an alias for 'adr Rd, #imm'.
...
rdar://9795790
llvm-svn: 164577
2012-09-25 00:08:13 +00:00
Chad Rosier
c4734c8950
Rather then have a wrapper function, have tblgen instantiate the implementation.
...
Also remove an unused argument.
llvm-svn: 164567
2012-09-24 22:57:55 +00:00
Chad Rosier
3cb355d11f
Rather then have a wrapper function, have tblgen instantiate the implementation.
...
llvm-svn: 164548
2012-09-24 19:32:29 +00:00
Tim Northover
0c97e76492
Fix the handling of edge cases in ARM shifted operands.
...
This patch fixes load/store instructions to handle less common cases
like "asr #32", "rrx" properly throughout the MC layer.
Patch by Chris Lidbury.
llvm-svn: 164455
2012-09-22 11:18:12 +00:00
Chad Rosier
17ede627f0
[ms-inline asm] Expose the mnemonicIsValid() function in the AsmParser.
...
llvm-svn: 164420
2012-09-21 22:21:26 +00:00
Chad Rosier
143d0f7371
Add comment.
...
llvm-svn: 164414
2012-09-21 20:51:43 +00:00
Jim Grosbach
9659ed9813
Tidy up. Formatting.
...
llvm-svn: 164343
2012-09-21 00:26:53 +00:00
Chad Rosier
4109983fbc
Rename the isMemory() function to isMem(). No functional change intended.
...
llvm-svn: 163654
2012-09-11 23:02:35 +00:00
Chad Rosier
a05ea0f3e3
Fix function name per coding standard.
...
llvm-svn: 163187
2012-09-05 01:15:43 +00:00
Chad Rosier
9e2aff8b6d
[ms-inline asm] Asm operands can map to one or more MCOperands. Therefore, add
...
the NumMCOperands argument to the GetMCInstOperandNum() function that is set
to the number of MCOperands this asm operand mapped to.
llvm-svn: 163124
2012-09-03 20:31:23 +00:00
Chad Rosier
391d299737
[ms-inline asm] Add an interface to the GetMCInstOperandNum() function in the
...
MCTargetAsmParser class.
llvm-svn: 163122
2012-09-03 18:47:45 +00:00
Chad Rosier
a353dba17d
Removed unused argument.
...
llvm-svn: 163104
2012-09-03 03:16:09 +00:00
Chad Rosier
e38bb6a34e
[ms-inline asm] Expose the Kind and Opcode variables from the
...
MatchInstructionImpl() function.
These values are used by the ConvertToMCInst() function to index into the
ConversionTable. The values are also needed to call the GetMCInstOperandNum()
function.
llvm-svn: 163101
2012-09-03 02:06:46 +00:00
Chad Rosier
451ef13cde
Remove an unused argument. The MCInst opcode is set in the ConvertToMCInst()
...
function nowadays.
llvm-svn: 163030
2012-08-31 22:12:31 +00:00
Chad Rosier
9d1fc3672b
Add a comment to explain what's really going on.
...
llvm-svn: 163005
2012-08-31 17:24:10 +00:00
Chad Rosier
a8f3c4fe35
The ConvertToMCInst() function can't fail, so remove the now dead Match_ConversionFail enum.
...
llvm-svn: 163002
2012-08-31 16:41:07 +00:00
Chad Rosier
98cfa1044f
With the fix in r162954/162955 every cvt function returns true. Thus, have
...
the ConvertToMCInst() return void, rather then a bool. Update all the cvt
functions as well.
llvm-svn: 162961
2012-08-31 00:03:31 +00:00
Chad Rosier
db482ef7a7
Fix for r162954. Return the Error.
...
llvm-svn: 162955
2012-08-30 23:22:05 +00:00
Chad Rosier
8513ffbb83
Move a check to the validateInstruction() function where it more properly belongs.
...
llvm-svn: 162954
2012-08-30 23:20:38 +00:00
Chad Rosier
5eec49fe09
Typo.
...
llvm-svn: 162952
2012-08-30 23:00:00 +00:00
Eric Christopher
6ac277ce91
Remove getARMRegisterNumbering and replace with calls into
...
the register info for getEncodingValue. This builds on the
small patch of yesterday to set HWEncoding in the register
file.
One (deprecated) use was turned into a hard number to avoid
needing register info in the old JIT.
llvm-svn: 161628
2012-08-09 22:10:21 +00:00
Jiangning Liu
6a43bf7d74
Fix #13035 , a bug around Thumb instruction LDRD/STRD with negative #0 offset index issue.
...
llvm-svn: 161162
2012-08-02 08:29:50 +00:00
Jiangning Liu
288e1af8c8
Fix #13138 , a bug around ARM instruction DSB encoding and decoding issue.
...
llvm-svn: 161161
2012-08-02 08:21:27 +00:00
Jiangning Liu
10dd40e42d
Fix #13241 , a bug around shift immediate operand for ARM instruction ADR.
...
llvm-svn: 161159
2012-08-02 08:13:13 +00:00
Richard Barton
984d0ba6b6
Some formatting to keep Clang happy
...
llvm-svn: 159948
2012-07-09 18:30:56 +00:00
Richard Barton
35aceb86fe
Prevent ARM assembler from losing a right shift by #32 applied to a register
...
llvm-svn: 159937
2012-07-09 16:31:14 +00:00
Richard Barton
d56603722e
Spelling!
...
llvm-svn: 159936
2012-07-09 16:14:28 +00:00
Richard Barton
a39625ecc6
Teach the assembler to use the narrow thumb encodings of various three-register dp instructions where permissable.
...
llvm-svn: 159935
2012-07-09 16:12:24 +00:00
Richard Barton
57b7d16e34
Teach assembler to handle capitalised operation values for DSB instructions
...
llvm-svn: 159259
2012-06-27 09:48:23 +00:00
Richard Barton
4b7558ef9a
Prevent ARM Assembler crashing on unrecognised assembly format for DSB instruction
...
llvm-svn: 159257
2012-06-27 09:36:19 +00:00
Jim Grosbach
087affe2f3
ARM: Add a better diagnostic for some out of range immediates.
...
As an example of how the custom DiagnosticType can be used to provide
better operand-mismatch diagnostics, add a custom diagnostic for
the imm0_15 operand class used for several system instructions.
Update the tests to expect the improved diagnostic.
rdar://8987109
llvm-svn: 159051
2012-06-22 23:56:48 +00:00
Kevin Enderby
6c7279ec2e
Fix the encoding of the armv7m (MClass) for MSR registers other than aspr,
...
iaspr, espr and xpsr which also needed to have 0b10 in their mask encoding bits.
llvm-svn: 158560
2012-06-15 22:14:44 +00:00
Richard Barton
b0ec375b96
Replace assertion failure for badly formatted CPS instrution with error message.
...
llvm-svn: 158445
2012-06-14 10:48:04 +00:00
Benjamin Kramer
bde9176663
Fix typos found by http://github.com/lyda/misspell-check
...
llvm-svn: 157885
2012-06-02 10:20:22 +00:00
Craig Topper
42b96d1b74
Mark a static array as const.
...
llvm-svn: 157368
2012-05-24 04:11:15 +00:00
Kevin Enderby
f1b225d0e0
Fix the encoding of the armv7m (MClass) for MSR APSR writes which was missing
...
the 0b10 mask encoding bits. Make MSR APSR writes without a _<bits> qualifier
an alias for MSR APSR_nzcvq even though ARM as deprecated it use. Also add
support for suffixes (_nzcvq, _g, _nzcvqg) for APSR versions. Some FIXMEs in
the code for better error checking when versions shouldn't be used.
rdar://11457025
llvm-svn: 157019
2012-05-17 22:18:01 +00:00
Silviu Baranga
5a719f9b9a
Fixed the LLVM ARM v7 assembler and instruction printer for 8-bit immediate offset addressing. The assembler and instruction printer were not properly handeling the #-0 immediate.
...
llvm-svn: 156608
2012-05-11 09:10:54 +00:00
Jim Grosbach
c6f32b3295
ARM: Thumb add(sp plus register) asm constraints.
...
Make sure when parsing the Thumb1 sp+register ADD instruction that
the source and destination operands match. In thumb2, just use the
wide encoding if they don't. In Thumb1, issue a diagnostic.
rdar://11219154
llvm-svn: 155748
2012-04-27 23:51:36 +00:00
Richard Barton
82f95ea2ad
Fix ARM assembly parsing for upper case condition codes on IT instructions.
...
llvm-svn: 155720
2012-04-27 17:34:01 +00:00
Richard Barton
f435b09eaf
Refactor IT handling not to store the bottom bit of the condition code in the mask operand in the MCInst.
...
llvm-svn: 155700
2012-04-27 08:42:59 +00:00
Richard Barton
ba5b0cc82e
Unify internal representation of ARM instructions with a register right-shifted by #32 . These are stored as shifts by #0 in the MCInst and correctly marshalled when transforming from or to assembly representation.
...
llvm-svn: 155565
2012-04-25 18:00:18 +00:00
Craig Topper
3ec7c2aa84
Add ifdef around getSubtargetFeatureName in tablegen output file so that only targets that want the function get it. This prevents other targets from getting an unused function warning.
...
llvm-svn: 155538
2012-04-25 06:56:34 +00:00
Jim Grosbach
5117ef7453
ARM: improved assembler diagnostics for missing CPU features.
...
When an instruction match is found, but the subtarget features it
requires are not available (missing floating point unit, or thumb vs arm
mode, for example), issue a diagnostic that identifies what the feature
mismatch is.
rdar://11257547
llvm-svn: 155499
2012-04-24 22:40:08 +00:00
Jim Grosbach
003607f474
ARM handle :lower16: and :upper16: after a '#' prefix.
...
rdar://11252521
llvm-svn: 154862
2012-04-16 21:18:46 +00:00
Benjamin Kramer
673824b4a1
Wire up support for diagnostic ranges in the ARMAsmParser.
...
As an example, attach range info to the "invalid instruction" message:
$ clang -arch arm -c asm.c
asm.c:2:11: error: invalid instruction
__asm__("foo r0");
^
<inline asm>:1:2: note: instantiated into assembly here
foo r0
^~~
llvm-svn: 154765
2012-04-15 17:04:27 +00:00
Jim Grosbach
ad66de155b
ARM add missing Thumb1 two-operand aliases for shift-by-immediate.
...
rdar://11222742
llvm-svn: 154457
2012-04-11 00:15:16 +00:00
Evan Cheng
aca6c822e6
Fix a number of problems with ARM fused multiply add/subtract instructions.
...
1. The new instruction itinerary entries are not properly described.
2. The asm parser can't handle vfms and vfnms.
3. There were no assembler, disassembler test cases.
4. HasNEON2 has the wrong assembler predicate.
rdar://10139676
llvm-svn: 154456
2012-04-11 00:13:00 +00:00
Jim Grosbach
df5a244797
ARM fix cc_out operand handling for t2SUBrr instructions.
...
We were incorrectly conflating some add variants which don't have a
cc_out operand with the mirroring sub encodings, which do. Part of the
awesome non-orthogonality legacy of thumb1. Similarly, handling of
add/sub of an immediate was sometimes incorrectly removing the cc_out
operand for add/sub register variants.
rdar://11216577
llvm-svn: 154411
2012-04-10 17:31:55 +00:00
Jim Grosbach
930f2f66e7
ARM assembly aliases for add negative immediates using sub.
...
'add r2, #-1024' should just use 'sub r2, #1024' rather than erroring out.
Thumb1 aliases for adding a negative immediate to the stack pointer,
also.
rdar://11192734
llvm-svn: 154123
2012-04-05 20:57:13 +00:00
Jim Grosbach
3d00eecc53
ARM assembly parsing for 'msr' plain 'cpsr' operand.
...
Plain 'cpsr' is an alias for 'cpsr_fc'.
rdar://11153753
llvm-svn: 154080
2012-04-05 03:17:53 +00:00
Jim Grosbach
fdaab531b7
ARM assembler should prefer non-aliases encoding of cmp.
...
When an immediate is both a value [t2_]so_imm and a [t2_]so_imm_neg,
we want to use the non-negated form to make sure we prefer the normal
encoding, not the aliased encoding via the negation of, e.g., 'cmp.w'.
llvm-svn: 153770
2012-03-30 19:59:02 +00:00
Jim Grosbach
74005ae691
ARM can only use narrow encoding for low regs.
...
llvm-svn: 153765
2012-03-30 18:39:43 +00:00
Jim Grosbach
def5e34812
ARM integrated assembler should encoding choice for add/sub imm.
...
For 'adds r2, r2, #56' outside of an IT block, the 16-bit encoding T2
can be used for this syntax. Prefer the narrow encoding when possible.
rdar://11156277
llvm-svn: 153759
2012-03-30 17:20:40 +00:00
Jim Grosbach
199ab90946
ARM assembly parsing needs to be paranoid about negative immediates.
...
Make sure to treat immediates as unsigned when doing relative comparisons.
rdar://11153621
llvm-svn: 153753
2012-03-30 16:31:31 +00:00
Jim Grosbach
0b0298302c
ARM assembly 'cmp lr, #0' should not encode using 'cmn'.
...
The CMP->CMN alias was matching for an immediate of zero when it
should only match for negative values.
rdar://11129224
llvm-svn: 153689
2012-03-29 21:19:52 +00:00
Craig Topper
1fcf5bcae1
Prune some includes
...
llvm-svn: 153502
2012-03-27 07:54:11 +00:00
Kevin Enderby
816ca27ef6
Fix assembling ARM vst2 instructions with double-spaced registers.
...
llvm-svn: 153099
2012-03-20 17:41:51 +00:00
Jim Grosbach
67e76babd3
ARM assembly, accept optional '#' on lane index number.
...
rdar://11057160
llvm-svn: 153053
2012-03-19 20:39:53 +00:00
Jim Grosbach
905686a82a
ARM ldm/stm register lists can be out of order.
...
It's not a good style idea, as the registers will be laid down in memory in
numerical order, not the order they're in the list, but it's legal. vldm/vstm
are stricter.
rdar://11064740
llvm-svn: 152943
2012-03-16 20:48:38 +00:00
Jim Grosbach
6d9766b355
Remove inadvertant commit.
...
llvm-svn: 152870
2012-03-15 23:00:30 +00:00
Jim Grosbach
d28888dd77
ARM case-insensitive checking for APSR_nzcv.
...
rdar://11056591
llvm-svn: 152846
2012-03-15 21:34:14 +00:00
Jim Grosbach
d74560b170
ARM aliases for pre-unified syntax fcmpz[sd] mnemonics.
...
rdar://11056647
llvm-svn: 152834
2012-03-15 20:48:18 +00:00
Jim Grosbach
ed428bc1ce
ARM more NEON VLD/VST composite physical register refactoring.
...
Register pair, all lanes subscripting.
llvm-svn: 152157
2012-03-06 23:10:38 +00:00
Jim Grosbach
13a292cc74
ARM refactor more NEON VLD/VST instructions to use composite physregs
...
Register pair VLD1/VLD2 all-lanes instructions. Kill off more of the
pseudos as a result.
llvm-svn: 152150
2012-03-06 22:01:44 +00:00
Jim Grosbach
e5307f9019
ARM Refactor VLD/VST spaced pair instructions.
...
Use the new composite physical registers.
llvm-svn: 152063
2012-03-05 21:43:40 +00:00
Jim Grosbach
c71bf4739a
ARM Remove a bit of dead code.
...
llvm-svn: 152061
2012-03-05 21:09:58 +00:00
Jim Grosbach
c988e0c521
ARM refactor away a bunch of VLD/VST pseudo instructions.
...
With the new composite physical registers to represent arbitrary pairs
of DPR registers, we don't need the pseudo-registers anymore. Get rid of
a bunch of them that use DPR register pairs and just use the real
instructions directly instead.
llvm-svn: 152045
2012-03-05 19:33:30 +00:00
Craig Topper
e55c556a24
Convert assert(0) to llvm_unreachable
...
llvm-svn: 149961
2012-02-07 02:50:20 +00:00
Jim Grosbach
a2147ce313
Tidy up. One more return type mismatch fix.
...
llvm-svn: 149452
2012-01-31 23:51:09 +00:00
Jim Grosbach
5e5eabb5ab
Keep source information, if available, around for ARM Fixups.
...
Adjust an example MachObjectWriter diagnostic to use the information
to issue a better message.
Before:
LLVM ERROR: unknown ARM fixup kind!
After:
x.s:6:5: error: unsupported relocation on symbol
beq bar
^
rdar://9800182
llvm-svn: 149093
2012-01-26 23:20:15 +00:00
Jim Grosbach
c8f2b7877b
Tidy up. Fix mismatched return types for error handling.
...
llvm-svn: 149062
2012-01-26 15:56:45 +00:00
Jim Grosbach
82f76d1275
ARM assemly parsing and validation of IT instruction.
...
"Although a Thumb2 instruction, the IT mnemonic shall be permitted in
ARM mode, and the condition verified to match the condition code(s)
on the following instruction(s)."
PR11853
llvm-svn: 148969
2012-01-25 19:52:01 +00:00
Jim Grosbach
086cbfac7d
NEON VLD4(all lanes) assembly parsing and encoding.
...
llvm-svn: 148884
2012-01-25 00:01:08 +00:00
Jim Grosbach
b78403ce48
NEON VLD3(all lanes) assembly parsing and encoding.
...
llvm-svn: 148882
2012-01-24 23:47:04 +00:00
Jim Grosbach
8e2722cdb0
NEON VST4(one lane) assembly parsing and encoding.
...
llvm-svn: 148836
2012-01-24 18:53:13 +00:00
Jim Grosbach
14952a0e32
NEON VLD4(one lane) assembly parsing and encoding.
...
llvm-svn: 148832
2012-01-24 18:37:25 +00:00
Jim Grosbach
da70eac268
NEON VST4(multiple 4 element structures) assembly parsing.
...
llvm-svn: 148764
2012-01-24 00:58:13 +00:00
Jim Grosbach
ed561fc850
NEON VLD4(multiple 4 element structures) assembly parsing.
...
llvm-svn: 148762
2012-01-24 00:43:17 +00:00
Jim Grosbach
1e946a4f91
Tidy up. Remove some vertical space for readability.
...
llvm-svn: 148761
2012-01-24 00:43:12 +00:00
Jim Grosbach
d3d36d9315
NEON VST3(single element from one lane) assembly parsing.
...
llvm-svn: 148755
2012-01-24 00:07:41 +00:00
Jim Grosbach
1a74724fc9
NEON VST3(multiple 3-element structures) assembly parsing.
...
llvm-svn: 148748
2012-01-23 23:45:44 +00:00
Jim Grosbach
ac2af3ffab
NEON VLD3(multiple 3-element structures) assembly parsing.
...
llvm-svn: 148745
2012-01-23 23:20:46 +00:00
Jim Grosbach
a8b444b08b
NEON VLD3 lane-indexed assembly parsing and encoding.
...
llvm-svn: 148734
2012-01-23 21:53:26 +00:00
Jim Grosbach
d28ef9ac46
Simplify some NEON assembly pseudo definitions.
...
Let the generic token alias definitions handle the data subtype
suffices. We don't need explicit versions for each.
llvm-svn: 148718
2012-01-23 19:39:08 +00:00
Jim Grosbach
78dcaed8ca
Thumb2 'add rd, pc, imm' alternate form for 'adr' instruction.
...
llvm-svn: 148601
2012-01-21 00:07:56 +00:00
David Blaikie
46a9f016c5
More dead code removal (using -Wunreachable-code)
...
llvm-svn: 148578
2012-01-20 21:51:11 +00:00
Jim Grosbach
a9d36fbca7
NEON use vmov.i32 to splat some f32 values into vectors.
...
For bit patterns that aren't representable using the 8-bit floating point
representation for vmov.f32, but are representable via vmov.i32, treat
the .f32 syntax as an alias. Most importantly, this covers the case
'vmov.f32 Vd, #0.0'.
rdar://10616677
llvm-svn: 148556
2012-01-20 18:09:51 +00:00
Jim Grosbach
235c8d2d94
ARM assembly diagnostic caret in better position for FPImm.
...
llvm-svn: 148459
2012-01-19 02:47:30 +00:00
Jim Grosbach
94298a906a
Thumb2 alternate syntax for LDR(literal) and friends.
...
Explicit pc-relative syntax. For example, "ldrb r2, [pc, #-22]".
rdar://10250964
llvm-svn: 148432
2012-01-18 22:46:46 +00:00
David Blaikie
486df738c3
Removing unused default switch cases in switches over enums that already account for all enumeration values explicitly.
...
(This time I believe I've checked all the -Wreturn-type warnings from GCC & added the couple of llvm_unreachables necessary to silence them. If I've missed any, I'll happily fix them as soon as I know about them)
llvm-svn: 148262
2012-01-16 23:24:27 +00:00
Matt Beaumont-Gay
b982d8eb65
Fix malformed assert.
...
If anybody has strong feelings about 'default: assert(0 && "blah")' vs
'default: llvm_unreachable("blah")', feel free to regularize the instances of
each in this file.
llvm-svn: 147459
2012-01-03 19:03:59 +00:00
Jim Grosbach
ea2319112f
ARM VFP assembly parsing and encoding for VCVT(float <--> fixed point).
...
rdar://10558523
llvm-svn: 147189
2011-12-22 22:19:05 +00:00
Jim Grosbach
c4d8d2f155
Tidy up. Use predicate function a bit more liberally.
...
llvm-svn: 147184
2011-12-22 22:02:35 +00:00
Jim Grosbach
489ed5929e
ARM pre-UAL aliases. fcmp[sd].
...
llvm-svn: 147158
2011-12-22 19:20:45 +00:00
Jim Grosbach
12ccf45bbb
ARM assembler should accept shift-by-zero for any shifted-immediate operand.
...
Just treat it as-if the shift wasn't there at all. 'as' compatibility.
rdar://10604767
llvm-svn: 147153
2011-12-22 18:04:04 +00:00
Jim Grosbach
21488b8839
ARM assembly parser canonicallize on 'lsl' for shift-by-zero form.
...
llvm-svn: 147152
2011-12-22 17:37:00 +00:00
Jim Grosbach
3794d82af5
Tidy up. Trailing whitespace.
...
llvm-svn: 147151
2011-12-22 17:17:10 +00:00
Jim Grosbach
62bffd8827
Nuke invalid comment from copy/paste.
...
llvm-svn: 147150
2011-12-22 17:04:50 +00:00
Jim Grosbach
1152cc0cad
ARM asm parser should be more lenient w/ .thumb_func directive.
...
Rather than require the symbol to be explicitly an argument of the directive,
allow it to look ahead and grab the symbol from the next non-whitespace
line.
rdar://10611140
llvm-svn: 147100
2011-12-21 22:30:16 +00:00
Jim Grosbach
8c59bbc1ed
Thumb2 assembly parsing of 'mov rd, rn, rrx'.
...
Maps to the RRX instruction. Missed this case earlier.
rdar://10615373
llvm-svn: 147096
2011-12-21 21:04:19 +00:00
Jim Grosbach
b3ef713e44
Thumb2 assembly parsing of 'mov(register shifted register)' aliases.
...
These map to the ASR, LSR, LSL, ROR instruction definitions.
rdar://10615373
llvm-svn: 147094
2011-12-21 20:54:00 +00:00
Jim Grosbach
7de7ab83fa
ARM assembly parsing allows constant expressions for lane indices.
...
llvm-svn: 147028
2011-12-21 01:19:23 +00:00
Jim Grosbach
c5af54ec89
ARM NEON VLD2 assembly parsing for structure to all lanes, non-writeback.
...
llvm-svn: 147025
2011-12-21 00:38:54 +00:00
Jim Grosbach
cd22e4a81e
ARM .req register name aliases are case insensitive, just like regnames.
...
llvm-svn: 147009
2011-12-20 23:11:00 +00:00
Jim Grosbach
4eda145c7f
Move comment to appropriate place.
...
llvm-svn: 147000
2011-12-20 22:26:38 +00:00
Jim Grosbach
2c59052984
ARM assembly parsing and encoding for VST2 single-element, double spaced.
...
llvm-svn: 146990
2011-12-20 20:46:29 +00:00
Jim Grosbach
75e2ab5db2
ARM assembly parsing and encoding for VLD2 single-element, double spaced.
...
llvm-svn: 146983
2011-12-20 19:21:26 +00:00
Jason W Kim
135d244b56
First steps in ARM AsmParser support for .eabi_attribute and .arch
...
(Both used for Linux gnueabi)
No behavioral change yet (no tests need so far)
llvm-svn: 146977
2011-12-20 17:38:12 +00:00
Jim Grosbach
e2ca9e5b5f
ARM assembly shifts by zero should be plain 'mov' instructions.
...
"mov r1, r2, lsl #0" should assemble as "mov r1, r2" even though it's
not strictly legal UAL syntax. It's a common extension and the friendly
thing to do.
rdar://10604663
llvm-svn: 146937
2011-12-20 00:59:38 +00:00
Jim Grosbach
045b6c71a6
ARM NEON assembly aliases for VMOV<-->VMVN for i32 immediates.
...
e.g., "vmov.i32 d4, #-118" can be assembled as "vmvn.i32 d4, #117"
rdar://10603913
llvm-svn: 146925
2011-12-19 23:51:07 +00:00
Jim Grosbach
8648c10184
ARM assembly parsing and encoding support for LDRD(label).
...
rdar://9932658
llvm-svn: 146921
2011-12-19 23:06:24 +00:00
Jim Grosbach
e16acacc3a
ARM VFP pre-UAL mnemonic aliases for fmul[sd].
...
llvm-svn: 146892
2011-12-19 19:43:50 +00:00
Jim Grosbach
92a939ae73
ARM VFP pre-UAL mnemonic aliases for fcpy[sd] and fdiv[sd].
...
llvm-svn: 146887
2011-12-19 19:02:41 +00:00
Jim Grosbach
cef98cddbe
ARM NEON relax parse time diagnostics for alignment specifiers.
...
There's more variation that we need to handle. Error checking will need
to be on operand predicates.
llvm-svn: 146884
2011-12-19 18:31:43 +00:00
Jim Grosbach
c2f16a3499
Silence warning.
...
llvm-svn: 146686
2011-12-15 21:54:55 +00:00
Jim Grosbach
2f50e92f40
ARM NEON two-register double spaced register list parsing support.
...
llvm-svn: 146685
2011-12-15 21:44:33 +00:00
Jim Grosbach
da51104282
ARM NEON better assembly operand range checking for lane indices of VLD/VST.
...
llvm-svn: 146608
2011-12-14 23:35:06 +00:00
Jim Grosbach
a8aa30b620
ARM NEON VLD2/VST2 lane indexed assembly parsing and encoding.
...
llvm-svn: 146605
2011-12-14 23:25:46 +00:00
Jim Grosbach
ab5830e51b
ARM assembler support for the target-specific .req directive.
...
rdar://10549683
llvm-svn: 146543
2011-12-14 02:16:11 +00:00
Jim Grosbach
485e5622f4
Thumb2 assembler aliases for "mov(shifted register)"
...
rdar://10549767
llvm-svn: 146520
2011-12-13 22:45:11 +00:00
Jim Grosbach
18bf363078
ARM LDM/STM system instruction variants.
...
rdar://10550269
llvm-svn: 146519
2011-12-13 21:48:29 +00:00
Jim Grosbach
5ac89675a0
Thumb2 tweak for ccout handling in RSB parsing.
...
llvm-svn: 146516
2011-12-13 21:06:41 +00:00
Jim Grosbach
1f1a3598c2
ARM thumb2 parsing of "rsb rd, rn, #0".
...
rdar://10549741
llvm-svn: 146515
2011-12-13 20:50:38 +00:00
Jim Grosbach
2a2348e6c2
ARM add some more pre-UAL VFP mnemonics for convenience when porting old code.
...
llvm-svn: 146508
2011-12-13 20:13:48 +00:00
Daniel Dunbar
27a7489a03
LLVMBuild: Remove trailing newline, which irked me.
...
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Jim Grosbach
54337b8617
ARM add some more pre-UAL VFP mnemonics for convenience when porting old code.
...
llvm-svn: 146300
2011-12-10 00:01:02 +00:00
Jim Grosbach
8be2f6577e
ARM add some pre-UAL VFP mnemonics for convenience when porting old code.
...
llvm-svn: 146296
2011-12-09 23:34:09 +00:00
Jim Grosbach
ef70e9b704
ARM allows '' syntax, not just '#imm' for assembly.
...
Backwards compatibility with 'gas'. #imm is the preferered and documented
syntax, but lots of existing code uses the '$' prefix, so we should
support it if we can.
llvm-svn: 146285
2011-12-09 22:25:03 +00:00
Jim Grosbach
8cc83fa1b7
ARM convenience aliases for VSQRT.
...
llvm-svn: 146201
2011-12-08 22:51:25 +00:00
Jim Grosbach
ba7d6ed05d
ARM VSHR implied destination operand form aliases.
...
llvm-svn: 146192
2011-12-08 22:06:06 +00:00
Jim Grosbach
98bc797b4d
ARM asm parser, just issue a warning for a duplicate reg in a list.
...
For better 'gas' compatibility.
llvm-svn: 146185
2011-12-08 21:34:20 +00:00
Jim Grosbach
4edc7360c7
ARM assembler support for register name aliases.
...
rdar://10550084
llvm-svn: 146170
2011-12-08 19:27:38 +00:00
Jim Grosbach
00326406d4
ARM NEON two-operand aliases for VSHL(immediate).
...
llvm-svn: 146125
2011-12-08 01:30:04 +00:00
Jim Grosbach
9a6ba3c94e
ARM VFP support 'fmrs/fmsr' aliases for 'vldr'
...
llvm-svn: 146116
2011-12-08 00:52:55 +00:00
Jim Grosbach
086d013e56
ARM VFP support 'flds/fldd' aliases for 'vldr'
...
llvm-svn: 146115
2011-12-08 00:49:29 +00:00
Jim Grosbach
3050625a50
ARM assembler aliases for "add Rd, #-imm" to "sub Rd, #imm".
...
llvm-svn: 146111
2011-12-08 00:31:07 +00:00
Jim Grosbach
3b559ff3c5
ARM assembly, allow 'asl' as a synonym for 'lsl' in shifted-register operands.
...
For 'gas' compatibility.
llvm-svn: 146106
2011-12-07 23:40:58 +00:00
Jim Grosbach
7f882399b8
ARM support the .arm and .thumb directives for assembly mode switching.
...
llvm-svn: 146042
2011-12-07 18:04:19 +00:00
Jim Grosbach
d4b8249434
ARM: NEON SHLL instruction immediate operand range checking.
...
llvm-svn: 146003
2011-12-07 01:07:24 +00:00
Jim Grosbach
175c7d0da5
Thumb2 encoding choice correction for PLD.
...
Using encoding T1 for offset of #0 and encoding T2 for #-0.
rdar://10532413
llvm-svn: 145919
2011-12-06 04:49:29 +00:00
Jim Grosbach
b8c719ccc6
Tweak ADDrr fix. Bad check for explicit .w
...
llvm-svn: 145863
2011-12-05 22:27:04 +00:00
Jim Grosbach
e489babf9b
Thumb2 prefer ADD register encoding T2 to T3 when possible.
...
rdar://10529664
llvm-svn: 145860
2011-12-05 22:16:39 +00:00
Jim Grosbach
ec9ba98299
Thumb2 prefer encoding T3 to T4 for ADD/SUB immediate instructions.
...
rdar://10529348
llvm-svn: 145851
2011-12-05 21:06:26 +00:00
Jim Grosbach
9dff9f4c41
ARM NEON VEXT aliases for data type suffices.
...
llvm-svn: 145726
2011-12-02 23:34:39 +00:00
Jim Grosbach
eb53822f5a
ARM VST1 single lane assembly parsing.
...
llvm-svn: 145718
2011-12-02 22:34:51 +00:00
Jim Grosbach
dda976b804
ARM VLD1 single lane assembly parsing.
...
llvm-svn: 145712
2011-12-02 22:01:52 +00:00
Jim Grosbach
e7dcbc8691
Clean up aliases for ARM VLD1 single-lane assembly parsing a bit.
...
Add the 16-bit lane variants while I'm at it.
llvm-svn: 145693
2011-12-02 18:52:30 +00:00
Jim Grosbach
04945c42c6
ARM start parsing VLD1 single lane instructions.
...
The alias pseudos need cleaned up for size suffix handling, but this gets
the basics working. Will be cleaning up and adding more.
llvm-svn: 145655
2011-12-02 00:35:16 +00:00
Jim Grosbach
3ecf976ca9
ARM parsing for VLD1 two register all lanes, no writeback.
...
llvm-svn: 145504
2011-11-30 18:21:25 +00:00
Jim Grosbach
cd6f5e757c
ARM parsing aliases for VLD1 single register all lanes.
...
llvm-svn: 145464
2011-11-30 01:09:44 +00:00
Jim Grosbach
182b6a077e
Tidy up a bit.
...
llvm-svn: 145458
2011-11-29 23:51:09 +00:00
Daniel Dunbar
539d0a8a09
build/CMake: Finish removal of add_llvm_library_dependencies.
...
llvm-svn: 145420
2011-11-29 19:25:30 +00:00
Jim Grosbach
01e0439240
Clean up debug printing of ARM shifted operands.
...
llvm-svn: 144836
2011-11-16 21:46:50 +00:00
Jim Grosbach
1a2f9ee3c8
ARM assembly parsing for RRX mnemonic.
...
rdar://9704684
llvm-svn: 144812
2011-11-16 19:05:59 +00:00
Jim Grosbach
abcac56869
ARM mode aliases for bitwise instructions w/ register operands.
...
rdar://9704684
llvm-svn: 144803
2011-11-16 18:31:45 +00:00
Jim Grosbach
e891fe8d6c
ARM assembly parsing for register range syntax for VLD/VST register lists.
...
For example,
vld1.f64 {d2-d5}, [r2,:128]!
Should be equivalent to:
vld1.f64 {d2,d3,d4,d5}, [r2,:128]!
It's not documented syntax in the ARM ARM, but it is consistent with what's
accepted for VLDM/VSTM and is unambiguous in meaning, so it's a good thing to
support.
rdar://10451128
llvm-svn: 144727
2011-11-15 23:19:15 +00:00
Jim Grosbach
8279c1828f
ARM accept an immediate offset in memory operands w/o the '#'.
...
llvm-svn: 144709
2011-11-15 22:14:41 +00:00
Jim Grosbach
8d579230c6
ARM enclosing curly braces optional on one-register VLD/VST instruction lists.
...
'vld1.f32 d4, [r7]' should be parsed as equivalent to 'vld1.f32 {d4}, [r7]'
rdar://10450488.
llvm-svn: 144701
2011-11-15 21:45:55 +00:00
Jim Grosbach
a92a5d8548
Fix typo.
...
llvm-svn: 144695
2011-11-15 21:01:30 +00:00
Jim Grosbach
efa7e95d06
Thumb2 two-operand 'mul' instruction wide encoding parsing.
...
rdar://10449724
llvm-svn: 144684
2011-11-15 19:55:16 +00:00
Jim Grosbach
6efa7b9852
Thumb2 assembly parsing for mul.w in IT block fix.
...
When the 3rd operand is not a low-register, and the first two operands are
the same low register, the parser was incorrectly trying to use the 16-bit
instruction encoding.
rdar://10449281
llvm-svn: 144679
2011-11-15 19:29:45 +00:00
Jim Grosbach
ee201faeac
Tidy up. 80 column.
...
llvm-svn: 144538
2011-11-14 17:52:47 +00:00
Jim Grosbach
3a3d8e82bc
ARM refactor simple immediate asm operand render methods.
...
These immediate operands all use the same simple logic for rendering to
MCInst, so have them share the method for doing so.
llvm-svn: 144439
2011-11-12 00:58:43 +00:00
Jim Grosbach
12952fef71
ARM vldm and vstm VFP instructions can take a data type suffix.
...
It's ignored by the assembler when present, but is legal syntax. Other
instructions have something similar, but for some mnemonics it's
only sometimes not significant, so this quick check in the parser will
need refactored into something more robust soon-ish. This gets some
basics working in the meantime.
Partial for rdar://10435264
llvm-svn: 144422
2011-11-11 23:08:10 +00:00
Jim Grosbach
b68eeb3852
Nuke no longer accurate comment.
...
llvm-svn: 144411
2011-11-11 22:30:06 +00:00
Jim Grosbach
85a2343b01
ARM allow Q registers in vldm/vstm register lists.
...
rdar://9672822
llvm-svn: 144407
2011-11-11 21:27:40 +00:00
Jim Grosbach
d9a9be269c
Thumb2 ldm/stm updating w/ one register in the list are LDR/STR.
...
rdar://10429490
llvm-svn: 144338
2011-11-10 23:58:34 +00:00
Jim Grosbach
afad053141
ARM let processInstruction() tranforms chain.
...
llvm-svn: 144337
2011-11-10 23:42:14 +00:00
Jim Grosbach
9bded9dc24
Thumb2 parsing for push/pop w/ hi registers in the reglist.
...
rdar://10130228.
llvm-svn: 144331
2011-11-10 23:17:11 +00:00
Jim Grosbach
a113eb0205
Thumb1 diagnostics for reglist on PUSH/POP fix.
...
Was not checking the first register in the register list.
llvm-svn: 144329
2011-11-10 23:01:27 +00:00
Jim Grosbach
5a5ce63742
Thumb MUL assembly parsing for 3-operand form.
...
Get the source register that isn't tied to the destination register correct,
even when the assembly source operand order is backwards.
rdar://10428630
llvm-svn: 144322
2011-11-10 22:10:12 +00:00
Jim Grosbach
42ba6286b6
ARM .thumb_func directive for quoted symbol names.
...
Use the getIdentifier() method of the token, not getString(), otherwise
we keep the quotes as part of the symbol name, which we don't want.
rdar://10428015
llvm-svn: 144315
2011-11-10 20:48:53 +00:00
Jim Grosbach
c14871cc67
ARM assembly parsing for LSR/LSL/ROR(immediate).
...
More of rdar://9704684
llvm-svn: 144301
2011-11-10 19:18:01 +00:00
Jim Grosbach
61db5a59f7
ARM assembly parsing for ASR(immediate).
...
Start of rdar://9704684
llvm-svn: 144293
2011-11-10 16:44:55 +00:00
Benjamin Kramer
20baffb257
Replace (Lower|Upper)caseString in favor of StringRef's newest methods.
...
llvm-svn: 143891
2011-11-06 20:37:06 +00:00
Daniel Dunbar
bf9bba47a1
build: Add initial cut at LLVMBuild.txt files.
...
llvm-svn: 143634
2011-11-03 18:53:17 +00:00
Jim Grosbach
5c6b6346bc
ARM label operands can be quoted.
...
For example, labels from Objective-C sources.
llvm-svn: 143511
2011-11-01 22:38:31 +00:00
Jim Grosbach
7f1f3bd868
ARM label operands can have an optional '#' before them.
...
llvm-svn: 143510
2011-11-01 22:37:37 +00:00
Jim Grosbach
fb2f1d61f4
ARM VLD/VST assembly parsing for symbolic address operands.
...
llvm-svn: 143413
2011-11-01 01:24:45 +00:00
Jim Grosbach
05df460269
ARM VST1 w/ writeback assembly parsing and encoding.
...
llvm-svn: 143369
2011-10-31 21:50:31 +00:00
Jim Grosbach
3d785edee2
ARM mode 'mov' to 'mvn' assembler alias.
...
llvm-svn: 143237
2011-10-28 22:50:54 +00:00
Jim Grosbach
b009a872d7
Add Thumb2 alias for "mov Rd, #imm" to "mvn Rd, #~imm".
...
When '~imm' is encodable as a t2_so_imm but plain 'imm' is not. For example,
mov r2, #-3
becomes
mvn r2, #2
rdar://10349224
llvm-svn: 143235
2011-10-28 22:36:30 +00:00
Jim Grosbach
080a499ee0
ARM Allow 'q' registers in VLD/VST vector lists.
...
Just treat it as if the constituent D registers where specified.
rdar://10348896
llvm-svn: 143167
2011-10-28 00:06:50 +00:00
Jim Grosbach
61fdba048f
Thumb2 ldr pc-relative encoding fixes.
...
We were parsing label references to the i12 encoding, which isn't right.
They need to go to the pci variant instead.
More of rdar://10348687
llvm-svn: 143068
2011-10-26 22:22:01 +00:00
Jim Grosbach
4e380354a9
ARM parse parenthesized expressions for label references.
...
Partial fix for rdar://10348687.
llvm-svn: 143063
2011-10-26 21:14:08 +00:00
Jim Grosbach
3ea0657d54
ARM assembly parsing and encoding for VLD1 w/ writeback.
...
One and two length register list variants.
llvm-svn: 142861
2011-10-24 22:16:58 +00:00
Benjamin Kramer
0d6d098841
Move various generated tables into read-only memory, fixing up const correctness along the way.
...
llvm-svn: 142726
2011-10-22 16:50:00 +00:00
Jim Grosbach
118b38cbf1
Assembly parsing for 2-register sequential variant of VLD2.
...
llvm-svn: 142691
2011-10-21 22:21:10 +00:00
Jim Grosbach
846bcff7c7
Assembly parsing for 4-register variant of VLD1.
...
llvm-svn: 142682
2011-10-21 20:35:01 +00:00
Jim Grosbach
c4360fe575
Assembly parsing for 3-register variant of VLD1.
...
llvm-svn: 142675
2011-10-21 20:02:19 +00:00
Jim Grosbach
2f2e3c4737
ARM VLD parsing and encoding.
...
Next step in the ongoing saga of NEON load/store assmebly parsing. Handle
VLD1 instructions that take a two-register register list.
Adjust the instruction definitions to only have the single encoded register
as an operand. The super-register from the pseudo is kept as an implicit def,
so passes which come after pseudo-expansion still know that the instruction
defines the other subregs.
llvm-svn: 142670
2011-10-21 18:54:25 +00:00