summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/MCTargetDesc
Commit message (Collapse)AuthorAgeFilesLines
...
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-113-3/+3
| | | | | | | | | | | | | | The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' \ -j=32 -fix -format http://reviews.llvm.org/D8925 llvm-svn: 234679
* clang-format bits of code to make a followup patch easy to read.Rafael Espindola2015-04-094-6/+6
| | | | llvm-svn: 234519
* Replace the MCSubtargetInfo parameter with a Triple when creatingEric Christopher2015-03-311-3/+3
| | | | | | | an MCInstPrinter. Update all callers and use where we wanted a Triple previously. llvm-svn: 233648
* Remove unused MCSubtargetInfo argument from the AArch64 MCInstPrinter ctors.Eric Christopher2015-03-301-2/+2
| | | | llvm-svn: 233608
* Remove unused Target argument from MCInstPrinter ctor functions.Eric Christopher2015-03-301-2/+1
| | | | llvm-svn: 233607
* AArch64: use a different means to determine whether to byte swap relocations.Peter Collingbourne2015-03-241-3/+18
| | | | | | | | This code depended on a bug in the FindAssociatedSection function that would cause it to return the wrong result for certain absolute expressions. Instead, use EvaluateAsRelocatable. llvm-svn: 233119
* Don't declare all text sections at the start of the .sRafael Espindola2015-03-201-1/+3
| | | | | | | | | | | | | | | | | The code this patch removes was there to make sure the text sections went before the dwarf sections. That is necessary because MachO uses offsets relative to the start of the file, so adding a section can change relaxations. The dwarf sections were being printed at the start just to produce symbols pointing at the start of those sections. The underlying issue was fixed in r231898. The dwarf sections are now printed when they are about to be used, which is after we printed the text sections. To make sure we don't regress, the patch makes the MachO streamer assert if CodeGen puts anything unexpected after the DWARF sections. llvm-svn: 232842
* Split the object streamer callback in one per file format.Rafael Espindola2015-03-193-11/+30
| | | | | | | | | | | | | There are two main advantages to doing this * Targets that only need to handle one of the formats specially don't have to worry about the others. For example, x86 now only registers a constructor for the COFF streamer. * Changes to the arguments passed to one format constructor will not impact the other formats. llvm-svn: 232699
* two or more, use a for.Rafael Espindola2015-03-181-71/+31
| | | | llvm-svn: 232688
* Pass in a "const Triple &T" instead of a raw StringRef.Rafael Espindola2015-03-161-4/+2
| | | | llvm-svn: 232429
* Remove unused argument. NFC.Rafael Espindola2015-03-161-3/+3
| | | | llvm-svn: 232428
* There is only one Asm streamer, there is no need for targets to register it.Rafael Espindola2015-03-163-20/+16
| | | | | | | Instead, have the targets register a TargetStreamer to be use with the asm streamer (if any). llvm-svn: 232423
* Remove the use of the subtarget in MCCodeEmitter creation andEric Christopher2015-03-102-8/+4
| | | | | | | update all ports accordingly. Required a couple of small rewrites in handling subtarget features during creation in PPC. llvm-svn: 231861
* Remove MCStreamer.h include from MCContext.h and explictly include it where ↵Pete Cooper2015-03-041-0/+1
| | | | | | necessary. NFC llvm-svn: 231193
* Learn that __DATA,__objc_classrefs is not atomized via symbols.Rafael Espindola2015-02-121-0/+4
| | | | | | This should hopefully fix objc on AArch64. llvm-svn: 228976
* MathExtras: Bring Count(Trailing|Leading)Ones and CountPopulation in line ↵Benjamin Kramer2015-02-121-3/+3
| | | | | | | | with countTrailingZeros Update all callers. llvm-svn: 228930
* Fix a problem where the AArch64 ELF assembler was failing withEric Christopher2015-01-261-1/+2
| | | | | | | | | -no-exec-stack. This was due to it not deriving from the correct asm info base class and missing the override for the exec stack section query. Added another line to the noexec test line to make sure this doesn't regress. llvm-svn: 227074
* Add r224985 back with fixes.Rafael Espindola2015-01-192-68/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fixes are to note that AArch64 has additional restrictions on when local relocations can be used. In particular, ld64 requires that relocations to cstring/cfstrings use linker visible symbols. Original message: In an assembly expression like bar: .long L0 + 1 the intended semantics is that bar will contain a pointer one byte past L0. In sections that are merged by content (strings, 4 byte constants, etc), a single position in the section doesn't give the linker enough information. For example, it would not be able to tell a relocation must point to the end of a string, since that would look just like the start of the next. The solution used in ELF to use relocation with symbols if there is a non-zero addend. In MachO before this patch we would just keep all symbols in some sections. This would miss some cases (only cstrings on x86_64 were implemented) and was inefficient since most relocations have an addend of 0 and can be represented without the symbol. This patch implements the non-zero addend logic for MachO too. llvm-svn: 226503
* Revert "Add r224985 back with two fixes."Rafael Espindola2015-01-142-46/+68
| | | | | | This reverts commit r225644 while I debug a regression. llvm-svn: 226022
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-1/+1
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Add r224985 back with two fixes.Rafael Espindola2015-01-122-68/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One is that AArch64 has additional restrictions on when local relocations can be used. We have to take those into consideration when deciding to put a L symbol in the symbol table or not. The other is that ld64 requires the relocations to cstring to use linker visible symbols on AArch64. Thanks to Michael Zolotukhin for testing this! Remove doesSectionRequireSymbols. In an assembly expression like bar: .long L0 + 1 the intended semantics is that bar will contain a pointer one byte past L0. In sections that are merged by content (strings, 4 byte constants, etc), a single position in the section doesn't give the linker enough information. For example, it would not be able to tell a relocation must point to the end of a string, since that would look just like the start of the next. The solution used in ELF to use relocation with symbols if there is a non-zero addend. In MachO before this patch we would just keep all symbols in some sections. This would miss some cases (only cstrings on x86_64 were implemented) and was inefficient since most relocations have an addend of 0 and can be represented without the symbol. This patch implements the non-zero addend logic for MachO too. llvm-svn: 225644
* Revert r225048: It broke ObjC on AArch64.Lang Hames2015-01-062-32/+68
| | | | | | I've filed http://llvm.org/PR22100 to track this issue. llvm-svn: 225228
* Replace several 'assert(false' with 'llvm_unreachable' or fold a condition ↵Craig Topper2015-01-053-5/+4
| | | | | | into the assert. llvm-svn: 225160
* Add r224985 back with a fix.Rafael Espindola2014-12-312-68/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issues was that AArch64 has additional restrictions on when local relocations can be used. We have to take those into consideration when deciding to put a L symbol in the symbol table or not. Original message: Remove doesSectionRequireSymbols. In an assembly expression like bar: .long L0 + 1 the intended semantics is that bar will contain a pointer one byte past L0. In sections that are merged by content (strings, 4 byte constants, etc), a single position in the section doesn't give the linker enough information. For example, it would not be able to tell a relocation must point to the end of a string, since that would look just like the start of the next. The solution used in ELF to use relocation with symbols if there is a non-zero addend. In MachO before this patch we would just keep all symbols in some sections. This would miss some cases (only cstrings on x86_64 were implemented) and was inefficient since most relocations have an addend of 0 and can be represented without the symbol. This patch implements the non-zero addend logic for MachO too. llvm-svn: 225048
* Revert "Remove doesSectionRequireSymbols."Rafael Espindola2014-12-312-23/+63
| | | | | | | | This reverts commit r224985. I am investigating why it made an Apple bot unhappy. llvm-svn: 225044
* Remove doesSectionRequireSymbols.Rafael Espindola2014-12-302-63/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | In an assembly expression like bar: .long L0 + 1 the intended semantics is that bar will contain a pointer one byte past L0. In sections that are merged by content (strings, 4 byte constants, etc), a single position in the section doesn't give the linker enough information. For example, it would not be able to tell a relocation must point to the end of a string, since that would look just like the start of the next. The solution used in ELF to use relocation with symbols if there is a non-zero addend. In MachO before this patch we would just keep all symbols in some sections. This would miss some cases (only cstrings on x86_64 were implemented) and was inefficient since most relocations have an addend of 0 and can be represented without the symbol. This patch implements the non-zero addend logic for MachO too. llvm-svn: 224985
* Silence more static analyzer warnings.Michael Ilseman2014-12-152-1/+4
| | | | | | | | Add in definedness checks for shift operators, null checks when pointers are assumed by the code to be non-null, and explicit unreachables. llvm-svn: 224255
* Allow target to specify prefix for labelsMatt Arsenault2014-12-041-0/+2
| | | | | | | | Use the MCAsmInfo instead of the DataLayout, and allow specifying a custom prefix for labels specifically. HSAIL requires that labels begin with @, but global symbols with &. llvm-svn: 223323
* Fix capitalization. NFC.Akira Hatanaka2014-12-011-2/+2
| | | | llvm-svn: 222988
* Update AArch64 ELF relocations to ABI 1.0Will Newton2014-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | This mostly entails adding relocations, however there are a couple of changes to existing relocations: 1. R_AARCH64_NONE is defined to be zero rather than 256 R_AARCH64_NONE has been defined to be zero for a long time elsewhere e.g. binutils and glibc since the submission of the AArch64 port in 2012 so this is required for compatibility. 2. R_AARCH64_TLSDESC_ADR_PAGE renamed to R_AARCH64_TLSDESC_ADR_PAGE21 I don't think there is any way for relocation names to leak out of LLVM so this should not break anything. Tested with check-all with no regressions. llvm-svn: 222821
* Rename variables to conform to llvm coding standards.Akira Hatanaka2014-11-031-28/+28
| | | | | | Differential Revision: http://reviews.llvm.org/D6062 llvm-svn: 221204
* [AArch64] Make function processLogicalImmediate more efficient. NFC.Akira Hatanaka2014-11-031-47/+42
| | | | llvm-svn: 221199
* [AArch64] Add support for the .inst directive.Chad Rosier2014-10-224-0/+84
| | | | | | | | | | This has been implement using the MCTargetStreamer interface as is done in the ARM, Mips and PPC backends. Phabricator: http://reviews.llvm.org/D5891 PR20964 llvm-svn: 220422
* Simplify handling of --noexecstack by using getNonexecutableStackSection.Rafael Espindola2014-10-153-7/+4
| | | | llvm-svn: 219799
* Fix segfault in AArch64 backend with -g and -mbig-endianOliver Stannard2014-09-231-2/+2
| | | | | | | Fix a null pointer dereference when trying to swap the endianness of fixups in the .eh_frame section in the AArch64 backend. llvm-svn: 218311
* Remove HasLEB128.Rafael Espindola2014-08-151-1/+0
| | | | | | We already require CFI, so it should be safe to require .leb128 and .uleb128. llvm-svn: 215712
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-136-13/+13
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
* If available, pass down the Fixup object to EvaluateAsRelocatable.Joerg Sonnenberger2014-08-103-4/+7
| | | | | | | At least on PowerPC, the interpretation of certain modifiers depends on the context they appear in. llvm-svn: 215310
* [AArch64] Fix OS ABI flag for aarch64-linux-gnu target.Chad Rosier2014-08-061-2/+5
| | | | | | | | | For triple aarch64-linux-gnu we were incorrectly setting IRIX. For triple aarch64 we are correctly setting SYSV. Patch by Ana Pazos <apazos@codeaurora.org>. llvm-svn: 214974
* Run sort_includes.py on the AArch64 backend.Benjamin Kramer2014-07-254-5/+5
| | | | | | No functionality change. llvm-svn: 213938
* AArch64: remove "arm64_be" support in favour of "aarch64_be".Tim Northover2014-07-232-27/+10
| | | | | | | | | There really is no arm64_be: it was a useful fiction to test big-endian support while both backends existed in parallel, but now the only platform that uses the name (iOS) doesn't have a big-endian variant, let alone one called "arm64_be". llvm-svn: 213748
* AArch64: remove arm64 triple enumerator.Tim Northover2014-07-231-1/+1
| | | | | | | | | | | | Having both Triple::arm64 and Triple::aarch64 is extremely confusing, and invites bugs where only one is checked. In reality, the only legitimate difference between the two (arm64 usually means iOS) is also present in the OS part of the triple and that's what should be checked. We still parse the "arm64" triple, just canonicalise it to Triple::aarch64, so there aren't any LLVM-side test changes. llvm-svn: 213743
* MC: support different sized constants in constant poolsDavid Peixotto2014-07-181-2/+3
| | | | | | | | | | | | | | | On AArch64 the pseudo instruction ldr <reg>, =... supports both 32-bit and 64-bit constants. Add support for 64 bit constants for the pools to support the pseudo instruction fully. Changes the AArch64 ldr-pseudo tests to use 32-bit registers and adds tests with 64-bit registers. Patch by Janne Grunau! Differential Revision: http://reviews.llvm.org/D4279 llvm-svn: 213387
* Move expression visitation logic up to MCStreamer.Rafael Espindola2014-06-252-3/+2
| | | | | | Remove the duplicate from MCRecordStreamer. No functionality change. llvm-svn: 211714
* Simplify the visitation of target expressions. No functionality change.Rafael Espindola2014-06-252-32/+4
| | | | llvm-svn: 211707
* Resubmit commit r211533Weiming Zhao2014-06-242-0/+41
| | | | | | | "Fix PR20056: Implement pseudo LDR <reg>, =<literal/label> for AArch64" Missed files are added in this commit. llvm-svn: 211605
* Fix cmake build.Juergen Ributzka2014-06-231-1/+0
| | | | llvm-svn: 211539
* Fix PR20056: Implement pseudo LDR <reg>, =<literal/label> for AArch64Weiming Zhao2014-06-231-0/+1
| | | | | | | | | | | | | | | | | | | This patch is based on the changes from ARM target [1,2] Based on ARM doc [3], if the literal value can be loaded with a valid MOV, it can emit that instruction. This is implemented in this patch. [1] Fix PR18345: ldr= pseudo instruction produces incorrect code when using in inline assembly Author: David Peixotto <dpeixott@codeaurora.org> commit b92cca222898d87bbc764fa22e805adb04ef7f13 (r200777) [2] Implement the ldr-pseudo opcode for ARM assembly Author: David Peixotto <dpeixott@codeaurora.org> commit 0fa193b08627927ccaa0804a34d80480894614b8 (r197708) [3] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802a/CJAHAIBC.html Differential Revision: http://reviews.llvm.org/D4163 llvm-svn: 211533
* Convert some assert(0) to llvm_unreachable or fold an 'if' condition into ↵Craig Topper2014-06-191-6/+2
| | | | | | the assert. llvm-svn: 211254
* Replace some assert(0)'s with llvm_unreachable.Craig Topper2014-06-182-2/+2
| | | | llvm-svn: 211141
OpenPOWER on IntegriCloud