summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/mips-features.c
Commit message (Collapse)AuthorAgeFilesLines
* [mips] Pass "xgot" flag as a subtarget featureSimon Atanasyan2019-09-181-2/+2
| | | | | | | | | 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
* [mips] Add '-mrelax-pic-calls', '-mno-relax-pic-calls'Vladimir Stefanovic2019-01-181-0/+12
| | | | | | | | | | | These two options enable/disable emission of R_{MICRO}MIPS_JALR fixups along with PIC calls. The linker may then try to turn PIC calls into direct jumps. By default, these fixups do get emitted by the backend, use '-mno-relax-pic-calls' to omit them. Differential revision: https://reviews.llvm.org/D56878 llvm-svn: 351579
* [mips] Add '-mvirt', '-mno-virt', '-mginv', '-mno-ginv' optionsVladimir Stefanovic2018-07-111-0/+24
| | | | | | | | | '-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/+12
| | | | | | | | | '-mcrc' is shared with ARM. '-mno-crc' is Mips-only (ARM uses '-mnocrc'). Differential revision: https://reviews.llvm.org/D48169 llvm-svn: 336347
* [mips] Improve handling of -fno-[pic/PIC] optionAleksandar Beserminji2018-05-071-3/+3
| | | | | | | | | | | | | | | 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-3/+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/+3
| | | | | | | | | | | | | 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/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] Accept but ignore -m(no-)branch-likelySimon Dardis2017-09-261-0/+10
| | | | | | | | | | | | | -mbranch-likely and -mno-branch-likely are used in some build systems for some MIPS targets. Accept these options but ignore them as they are an (de)optimiztion hint, and that branch likely instructions were deprecated but not removed from MIPS32 and MIPS64 ISAs. Reviewers: atanasyan, nitesh.jain Differential Revision: https://reviews.llvm.org/D38168 llvm-svn: 314213
* [mips] Introducing option -mabs=[legacy/2008]Petar Jovanovic2017-08-241-0/+25
| | | | | | | | | | | | | | | | | 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] Support implicit gpopt with N64 when using -fno-picSimon Dardis2017-08-111-0/+18
| | | | | | | | | | | As clang defaults to -mno-abicalls when using -fno-pic for N64, implicitly use -mgpopt in that case. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D36315 llvm-svn: 310714
* [mips] Show warning in case of mixing -mlong-calls and -mabicalls optionsSimon Atanasyan2017-08-101-2/+6
| | | | | | | | | | 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-0/+5
| | | | | | | | | | 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
* [mips] Add support -m(no-)embedded-data optionSimon Dardis2017-08-031-0/+15
| | | | | | | | | | | Add support for the -membedded-data option which places constant data in the .rodata section, rather than the .sdata section. Reviewers: atanasyan, nitesh.jain Differential Revision: https://reviews.llvm.org/D35914 llvm-svn: 309935
* [mips] Add support for -m(no-)extern-data.Simon Dardis2017-07-241-0/+15
| | | | | | | | | | | Add support for -m(no-)extern-data when using -mgpopt in the driver. It is enabled by default in the backend. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35550 llvm-svn: 308879
* [mips] Add support for -m(no-)local-sdataSimon Dardis2017-07-201-0/+15
| | | | | | | | | | | Teach the driver to support -mlocal-sdata. The backend already matches GCC's default behaviour. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35549 llvm-svn: 308683
* Reland "[mips] Teach the driver to accept -m(no-)gpopt."Simon Dardis2017-07-201-0/+25
| | | | | | | | | | | | | | This patch teaches the driver to pass -mgpopt by default to the backend when it is supported, i.e. we are using -mno-abicalls. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35548 This version fixes a logic error that generated warnings incorrectly and gets rid of spurious arguments to the backend when -mgpopt is not used. llvm-svn: 308619
* Revert "Reland "[mips] Teach the driver to accept -m(no-)gpopt.""Simon Dardis2017-07-191-25/+0
| | | | | | This reverts r308458. Investigating further buildbot breakage. llvm-svn: 308459
* Reland "[mips] Teach the driver to accept -m(no-)gpopt."Simon Dardis2017-07-191-0/+25
| | | | | | | | | | | | | This patch teaches the driver to pass -mgpopt by default to the backend when it is supported, i.e. we are using -mno-abicalls. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35548 This version fixes a logic error that generated warnings incorrectly. llvm-svn: 308458
* Revert "[mips] Teach the driver to accept -m(no-)gpopt."Simon Dardis2017-07-191-25/+0
| | | | | | Revert r308431 and r308432, these caused broke some buildbots. llvm-svn: 308436
* [mips] Teach the driver to accept -m(no-)gpopt.Simon Dardis2017-07-191-0/+25
| | | | | | | | | | | This patch teaches the driver to pass -mgpopt by default to the backend when it is supported, i.e. we are using -mno-abicalls. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35548 llvm-svn: 308431
* [mips][mt][7/7] Add driver option for the MIPS MT ASE.Simon Dardis2017-07-121-0/+12
| | | | | | | | 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/+11
| | | | | | | | 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
* [mips] Compact branch policy setting.Simon Dardis2016-05-271-0/+18
| | | | | | | | | | | | | | This patch adds the commandline option -mcompact-branches={never,optimal,always), which controls how LLVM generates compact branches for MIPSR6 targets. By default, the compact branch policy is 'optimal' where LLVM will generate the most appropriate branch for any situation. The 'never' and 'always' policy will disable or always generate compact branches wherever possible respectfully. Reviewers: dsanders, vkalintiris, atanasyan Differential Revision: http://reviews.llvm.org/D20729 llvm-svn: 271000
* [mips] Don't propagate -mfpxx by default if soft/single float were also set.Toma Tabacu2015-06-161-0/+72
| | | | | | | | | | | | | | | | | Summary: If the driver is only given -msoft-float/-mfloat-abi=soft or -msingle-float, we should refrain from propagating -mfpxx, unless it was explicitly given on the command line. Reviewers: atanasyan, dsanders Reviewed By: atanasyan, dsanders Subscribers: cfe-commits, mpf Differential Revision: http://reviews.llvm.org/D10387 llvm-svn: 239818
* [Mips] Generate warning for invalid '-mnan' and '-march' combinationsPetar Jovanovic2015-04-141-2/+2
| | | | | | | | | | | | This patch generates a warning for invalid combination of '-mnan' and '-march' options, it properly sets NaN encoding for a given '-march', and it passes a proper NaN encoding to the assembler. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D8170 llvm-svn: 234882
* [mips] Invert the abicalls feature bit to be noabicalls so that it's ↵Daniel Sanders2014-08-081-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | possible for -mno-abicalls to take effect. Also added the testcase that should have been in r215194. This behaviour has surprised me a few times now. The problem is that the generated MipsSubtarget::ParseSubtargetFeatures() contains code like this: if ((Bits & Mips::FeatureABICalls) != 0) IsABICalls = true; so '-abicalls' means 'leave it at the default' and '+abicalls' means 'set it to true'. In this case, (and the similar -modd-spreg case) I'd like the code to be IsABICalls = (Bits & Mips::FeatureABICalls) != 0; or possibly: if ((Bits & Mips::FeatureABICalls) != 0) IsABICalls = true; else IsABICalls = false; and preferably arrange for 'Bits & Mips::FeatureABICalls' to be true by default (on some triples). llvm-svn: 215211
* [mips] Add -mabicalls/-mno-abicalls to the driverDaniel Sanders2014-08-081-0/+12
| | | | | | | Based on a patch by Matheus Almeida. I've added testcases and fixed a bug where the options weren't passed on to GAS. llvm-svn: 215204
* [mips] Add support for -mfpxx and -mno-fpxx.Daniel Sanders2014-07-161-0/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D4464 llvm-svn: 213132
* [mips] Add support for -modd-spreg/-mno-odd-spregDaniel Sanders2014-07-101-0/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D4432 llvm-svn: 212700
* [mips] Pass nan2008 info to the back-end.Matheus Almeida2014-05-071-0/+12
| | | | | | | | | | | | Summary: The initial support for NaN2008 was added to the back-end in r206396. Reviewers: atanasyan Reviewed By: atanasyan Differential Revision: http://reviews.llvm.org/D3448 llvm-svn: 208220
* [mips] Added -mfp64 and -mfp32 options.Daniel Sanders2013-10-171-0/+12
| | | | | | | | | | | | | | | | These options specify 64-bit FP registers and 32-bit FP registers respectively. When using -mfp32, the FPU has 16x double-precision registers overlapping with the 32x single-precision registers (each double-precision register overlaps two single-precision registers). When using -mfp64, the FPU has 32x double-precision registers overlapping with the 32x single-precision registers (each double-precision register overlaps with one single-precision register and has an additional 32-bits). MSA requires -mfp64. llvm-svn: 192899
* [Mips] MSA frontend option supportJack Carter2013-08-121-0/+12
| | | | | | | | | | | This patch adds -mmsa and -mno-msa to the options supported by clang to enable and disable support for MSA. When MSA is enabled, a predefined macro '__mips_msa' is defined to 1. Patch by Daniel Sanders llvm-svn: 188184
* [mips] Add support for command-line options -mno-check-zero-division andAkira Hatanaka2013-07-191-0/+12
| | | | | | -mcheck-zero-division. llvm-svn: 186710
* [Mips] Add -mldc1-sdc1 / -mno-ldc1-sdc1 command line options.Simon Atanasyan2013-05-111-0/+12
| | | | llvm-svn: 181660
* [Mips] Remove "REQUIRES: mips-registered-target" from some MIPS-relatedSimon Atanasyan2013-04-221-2/+0
| | | | | | | driver tests. These tests check the driver only and do not require mips target. llvm-svn: 180042
* [Mips] Support -mmicromips / -mno-micromips command line options.Simon Atanasyan2013-04-141-0/+12
| | | | llvm-svn: 179489
* [MIPS] Add -mxgot/-mno-xgot command line optionsSimon Atanasyan2012-12-011-0/+12
| | | | | | to enable/disable support of GOT larger than 64k. llvm-svn: 169098
* MIPS: Use -G option to specify MIPS section threshold. Translate itSimon Atanasyan2012-08-271-0/+6
| | | | | | | to the -mllvm -mips-ssection-threshold=<value> pair and pass to the frontend. The patch suggested by Carl Norum. llvm-svn: 162697
* Tests: check for target availability for target-specific tests.Jim Grosbach2012-07-091-0/+2
| | | | | | | | Lots of tests are using an explicit target triple w/o first checking that the target is actually available. Add a REQUIRES clause to a bunch of them. This should hopefully unbreak bots which don't configure w/ all targets enabled. llvm-svn: 159949
* MIPS: Add -mdsp/-mno-dsp and -mdspr2/-mno-dspr2 command line options support.Simon Atanasyan2012-07-051-0/+24
| | | | llvm-svn: 159769
* MIPS: Add -mips16 / -mno-mips16 command line support.Simon Atanasyan2012-07-051-0/+13
llvm-svn: 159747
OpenPOWER on IntegriCloud