summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains/Arch/Mips.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [mips] Set default float ABI to "soft" on FreeBSDSimon Atanasyan2019-10-091-6/+12
| | | | | | | | Initial patch by Kyle Evans. Fix PR43596 llvm-svn: 374154
* [mips] Pass "xgot" flag as a subtarget featureSimon Atanasyan2019-09-181-0/+7
| | | | | | | | | We need "xgot" flag in the MipsAsmParser to implement correct expansion of some pseudo instructions in case of using 32-bit GOT (XGOT). MipsAsmParser does not have reference to MipsSubtarget but has a reference to "feature bit set". llvm-svn: 372220
* [Driver] Delete dead codeFangrui Song2019-07-121-1/+0
| | | | llvm-svn: 365898
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Replace getOS() == llvm::Triple::*BSD with isOS*BSD() [NFCI]Michal Gorny2018-12-201-2/+2
| | | | | | | | | | | | Replace multiple comparisons of getOS() value with FreeBSD, NetBSD, OpenBSD and DragonFly with matching isOS*BSD() methods. This should improve the consistency of coding style without changing the behavior. Direct getOS() comparisons were left whenever used in switch or switch- like context. Differential Revision: https://reviews.llvm.org/D55916 llvm-svn: 349752
* [driver][mips] Support MIPS R6 target triplesSimon Atanasyan2018-10-161-0/+5
| | | | | | | | | | | | | | | | This change adds support for the following MIPS target triples: mipsisa32r6-linux-gnu mipsisa32r6el-linux-gnu mipsisa64r6-linux-gnuabi64 mipsisa64r6el-linux-gnuabi64 mipsisa64r6-linux-gnuabin32 mipsisa64r6el-linux-gnuabin32 Patch by Yun Qiang Su. Differential revision: https://reviews.llvm.org/D50850 llvm-svn: 344608
* [mips] Fix handling of GNUABIN32 environment in a target tripleSimon Atanasyan2018-10-151-0/+3
| | | | | | | | | | | | The `GNUABIN32` environment in a target triple implies using the N32 ABI. This patch adds support for this environment and switches on N32 ABI if necessary. Patch by Patch by YunQiang Su. Differential revision: https://reviews.llvm.org/D51464 llvm-svn: 344570
* [mips] Add '-mvirt', '-mno-virt', '-mginv', '-mno-ginv' optionsVladimir Stefanovic2018-07-111-0/+4
| | | | | | | | | '-mvirt'/'-mno-virt' enables/disables Virtualization ASE. '-mginv'/'-mno-ginv' enables/disables GINV (Global Invalidate) ASE. Differential revision: https://reviews.llvm.org/D48982 llvm-svn: 336798
* [mips] Add '-mcrc', '-mno-crc' options to enable/disable CRC ASEVladimir Stefanovic2018-07-051-0/+2
| | | | | | | | | '-mcrc' is shared with ARM. '-mno-crc' is Mips-only (ARM uses '-mnocrc'). Differential revision: https://reviews.llvm.org/D48169 llvm-svn: 336347
* [mips] Use more conservative default CPUs for MIPS on FreeBSD.John Baldwin2018-06-261-0/+7
| | | | | | | | | | | | FreeBSD defaults to mips3 for all MIPS ABIs with GCC as that is the minimum MIPS architecture FreeBSD supports. Use mips3 for MIPS64 and mips2 for MIPS32 to match. Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D48499 llvm-svn: 335653
* Use Triple::isMIPS() instead of enumerating all Triples. NFCAlexander Richardson2018-06-251-10/+1
| | | | | | | | Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D48549 llvm-svn: 335495
* [mips] Improve handling of -fno-[pic/PIC] optionAleksandar Beserminji2018-05-071-3/+12
| | | | | | | | | | | | | | | In order to disable PIC and to match GCC behaviour, -mno-abicalls option is neccessary. When -fno-[pic/PIC] is used witout -mno-abicalls, warning is reported. An error is reported when -fno-pic or -fno-PIC is used in combination with -mabicalls. In this commit, test case is added. Depends on D44381. Differential Revision: https://reviews.llvm.org/D44684 llvm-svn: 331640
* Revert "[mips] Improve handling of -fno-[pic/PIC] option"Aleksandar Beserminji2018-05-071-12/+3
| | | | | | This reverts commit r331636. Forgot to add the test case. llvm-svn: 331639
* [mips] Improve handling of -fno-[pic/PIC] optionAleksandar Beserminji2018-05-071-3/+12
| | | | | | | | | | | | | In order to disable PIC and to match GCC behaviour, -mno-abicalls option is neccessary. When -fno-[pic/PIC] is used witout -mno-abicalls, warning is reported. An error is reported when -fno-pic or -fno-PIC is used in combination with -mabicalls. Depends on D44381. Differential Revision: https://reviews.llvm.org/D44684 llvm-svn: 331636
* [mips] Spectre variant two mitigation for MIPSR2Simon Dardis2018-02-211-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides mitigation for CVE-2017-5715, Spectre variant two, which affects the P5600 and P6600. It provides the option -mindirect-jump=hazard, which instructs the LLVM backend to replace indirect branches with their hazard barrier variants. This option is accepted when targeting MIPS revision two or later. The migitation strategy suggested by MIPS for these processors is to use two hazard barrier instructions. 'jalr.hb' and 'jr.hb' are hazard barrier variants of the 'jalr' and 'jr' instructions respectively. These instructions impede the execution of instruction stream until architecturally defined hazards (changes to the instruction stream, privileged registers which may affect execution) are cleared. These instructions in MIPS' designs are not speculated past. These instructions are used with the option -mindirect-jump=hazard when branching indirectly and for indirect function calls. These instructions are defined by the MIPS32R2 ISA, so this mitigation method is not compatible with processors which implement an earlier revision of the MIPS ISA. Implementation note: I've opted to provide this as an -mindirect-jump={hazard,...} style option in case alternative mitigation methods are required for other implementations of the MIPS ISA in future, e.g. retpoline style solutions. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D43487 llvm-svn: 325651
* [mips] Replace Triple::Environment check by the isGNUEnvironment() call. NFCSimon Atanasyan2017-09-071-1/+1
| | | | llvm-svn: 312701
* [mips] Introducing option -mabs=[legacy/2008]Petar Jovanovic2017-08-241-0/+22
| | | | | | | | | | | | | | | | | In patch r205628 using abs.[ds] instruction is forced, as they should behave in accordance with flags Has2008 and ABS2008. Unfortunately for revisions prior mips32r6 and mips64r6, abs.[ds] is not generating correct result when working with NaNs. To generate a sequence which always produce a correct result but also to allow user more control on how his code is compiled, option -mabs is added where user can choose legacy or 2008. By default legacy mode is used on revisions prior R6. Mips32r6 and mips64r6 use abs2008 mode by default. Patch by Aleksandar Beserminji Differential Revision: https://reviews.llvm.org/D35982 llvm-svn: 311669
* [mips] Rename getSupportedNanEncoding() to getIEEE754Standard()Petar Jovanovic2017-08-221-23/+24
| | | | | | | | | | | Rename the function getSupportedNanEncoding() to getIEEE754Standard(), since this function will be used for non-nan related features. Patch by Aleksandar Beserminji. Differential Revision: https://reviews.llvm.org/D36824 llvm-svn: 311454
* [mips] Remove checking of the redundant condition. NFCSimon Atanasyan2017-08-211-2/+1
| | | | llvm-svn: 311334
* Revert r310057Stefan Maksimovic2017-08-111-0/+2
| | | | | | | | Bring back changes which r304953 introduced since they were in fact not the cause of failures described in r310057 commit message. llvm-svn: 310702
* [mips] Show warning in case of mixing -mlong-calls and -mabicalls optionsSimon Atanasyan2017-08-101-2/+10
| | | | | | | | | | While we do not support `-mshared / -mno-shared` properly, show warning and ignore `-mlong-calls` option in case of implicitly or explicitly provided `-mabicalls` option. Differential revision: https://reviews.llvm.org/D36551 llvm-svn: 310614
* [mips] Notify user that `-mabicalls` is ignored on non-PIC N64 ABISimon Atanasyan2017-08-101-3/+15
| | | | | | | | | | The -mabicalls option does not make sense in the case of non position independent code for the N64 ABI. After this change the driver shows a warning that -mabicalls is ignored in that case. Differential revision: https://reviews.llvm.org/D36550 llvm-svn: 310613
* Revert r304953 for release 5.0.0Stefan Maksimovic2017-08-041-2/+0
| | | | | | | | | | This is causing failures when compiling clang with -O3 as one of the structures used by clang is passed by value and uses the fastcc calling convention. Faliures manifest for stage2 mips build. llvm-svn: 310057
* [mips] Code formatting fix. NFCSimon Atanasyan2017-08-041-1/+1
| | | | llvm-svn: 310037
* [mips][mt][7/7] Add driver option for the MIPS MT ASE.Simon Dardis2017-07-121-0/+1
| | | | | | | | Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35254 llvm-svn: 307847
* [driver][mips] Pass long-calls feature flag to the MIPS backendSimon Atanasyan2017-07-071-0/+2
| | | | | | | | Check the `-mlong-calls` command line option and pass the `long-calls` feature flag to the backend. Handling of this feature flag in the backend needs to be implemented by a separate commit. llvm-svn: 307386
* [driver][mips] Use AddTargetFeature to check arguments and add feature ↵Simon Atanasyan2017-07-051-7/+2
| | | | | | flags. NFC llvm-svn: 307152
* [driver][mips] Remove redundant curly brackets. NFCSimon Atanasyan2017-07-051-3/+2
| | | | llvm-svn: 307151
* Reapply r304929 [mips] Add runtime options to enable/disable madd/sub.fmtPetar Jovanovic2017-06-071-0/+7
| | | | | | | | | | | | | | | | | The test in r304929 broke multiple buildbots as it expected mips target to be registered and available (which is not necessarily true). Updating the test with this condition. Original commit: [mips] Add runtime options to enable/disable madd.fmt and msub.fmt Add options to clang: -mmadd4 and -mno-madd4, use it to enable or disable generation of madd.fmt and similar instructions respectively, as per GCC. Patch by Stefan Maksimovic. llvm-svn: 304953
* Revert r304929 [mips] Add runtime options to enable/disable madd/sub.fmtPetar Jovanovic2017-06-071-7/+0
| | | | | | | | | | | | | | | Revert r304929 since the test broke buildbots. Original commit: [mips] Add runtime options to enable/disable madd.fmt and msub.fmt Add options to clang: -mmadd4 and -mno-madd4, use it to enable or disable generation of madd.fmt and similar instructions respectively, as per GCC. Patch by Stefan Maksimovic. llvm-svn: 304935
* [mips] Add runtime options to enable/disable madd.fmt and msub.fmtPetar Jovanovic2017-06-071-0/+7
| | | | | | | | | | | Add options to clang: -mmadd4 and -mno-madd4, use it to enable or disable generation of madd.fmt and similar instructions respectively, as per GCC. Patch by Stefan Maksimovic. Differential Revision: https://reviews.llvm.org/D33401 llvm-svn: 304929
* Remove unnecessary calls to MakeArgString.Evgeniy Stepanov2017-05-091-8/+8
| | | | llvm-svn: 302590
* [Driver] Consolidate tools and toolchains by target platform. (NFC)David L. Jones2017-03-081-0/+403
Summary: (This is a move-only refactoring patch. There are no functionality changes.) This patch splits apart the Clang driver's tool and toolchain implementation files. Each target platform toolchain is moved to its own file, along with the closest-related tools. Each target platform toolchain has separate headers and implementation files, so the hierarchy of classes is unchanged. There are some remaining shared free functions, mostly from Tools.cpp. Several of these move to their own architecture-specific files, similar to r296056. Some of them are only used by a single target platform; since the tools and toolchains are now together, some helpers now live in a platform-specific file. The balance are helpers related to manipulating argument lists, so they are now in a new file pair, CommonArgs.h and .cpp. I've tried to cluster the code logically, which is fairly straightforward for most of the target platforms and shared architectures. I think I've made reasonable choices for these, as well as the various shared helpers; but of course, I'm happy to hear feedback in the review. There are some particular things I don't like about this patch, but haven't been able to find a better overall solution. The first is the proliferation of files: there are several files that are tiny because the toolchain is not very different from its base (usually the Gnu tools/toolchain). I think this is mostly a reflection of the true complexity, though, so it may not be "fixable" in any reasonable sense. The second thing I don't like are the includes like "../Something.h". I've avoided this largely by clustering into the current file structure. However, a few of these includes remain, and in those cases it doesn't make sense to me to sink an existing file any deeper. Reviewers: rsmith, mehdi_amini, compnerd, rnk, javed.absar Subscribers: emaste, jfb, danalbert, srhines, dschuff, jyknight, nemanjai, nhaehnle, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D30372 llvm-svn: 297250
OpenPOWER on IntegriCloud