summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for parsing ARM symbol variants on ELF targetsDavid Peixotto2013-12-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM symbol variants are written with parens instead of @ like this: .word __GLOBAL_I_a(target1) This commit adds support for parsing these symbol variants in expressions. We introduce a new flag to MCAsmInfo that indicates the parser should use parens to parse the symbol variant. The expression parser is modified to look for symbol variants using parens instead of @ when the corresponding MCAsmInfo flag is true. The MCAsmInfo parens flag is enabled only for ARM on ELF. By adding this flag to MCAsmInfo, we are able to get rid of redundant ARM-specific symbol variants and use the generic variants instead (e.g. VK_GOT instead of VK_ARM_GOT). We use the new UseParensForSymbolVariant attribute in MCAsmInfo to correctly print the symbol variants for arm. To achive this we need to keep a handle to the MCAsmInfo in the MCSymbolRefExpr class that we can check when printing the symbol variant. Updated Tests: Changed case of symbol variant to match the generic kind. test/CodeGen/ARM/tls-models.ll test/CodeGen/ARM/tls1.ll test/CodeGen/ARM/tls2.ll test/CodeGen/Thumb2/tls1.ll test/CodeGen/Thumb2/tls2.ll PR18080 llvm-svn: 196424
* Move getSymbolWithGlobalValueBase to TargetLoweringObjectFile.Rafael Espindola2013-12-021-1/+1
| | | | | | This allows it to be used in TargetLoweringObjectFileImpl.cpp. llvm-svn: 196117
* Remove dead code.Rafael Espindola2013-12-021-9/+0
| | | | | | | | | MO_JumpTableIndex and MO_ExternalSymbol don't show up on inline asm. Keeping parts of the old asm printer just to print inline asm to a string that we then parse back looks like a hack. llvm-svn: 196111
* Fix indentation typoTim Northover2013-11-251-1/+1
| | | | llvm-svn: 195660
* ARM: remove special cases for Darwin dynamic-no-pic mode.Tim Northover2013-11-251-31/+27
| | | | | | | | | These are handled almost identically to static mode (and ELF's global address materialisation), except that a symbol may have "$non_lazy_ptr" appended. This can be handled by passing appropriate flags along with the instruction instead of using entirely separate pseudo-instructions. llvm-svn: 195655
* [ARM] Add support for FP_HP_extension build attributeBradley Smith2013-11-121-0/+3
| | | | llvm-svn: 194470
* [ARM] Add Virtualization subtarget feature and more build attributes in this ↵Bradley Smith2013-11-011-0/+13
| | | | | | | | | | | | | | | area Add a Virtualization ARM subtarget feature along with adding proper build attribute emission for Tag_Virtualization_use (encodes Virtualization and TrustZone) and Tag_MPextension_use. Also rework test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll testcase to something that is more maintainable. This changes the focus of this testcase away from testing CPU defaults (which is tested elsewhere), onto specifically testing that attributes are encoded correctly. llvm-svn: 193859
* [ARM] Fix Tag_ABI_HardFP_use build attributeBradley Smith2013-11-011-4/+8
| | | | | | | | Fix Tag_ABI_HardFP_use build attribute to handle single precision FP, replace deprecated Tag_ABI_HardFP_use value of 3 with 0 and also add some tests for Tag_ABI_VFP_args. llvm-svn: 193856
* Add a helper getSymbol to AsmPrinter.Rafael Espindola2013-10-291-5/+5
| | | | llvm-svn: 193627
* [arm] Implement eabi_attribute, cpu, and fpu directives.Logan Chien2013-10-281-253/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit allows the ARM integrated assembler to parse and assemble the code with .eabi_attribute, .cpu, and .fpu directives. To implement the feature, this commit moves the code from AttrEmitter to ARMTargetStreamers, and several new test cases related to cortex-m4, cortex-r5, and cortex-a15 are added. Besides, this commit also change the Subtarget->isFPOnlySP() to Subtarget->hasD16() to match the usage of .fpu directive. This commit changes the test cases: * Several .eabi_attribute directives in 2010-09-29-mc-asm-header-test.ll are removed because the .fpu directive already cover the functionality. * In the Cortex-A15 test case, the value for Tag_Advanced_SIMD_arch has be changed from 1 to 2, which is more precise. llvm-svn: 193524
* [ARM] Fix FP ABI attributes with no VFP enabled.Amara Emerson2013-10-111-14/+12
| | | | llvm-svn: 192458
* Add a MCTargetStreamer interface.Rafael Espindola2013-10-081-3/+5
| | | | | | | | | | | | | This patch fixes an old FIXME by creating a MCTargetStreamer interface and moving the target specific functions for ARM, Mips and PPC to it. The ARM streamer is still declared in a common place because it is used from lib/CodeGen/ARMException.cpp, but the Mips and PPC are completely hidden in the corresponding Target directories. I will send an email to llvmdev with instructions on how to use this. llvm-svn: 192181
* [ARM] Improve build attributes emission.Amara Emerson2013-10-071-52/+78
| | | | llvm-svn: 192111
* Remove some really nasty uses of hasRawTextSupport.Rafael Espindola2013-10-051-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When MC was first added, targets could use hasRawTextSupport to keep features working before they were added to the MC interface. The design goal of MC is to provide an uniform api for printing assembly and object files. Short of relaxations and other corner cases, a object file is just another representation of the assembly. It was never the intention that targets would keep doing things like if (hasRawTextSupport()) Set flags in one way. else Set flags in another way. When they do that they create two code paths and the object file is no longer just another representation of the assembly. This also then requires testing with llc -filetype=obj, which is extremelly brittle. This patch removes some of these hacks by replacing them with smaller ones. The ARM flag setting is trivial, so I just moved it to the constructor. For Mips, the patch adds two temporary hack directives that allow the assembly to represent the same things as the object file was already able to. The hope is that the mips developers will replace the hack directives with the same ones that gas uses and drop the -print-hack-directives flag. I will also try to implement a target streamer interface, so that we can move this out of the common code. In summary, for any new work, two rules of the thumb are * Don't use "llc -filetype=obj" in tests. * Don't add calls to hasRawTextSupport. llvm-svn: 192035
* [ARMv8] Change hasV8Fp to hasFPARMv8, and other command line optionsJoey Gouly2013-09-131-4/+4
| | | | | | to be more consistent. llvm-svn: 190692
* [ARMv8] Emit the proper .fpu directive.Joey Gouly2013-09-131-3/+6
| | | | | | Patch by Bradley Smith! llvm-svn: 190683
* Remove unused private member in ARMAsmPrinter.cpp.Logan Chien2013-09-101-1/+1
| | | | | | | This commit removes the unused "AttributeItem" from ObjectAttributeEmitter. llvm-svn: 190412
* ARM: respect tied 64-bit inlineasm operands when printingTim Northover2013-08-221-0/+17
| | | | | | | The code for 'Q' and 'R' operand modifiers needs to look through tied operands to discover the register class. llvm-svn: 188990
* Bug 13662: Enable GPRPair for all i64 operands of inline asm on ARMWeiming Zhao2013-06-281-2/+22
| | | | | | | | This patch assigns paired GPRs for inline asm with 64-bit data on ARM. It's enabled for both ARM and Thumb to support modifiers like %H, %Q, %R. llvm-svn: 185169
* Add a Subtarget feature 'v8fp' to the ARM backend.Joey Gouly2013-06-271-4/+14
| | | | llvm-svn: 185073
* Add a subtarget feature 'v8' to the ARM backend.Joey Gouly2013-06-261-1/+3
| | | | | | This allows for targeting the ARMv8 AArch32 variant. llvm-svn: 184967
* Remove the 'generic' CPU from the ARM eabi attributes printer.Joey Gouly2013-06-261-9/+2
| | | | | | Make v4 the default ARM architecture attribute, to match CodeGen. llvm-svn: 184962
* DebugInfo: PR14763/r183329 correct the location of indirect parametersDavid Blaikie2013-06-191-3/+4
| | | | | | | | | | | | | | | | We had been papering over a problem with location info for non-trivial types passed by value by emitting their type as references (this caused the debugger to interpret the location information correctly, but broke the type of the function). r183329 corrected the type information but lead to the debugger interpreting the pointer parameter as the value - the debug info describing the location needed an extra dereference. Use a new flag in DIVariable to add the extra indirection (either by promoting an existing DW_OP_reg (parameter passed in a register) to DW_OP_breg + 0 or by adding DW_OP_deref to an existing DW_OP_breg + n (parameter passed on the stack). llvm-svn: 184368
* Reduce indentation.David Blaikie2013-06-181-53/+55
| | | | llvm-svn: 184213
* DebugInfo: remove target-specific Frame Index handling for DBG_VALUE ↵David Blaikie2013-06-161-39/+1
| | | | | | | | | | MachineInstrs Frame index handling is now target-agnostic, so delete the target hooks for creation & asm printing of target-specific addressing in DBG_VALUEs and any related functions. llvm-svn: 184067
* Revert r181009.Amara Emerson2013-05-031-8/+8
| | | | llvm-svn: 181079
* Add support for reading ARM ELF build attributes.Amara Emerson2013-05-031-8/+8
| | | | | | | | | | | Build attribute sections can now be read if they exist via ELFObjectFile, and the llvm-readobj tool has been extended with an option to dump this information if requested. Regression tests are also included which exercise these features. Also update the docs with a fixed ARM ABI link and a new link to the Addenda which provides the build attributes specification. llvm-svn: 181009
* ARM: Fix an old refacto.Benjamin Kramer2013-03-151-1/+1
| | | | | | Fixes PR15520. llvm-svn: 177167
* Re-apply r175088 for bug fix 13622: Add paired register support forWeiming Zhao2013-02-141-6/+9
| | | | | | | | inline asm with 64-bit data on ARM Update test case to use -mtriple=arm-linux-gnueabi llvm-svn: 175186
* temporarily revert the patch due to some conflictsWeiming Zhao2013-02-131-9/+6
| | | | llvm-svn: 175107
* Bug fix 13622: Add paired register support for inline asm with 64-bit data ↵Weiming Zhao2013-02-131-6/+9
| | | | | | on ARM llvm-svn: 175088
* Switch the code added in r173885 to use the new, shiny RTTIChandler Carruth2013-01-311-6/+2
| | | | | | | | | | | | | | | | | | | | | | | infrastructure on MCStreamer to test for whether there is an MCELFStreamer object available. This is just a cleanup on the AsmPrinter side of things, moving ad-hoc tests of random APIs to a direct type query. But the AsmParser completely broken. There were no tests, it just blindly cast its streamer to an MCELFStreamer and started manipulating it. I don't have a test case -- this actually failed on LLVM's own regression test suite. Unfortunately the failure only appears when the stars, compilers, and runtime align to misbehave when we read a pointer to a formatted_raw_ostream as-if it were an MCAssembler. =/ UBSan would catch this immediately. Many thanks to Matt for doing about 80% of the debugging work here in GDB, Jim for helping to explain how exactly to fix this, and others for putting up with the hair pulling that ensued during debugging it. llvm-svn: 174118
* Add a special ARM trap encoding for NaCl.Eli Bendersky2013-01-301-0/+7
| | | | | | | | 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-301-0/+11
| | | | | | | | setting of ELF header e_flags. Contributer: Jack Carter llvm-svn: 173885
* Last in the series of removing unnecessary '0' arguments forEric Christopher2013-01-091-5/+5
| | | | | | | address space. Reordered the EmitULEB128IntValue arguments to make this easier. llvm-svn: 171949
* These functions have default arguments of 0 for the last arg. UseEric Christopher2013-01-091-2/+2
| | | | | | them. llvm-svn: 171933
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-4/+4
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-9/+9
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Decouple MCInstBuilder from the streamer per Eli's request.Benjamin Kramer2012-11-261-114/+78
| | | | llvm-svn: 168597
* Add MCInstBuilder, a utility class to simplify MCInst creation similar to ↵Benjamin Kramer2012-11-261-376/+298
| | | | | | | | MachineInstrBuilder. Simplify some repetitive code with it. No functionality change. llvm-svn: 168587
* Use empty parens for empty function parameter list instead of '(void)'.Dmitri Gribenko2012-11-151-1/+1
| | | | llvm-svn: 168049
* Disable the Thumb no-return call optimization:Evan Cheng2012-11-101-25/+0
| | | | | | | | | | | | mov lr, pc b.w _foo The "mov" instruction doesn't set bit zero to one, it's putting incorrect value in lr. It messes up backtraces. rdar://12663632 llvm-svn: 167657
* Recommit modified r167540.Amara Emerson2012-11-081-4/+19
| | | | | | | Improve ARM build attribute emission for architectures types. This also changes the default architecture emitted for a generic CPU to "v7". llvm-svn: 167574
* Revert r167540 until regression tests are updated.Amara Emerson2012-11-071-21/+4
| | | | llvm-svn: 167545
* Improve ARM build attribute emission for architectures types.Amara Emerson2012-11-071-4/+21
| | | | | | This also changes the default architecture emitted for a generic CPU to "v7". llvm-svn: 167540
* Remove some dead code from ARMAsmPrinter. Add virtual and LLVM_OVERRIDE to ↵Craig Topper2012-10-091-20/+0
| | | | | | the other methods. Mark some of the helper methods as private. llvm-svn: 165479
* Move TargetData to DataLayout.Micah Villmow2012-10-081-3/+3
| | | | llvm-svn: 165402
* ARM: locate user-defined text sections next to default text.Jim Grosbach2012-10-041-4/+20
| | | | | | | | | | | | Make sure functions located in user specified text sections (via the section attribute) are located together with the default text sections. Otherwise, for large object files, the relocations for call instructions are more likely to be out of range. This becomes even more likely in the presence of LTO. rdar://12402636 llvm-svn: 165254
* This needs braces. Spotted by Bill.Eric Christopher2012-08-141-1/+2
| | | | llvm-svn: 161906
* Add support for the %H output modifier.Eric Christopher2012-08-131-2/+15
| | | | | | Patch by Weiming Zhao. llvm-svn: 161768
OpenPOWER on IntegriCloud