summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/ARM
Commit message (Collapse)AuthorAgeFilesLines
...
* ARM: Add optional datatype suffix to NEON mvn asm syntax.Jim Grosbach2013-06-181-0/+39
| | | | | | rdar://14194152 llvm-svn: 184244
* Change the arm assembler to support this from the v7c spec:Kevin Enderby2013-06-182-0/+5
| | | | | | | | | | | | | | | "When assembling to the ARM instruction set, the .N qualifier produces an assembler error and the .W qualifier has no effect." In the pre-matcher handler in the asm parser the ".w" (wide) qualifier when in ARM mode is now discarded. And an error message is now produced when the ".n" (narrow) qualifier is used in ARM mode. Test cases for these were added. rdar://14064574 llvm-svn: 184224
* ARM: fix literal load with positive offset encodingAmaury de la Vieuville2013-06-181-1/+20
| | | | | | | | | | | | When using a positive offset, literal loads where encoded as if it was negative, because: - The sign bit was not assigned to an operand - The addrmode_imm12 operand was not encoding the sign bit correctly This patch also makes the assembler look at the .w/.n specifier for loads. llvm-svn: 184182
* ARM: fix t2am_imm8_offset operand printing for imm=#-0Amaury de la Vieuville2013-06-131-0/+2
| | | | llvm-svn: 183913
* Rework r183728, suppress assert(0) for now. Its behavior depends on ↵NAKAMURA Takumi2013-06-112-6/+0
| | | | | | | assertions on win32 hosts. FIXME: Introduce yet another checker but assert(0). llvm-svn: 183736
* It adds support for negative zero offsets for loads and stores.Mihai Popa2013-06-111-1/+4
| | | | | | | Negative zero is returned by the primary expression parser as INT32_MIN, so all that the method needs to do is to accept this value. Behavior already present for Thumb2. llvm-svn: 183734
* This patch adds support for FPINST/FPINST2 as operands to vmsr/vmrs. These ↵Mihai Popa2013-06-111-0/+8
| | | | | | are optional registers that may be supported some ARM implementations to aid with resolution of floating point exceptions. The manual pages for vmsr and vmrs do not detail their use. Encodings and other information can be found in ARM Architecture Reference Manual section F, chapter 6, paragraph 3. llvm-svn: 183733
* Tweak a couple of tests on win32 hosts with +Asserts.NAKAMURA Takumi2013-06-112-0/+6
| | | | | | | | - Don't use assert(0), or tests may pass or fail according to assertions. - For now, The tests are marked as XFAIL for win32 hosts. FIXME: Could we avoid XFAIL to specify triple in the RUN lines? llvm-svn: 183728
* ARM: diagnose ARM/Thumb assembly switches on CPUs only supporting one.Tim Northover2013-06-105-3/+36
| | | | | | | | | | | Some ARM CPUs only support ARM mode (ancient v4 ones, for example) and some only support Thumb mode (M-class ones currently). This makes sure such CPUs default to the correct mode and makes the AsmParser diagnose an attempt to switch modes incorrectly. rdar://14024354 llvm-svn: 183710
* ARM: ISB cannot be passed the same options as DMBAmaury de la Vieuville2013-06-104-0/+18
| | | | | | ISB should only accepts full system sync, other options are reserved llvm-svn: 183656
* Fix ARM unwind opcode assembler in several cases.Logan Chien2013-06-095-6/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to ARM unwind opcode assembler: * Fix multiple .save or .vsave directives. Besides, the order is preserved now. * For the directives which will generate multiple opcodes, such as ".save {r0-r11}", the order of the unwind opcode is fixed now, i.e. the registers with less encoding value are popped first. * Fix the $sp offset calculation. Now, we can use the .setfp, .pad, .save, and .vsave directives at any order. Changes to test cases: * Add test cases to check the order of multiple opcodes for the .save directive. * Fix the incorrect $sp offset in the test case. The stack pointer offset specified in the test case was incorrect. (Changed test cases: ehabi-mc-section.ll and ehabi-mc.ll) * The opcode to restore $sp are slightly reordered. The behavior are not changed, and the new output is same as the output of GNU as. (Changed test cases: eh-directive-pad.s and eh-directive-setfp.s) llvm-svn: 183627
* This is a simple patch that changes RRX and RRXS to accept all registers as ↵Mihai Popa2013-06-051-0/+24
| | | | | | | | operands. According to the ARM reference manual, RRX(S) have defined encodings for lr, pc and sp. llvm-svn: 183307
* ARM: permit upper-case BE/LE on setend instructionTim Northover2013-05-311-0/+4
| | | | | | Patch by Amaury de la Vieuville. llvm-svn: 183012
* ARM: add fstmx and fldmx instructions for assemblyTim Northover2013-05-311-0/+14
| | | | | | | | | These instructions are deprecated oddities, but we still need to be able to disassemble (and reassemble) them if and when they're encountered. Patch by Amaury de la Vieuville. llvm-svn: 183011
* Change how we iterate over relocations on ELF.Rafael Espindola2013-05-3016-105/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | For COFF and MachO, sections semantically have relocations that apply to them. That is not the case on ELF. In relocatable objects (.o), a section with relocations in ELF has offsets to another section where the relocations should be applied. In dynamic objects and executables, relocations don't have an offset, they have a virtual address. The section sh_info may or may not point to another section, but that is not actually used for resolving the relocations. This patch exposes that in the ObjectFile API. It has the following advantages: * Most (all?) clients can handle this more efficiently. They will normally walk all relocations, so doing an effort to iterate in a particular order doesn't save time. * llvm-readobj now prints relocations in the same way the native readelf does. * probably most important, relocations that don't point to any section are now visible. This is the case of relocations in the rela.dyn section. See the updated relocation-executable.test for example. llvm-svn: 182908
* Fix ARM FastISel tests, as a first step to enabling ARM FastISelDerek Schuff2013-05-141-6/+8
| | | | | | | | | | | | | | | | | | | | | ARM FastISel is currently only enabled for iOS non-Thumb1, and I'm working on enabling it for other targets. As a first step I've fixed some of the tests. Changes to ARM FastISel tests: - Different triples don't generate the same relocations (especially movw/movt versus constant pool loads). Use a regex to allow either. - Mangling is different. Use a regex to allow either. - The reserved registers are sometimes different, so registers get allocated in a different order. Capture the names only where this occurs. - Add -verify-machineinstrs to some tests where it works. It doesn't work everywhere it should yet. - Add -fast-isel-abort to many tests that didn't have it before. - Split out the VarArg test from fast-isel-call.ll into its own test. This simplifies test setup because of --check-prefix. Patch by JF Bastien llvm-svn: 181801
* The purpose of the patch is to fix the syntax of ARM mrc and mrc2 ↵Mihai Popa2013-05-131-3/+11
| | | | | | instructions when they are used to write to the APSR. In this case, the destination operand should be APSR_nzcv, and the encoding of the target should be 0b1111 (same as for PC). In pre-UAL syntax, this form used the PC register as a textual target. This is still allowed for backward compatibility. llvm-svn: 181705
* Implement AsmParser for ARM unwind directives.Logan Chien2013-05-1022-0/+2303
| | | | | | | | | | | | | | | | | | | This commit implements the AsmParser for fnstart, fnend, cantunwind, personality, handlerdata, pad, setfp, save, and vsave directives. This commit fixes some minor issue in the ARMELFStreamer: * The switch back to corresponding section after the .fnend directive. * Emit the unwind opcode while processing .fnend directive if there is no .handlerdata directive. * Emit the unwind opcode to .ARM.extab while processing .handlerdata even if .personality directive does not exist. llvm-svn: 181603
* This patch fixes two tests marked as XFAIL among the ARM assembler tests.Mihai Popa2013-05-082-99/+97
| | | | | | The reference encoding is correct, but written in the wrong byte order (these are Thumb tests, while the reference is in ARM byte order). llvm-svn: 181420
* ARM: Fix encoding of hint instruction for Thumb.Quentin Colombet2013-04-264-6/+16
| | | | | | | | | | | | | | | "hint" space for Thumb actually overlaps the encoding space of the CPS instruction. In actuality, hints can be defined as CPS instructions where imod and M bits are all nil. Handle decoding of permitted nop-compatible hints (i.e. nop, yield, wfi, wfe, sev) in DecodeT2CPSInstruction. This commit adds a proper diagnostic message for Imm0_4 and updates all tests. Patch by Mihail Popa <Mihail.Popa@arm.com>. llvm-svn: 180617
* Fix treatment of ARM unallocated hint instructions.Quentin Colombet2013-04-171-1/+1
| | | | | | | | | | | | | | | The reference manual defines only 5 permitted values for the immediate field of the "hint" instruction: 1. nop (imm == 0) 2. yield (imm == 1) 3. wfe (imm == 2) 4. wfi (imm == 3) 5. sev (imm == 4) Therefore, restrict the permitted values for the "hint" instruction to 0 through 4. Patch by Mihail Popa <Mihail.Popa@arm.com> llvm-svn: 179707
* ARM: Add VACLT and VACLE assembly aliases.Jim Grosbach2013-04-151-0/+21
| | | | | | | | | These are aliases for VACGT and VACGE, respectively, with the source operands reversed. rdar://13638090 llvm-svn: 179575
* ARM: Correct printing of pre-indexed operands.Quentin Colombet2013-04-121-1/+1
| | | | | | | | | | | | | According to the ARM reference manual, constant offsets are mandatory for pre-indexed addressing modes. The MC disassembler was not obeying this when the offset is 0. It was producing instructions like: str r0, [r1]!. Correct syntax is: str r0, [r1, #0]!. This change modifies the dumping of operands so that the offset is always printed, regardless of its value, when pre-indexed addressing mode is used. Patch by Mihail Popa <Mihail.Popa@arm.com> llvm-svn: 179398
* Replace coff-/elf-dump with llvm-readobjNico Rieck2013-04-1213-177/+169
| | | | llvm-svn: 179361
* ARM: Make "SMC" instructions conditional on new TrustZone architecture feature.Tim Northover2013-04-103-9/+49
| | | | | | | | | | | | These instructions aren't universally available, but depend on a specific extension to the normal ARM architecture (rather than, say, v6/v7/...) so a new feature is appropriate. This also enables the feature by default on A-class cores which usually have these extensions, to avoid breaking existing code and act as a sensible default. llvm-svn: 179171
* Fix pr13145 - Naming a function like a register name confuses the asm parser.Chad Rosier2013-03-191-0/+5
| | | | | | | Patch by Stepan Dyatkovskiy <stpworld@narod.ru> rdar://13457826 llvm-svn: 177463
* ARM: permit full range of valid ADR immediates.Tim Northover2013-02-271-0/+4
| | | | | | | | | This fixes an issue where trying to assemlbe valid ADR instructions would cause LLVM to hit a failed assertion. Patch by Keith Walker. llvm-svn: 176189
* ARM: Convenience aliases for 'srs*' instructions.Jim Grosbach2013-02-232-0/+69
| | | | | | | | Handle an implied 'sp' operand. rdar://11466783 llvm-svn: 175940
* Make ARMAsmPrinter generate the correct alignment specifier syntax in ↵Kristof Beyls2013-02-224-155/+155
| | | | | | | | | instructions. The Printer will now print instructions with the correct alignment specifier syntax, like vld1.8 {d16}, [r0:64] llvm-svn: 175884
* If bundle alignment is enabled, do not add data to a fragment with instructionsDerek Schuff2013-02-151-2/+13
| | | | | | | | | | | | With bundle alignment, instructions all get their own MCFragments (unless they are in a bundle-locked group). For instructions with fixups, this is an MCDataFragment. Emitting actual data (e.g. for .long) attempts to re-use MCDataFragments, which we don't want int this case since it leads to fragments which exceed the bundle size. So, don't reuse them in this case. Also adds a test and fixes some formatting. llvm-svn: 175316
* The ARM NEON vector compare instructions take three arguments. However, the Joel Jones2013-02-141-1/+67
| | | | | | | | | | | | | | assembler should also accept a two arg form, as the docuemntation specifies that the first (destination) register is optional. This patch uses TwoOperandAliasConstraint to add the two argument form. It also fixes an 80-column formatting problem in: test/MC/ARM/neon-bitwise-encoding <rdar://problem/12909419> Clang rejects ARM NEON assembly instructions llvm-svn: 175221
* Make ARMAsmParser accept the correct alignment specifier syntax in instructions.Kristof Beyls2013-02-144-151/+167
| | | | | | | | | The parser will now accept instructions with alignment specifiers written like vld1.8 {d16}, [r0:64] , while also still accepting the incorrect syntax vld1.8 {d16}, [r0, :64] llvm-svn: 175164
* Add a special ARM trap encoding for NaCl.Eli Bendersky2013-01-301-4/+11
| | | | | | | | More details in this thread: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130128/163783.html Patch by JF Bastien llvm-svn: 173943
* This patch implements runtime ARM specificJack Carter2013-01-302-1/+13
| | | | | | | | setting of ELF header e_flags. Contributer: Jack Carter llvm-svn: 173885
* This patch reworks how llvm targets set Jack Carter2013-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | and update ELF header e_flags. Currently gathering information such as symbol, section and data is done by collecting it in an MCAssembler object. From MCAssembler and MCAsmLayout objects ELFObjectWriter::WriteObject() forms and streams out the ELF object file. This patch just adds a few members to the MCAssember class to store and access the e_flag settings. It allows for runtime additions to the e_flag by assembler directives. The standalone assembler can get to MCAssembler from getParser().getStreamer().getAssembler(). This patch is the generic infrastructure and will be followed by patches for ARM and Mips for their target specific use. Contributer: Jack Carter llvm-svn: 173882
* Add some additional tests for the .bundle_lock align_to_end feature that didn'tEli Bendersky2013-01-071-0/+41
| | | | | | | | | make into the last commit. Also, update the test-generation script to generate an exhaustive test for align_to_end as well, and include the generated test. llvm-svn: 171811
* Add the align_to_end option to .bundle_lock in the MC implementation of alignedEli Bendersky2013-01-071-1/+1
| | | | | | | | | bundling. The document describing this feature and the implementation has also been updated: https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm llvm-svn: 171797
* Tests for the aligned bundling support added in r170718Eli Bendersky2012-12-202-0/+43
| | | | llvm-svn: 170719
* Make sure the alternate PC+imm syntax of LDR instruction with a smallKevin Enderby2012-12-141-0/+4
| | | | | | | | immediate generates the narrow version. Needed when doing round-trip assemble/disassemble testing using the alternate syntax that specifies 'pc' directly. llvm-svn: 170255
* revert the test changeHao Liu2012-12-111-1/+0
| | | | llvm-svn: 169823
* A newbie try a test commitHao Liu2012-12-111-0/+1
| | | | llvm-svn: 169821
* Added Mapping Symbols for ARM ELFTim Northover2012-12-0710-17/+272
| | | | | | | | | | Before this patch, when you objdump an LLVM-compiled file, objdump tried to decode data-in-code sections as if they were code. This patch adds the missing Mapping Symbols, as defined by "ELF for the ARM Architecture" (ARM IHI 0044D). Patch based on work by Greg Fitzgerald. llvm-svn: 169609
* Convert an improper CodeGen test to a MC test.Evan Cheng2012-11-101-0/+9
| | | | llvm-svn: 167663
* ARM: Better disassembly for pc-relative LDR.Jim Grosbach2012-10-301-2/+2
| | | | | | | | | When the operand is a plain immediate rather than a label, print it as [pc, #imm] like we do for the Thumb2 wide encoding variant. rdar://12154503 llvm-svn: 166991
* Fix ARM's b.w instruction for thumb 2 and the encoding T4. The branch targetKevin Enderby2012-10-291-0/+12
| | | | | | | is 24 bits not 20 and the decoding needed to correctly handle converting the J1 and J2 bits to their I1 and I2 values to reconstruct the displacement. llvm-svn: 166982
* Test case for r165480.Craig Topper2012-10-101-0/+10
| | | | llvm-svn: 165594
* ARM: 'add Rd, pc, #imm' is an alias for 'adr Rd, #imm'.Jim Grosbach2012-09-251-0/+4
| | | | | | rdar://9795790 llvm-svn: 164577
* Fix edge cases of ARM shift operands in arith instructions.Tim Northover2012-09-222-0/+88
| | | | | | | | | As before with load instructions, oddities like "asr #32", "rrx" could be printed incorrectly. Patch by Chris Lidbury. llvm-svn: 164456
* Fix the handling of edge cases in ARM shifted operands.Tim Northover2012-09-222-0/+116
| | | | | | | | | 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
* Support fpv4 for ARM Cortex-M4.Jiangning Liu2012-08-021-0/+4
| | | | llvm-svn: 161163
OpenPOWER on IntegriCloud