- Dec 01, 2014
-
-
Daniel Sanders authored
[mips] Return {f128} correctly for N32/N64. Summary: According to the ABI documentation, f128 and {f128} should both be returned in $f0 and $f2. However, this doesn't match GCC's behaviour which is to return f128 in $f0 and $f2, but {f128} in $f0 and $f1. Reviewers: vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5578 llvm-svn: 223022 -
Daniel Sanders authored
------------------------------------------------------------------------ r218452 | dsanders | 2014-09-25 14:08:51 +0100 (Thu, 25 Sep 2014) | 3 lines Add llvm_unreachables() for [ASZ]ExtUpper to X86FastISel.cpp to appease the buildbots. ------------------------------------------------------------------------ llvm-svn: 223021
-
Daniel Sanders authored
Fix unused variable warning added in r218509 llvm-svn: 223020
-
Daniel Sanders authored
[mips] Generalize the handling of f128 return values to support f128 arguments. Summary: This will allow us to handle f128 arguments without duplicating code from CCState::AnalyzeFormalArguments() or CCState::AnalyzeCallOperands(). No functional change. Reviewers: vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5292 llvm-svn: 223019
-
Daniel Sanders authored
[mips] Add CCValAssign::[ASZ]ExtUpper and CCPromoteToUpperBitsInType and handle struct's correctly on big-endian N32/N64 return values. Summary: The N32/N64 ABI's require that structs passed in registers are laid out such that spilling the register with 'sd' places the struct at the lowest address. For little endian this is trivial but for big-endian it requires that structs are shifted into the upper bits of the register. We also require that structs passed in registers have the 'inreg' attribute for big-endian N32/N64 to work correctly. This is because the tablegen-erated calling convention implementation only has access to the lowered form of struct arguments (one or more integers of up to 64-bits each) and is unable to determine the original type. Reviewers: vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5286 llvm-svn: 223018
-
Daniel Sanders authored
[mips] Remove custom versions of CCState::AnalyzeReturn() and CCState::AnalyzeCallReturn(). Summary: The N32/N64 ABI's return f128 values in $f0 and $f2 for hard-float and $v0 and $a0 for soft-float. The registers used in the soft-float case differ from the usual $v0, and $v1 specified for return values. Both cases were previously handled by duplicating the CCState::AnalyzeReturn() and CCState::AnalyzeCallReturn() functions and modifying them to delegate to a different assignment function for f128 and further replace the register type for the hard-float case. There is a simpler way to do both of these. We now use the common functions and select an initial assignment function based on whether the original type is f128 or not. We then handle the hard-float case using CCBitConvertToType<>. No functional change. Reviewers: vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5269 llvm-svn: 223017
-
Daniel Sanders authored
[mips] Remove inverted predicates from MipsSubtarget that were only used by MipsCallingConv.td Summary: No functional change Reviewers: echristo, vmedic Reviewed By: echristo, vmedic Subscribers: echristo, llvm-commits Differential Revision: http://reviews.llvm.org/D5266 llvm-svn: 223016
-
Daniel Sanders authored
[mips] Return an ArrayRef from MipsCC::intArgRegs() and remove MipsCC::numIntArgRegs() Summary: No functional change. Reviewers: vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5265 llvm-svn: 223015
-
Daniel Sanders authored
[mips] Move MipsTargetLowering::MipsCC::regSize() to MipsSubtarget::getGPRSizeInBytes() Summary: The GPR size is more a property of the subtarget than that of the ABI so move this information to the MipsSubtarget. No functional change. Reviewers: vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5009 llvm-svn: 223014
-
Daniel Sanders authored
[mips] Don't cache IsO32 and IsFP64 in MipsTargetLowering::MipsCC Summary: Use a MipsSubtarget reference instead. No functional change. Reviewers: vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5008 llvm-svn: 223013
-
Daniel Sanders authored
[mips] Improve robustness of some tests. Summary: This is done by removing some hardcoded registers like $at or expecting a single digit register to be selected. Contains work done by Matheus Almeida. Reviewers: matheusalmeida, dsanders Reviewed By: dsanders Subscribers: tomatabacu Differential Revision: http://reviews.llvm.org/D4227 llvm-svn: 223012
-
Daniel Sanders authored
[mips] Invert the abicalls feature bit to be noabicalls so that it's 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: 223011 -
Daniel Sanders authored
[mips] Initial implementation of -mabicalls/-mno-abicalls. This patch implements the main rules for -mno-abicalls such as reserving $gp, and emitting the correct .option directive. Patch by Matheus Almeida and Toma Tabacu Differential Revision: http://reviews.llvm.org/D4231 llvm-svn: 223009
-
Daniel Sanders authored
llvm/test/CodeGen/Mips/cconv/arguments-varargs.ll: Add explicit -mtriple=(mips|mipsel)-linux on 4 lines. llvm-svn: 223008
-
Daniel Sanders authored
[mips][PR19612] Fix va_arg for big-endian mode. Summary: Big-endian mode was not correctly adjusting the offset for types smaller than an ABI slot. Fixes PR19612 Reviewers: dsanders Reviewed By: dsanders Subscribers: sstankovic, llvm-commits Differential Revision: http://reviews.llvm.org/D4556 llvm-svn: 223007
-
Daniel Sanders authored
Please note that there is a significant change to the test compared to r222339. This is because this branch generates different code compared to the trunk. The code on this branch appears to be equivalent so the test has been updated accordingly. ------------------------------------------------------------------------------- Allow EmitVAArg() to promote types and use this to fix some N32/N64 vararg issues for Mips. Summary: With this patch, passing a va_list to another function and reading 10 int's from it works correctly on a big-endian target. Based on a pair of patches by David Chisnall, one of which I've reworked for the current trunk. Reviewers: theraven, atanasyan Reviewed By: theraven, atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6248 llvm-svn: 223005
-
Daniel Sanders authored
[mips] Mark aggregate arguments passed in registers with the inreg attribute Summary: This allows us to easily identify them in the backend which in turn allows us to handle them correctly for big-endian targets (where they must be shifted into the upper bits of the register). Depends on D5961 Reviewers: atanasyan Reviewed By: atanasyan Subscribers: cfe-commits, theraven Differential Revision: http://reviews.llvm.org/D5962 llvm-svn: 223004
-
Daniel Sanders authored
[mips] Promote all integral/enumeration types to the GPR width Summary: Ensure all integral/enumeration types are appropriately annotated with signext/zeroext. In particular, i32 now has these attributes when using the N32/N64 ABI. This paves the way for accurately representing the way the N32/N64 ABI's promotes integer arguments to i64. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: cfe-commits, theraven Differential Revision: http://reviews.llvm.org/D5961 llvm-svn: 223003
-
Daniel Sanders authored
[mips] Fix r218248's testcase to use -O1 instead of -O3. llvm-svn: 223002
-
Daniel Sanders authored
Fix test/CodeGen/mips-varargs.c to use %clang_cc1 Only tests under test/Driver should use %clang, and test/CodeGen in particular must always use %clang_cc1. llvm-svn: 223001
-
Daniel Sanders authored
clang/test/CodeGen/mips-varargs.c: Fixup for -Asserts. llvm-svn: 223000
-
Daniel Sanders authored
[mips] Correct alignment of vectors passed in varargs for the O32 ABI. Summary: Vectors are normally 16-byte aligned, however the O32 ABI enforces a maximum alignment of 8-bytes since the base of the stack is 8-byte aligned. Previously, this was enforced on the caller side, but not on the callee side. This fixes the output of OpenCL's printf when given vectors. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: llvm-commits, pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D5433 llvm-svn: 222999
-
Daniel Sanders authored
[mips] Mark aggregates returned in registers with the 'inreg' attribute. Summary: This allows us to easily find them in the backend after the aggregates have been lowered to other types. This is important on big-endian targets using the N32/N64 ABI's since these ABI's must shift small structures into the upper bits of the register. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5005 llvm-svn: 222998
-
- Nov 27, 2014
-
-
Daniel Sanders authored
------------------------------------------------------------------------ r217257 | tomatabacu | 2014-09-05 17:32:09 +0100 (Fri, 05 Sep 2014) | 9 lines [mips] Change Feature-related types from unsigned to uint64_t in MipsAsmParser. No functional changes. Summary: Found a couple of cases where unsigned was still being used. These two should be the last ones in the (entire) Mips backend. Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D5028 ------------------------------------------------------------------------ llvm-svn: 222875
-
- Nov 26, 2014
-
-
Daniel Sanders authored
------------------------------------------------------------------------ r213769 | askrobov | 2014-07-23 18:09:26 +0100 (Wed, 23 Jul 2014) | 6 lines Fix test/Driver/cl-x86-flags.c by providing explicit --target This isn't very neat, but we haven't found any better ways to make this test work with non-X86 default target. ------------------------------------------------------------------------ llvm-svn: 222815
-
- Nov 25, 2014
-
-
Daniel Sanders authored
------------------------------------------------------------------------ r218745 | dsanders | 2014-10-01 09:26:55 +0100 (Wed, 01 Oct 2014) | 7 lines [mips] Fix disassembly of [ls][wd]c[23], cache, and pref Fixes PR21015, and PR20993. Patch by Jun Koi ------------------------------------------------------------------------ llvm-svn: 222696 -
Daniel Sanders authored
------------------------------------------------------------------------ r216262 | sstankovic | 2014-08-22 10:23:22 +0100 (Fri, 22 Aug 2014) | 5 lines [mips] Don't use odd-numbered float registers for double arguments for fastcc calling convention if FP is 64-bit and +nooddspreg is used. Differential Revision: http://reviews.llvm.org/D4981.diff ------------------------------------------------------------------------ llvm-svn: 222695
-
Daniel Sanders authored
------------------------------------------------------------------------ r221453 | tomatabacu | 2014-11-06 14:25:42 +0000 (Thu, 06 Nov 2014) | 17 lines [mips] Tolerate the use of the %z inline asm operand modifier with non-immediates. Summary: Currently, we give an error if %z is used with non-immediates, instead of continuing as if the %z isn't there. For example, you use the %z operand modifier along with the "Jr" constraints ("r" makes the operand a register, and "J" makes it an immediate, but only if its value is 0). In this case, you want the compiler to print "$0" if the inline asm input operand turns out to be an immediate zero and you want it to print the register containing the operand, if it's not. We give an error in the latter case, and we shouldn't (GCC also doesn't). Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6023 ------------------------------------------------------------------------ llvm-svn: 222693 -
Daniel Sanders authored
------------------------------------------------------------------------ r221408 | petarj | 2014-11-05 22:42:31 +0000 (Wed, 05 Nov 2014) | 9 lines [mips64] Fix MIPS64 exception personality encoding Remove dynamic relocations of __gxx_personality_v0 from the .eh_frame. The MIPS64 follow-up of the MIPS32 fix (rL209907). Patch by Vladimir Stefanovic. Differential Revision: http://reviews.llvm.org/D6141 ------------------------------------------------------------------------ llvm-svn: 222692
-
Daniel Sanders authored
------------------------------------------------------------------------ r216920 | samsonov | 2014-09-02 18:49:16 +0100 (Tue, 02 Sep 2014) | 4 lines Fix left shifts of negative values in MipsDisassembler. This bug was reported by UBSan. ------------------------------------------------------------------------ llvm-svn: 222691
-
Daniel Sanders authored
------------------------------------------------------------------------ r217147 | dsanders | 2014-09-04 14:28:14 +0100 (Thu, 04 Sep 2014) | 18 lines [mips] Zero-sized structs cannot be ignored in MipsABIInfo::classifyReturnType() for O32 Summary: They are returned indirectly which causes the other arguments to move to the next argument slot. With this, utils/ABITest does not discover any failing cases in the first 500 attempts on big/little endian for O32. Previously some of these failed. Also tested N32/N64 little endian (big endian has other known issues) with no issues. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: atanasyan, cfe-commits Differential Revision: http://reviews.llvm.org/D4811 ------------------------------------------------------------------------ llvm-svn: 222690
-
Daniel Sanders authored
------------------------------------------------------------------------ r214662 | atanasyan | 2014-08-03 17:11:05 +0100 (Sun, 03 Aug 2014) | 2 lines [Mips] Add the `mips64-linux-gnu` target to the test case to check `in128` type handling. ------------------------------------------------------------------------ llvm-svn: 222689
-
Daniel Sanders authored
------------------------------------------------------------------------ r214025 | atanasyan | 2014-07-26 10:52:21 +0100 (Sat, 26 Jul 2014) | 4 lines [Driver][Mips] Check output of -dynamic-linker arguments by the Clang driver for a couple of MIPS toolchains. No functional changes. ------------------------------------------------------------------------ llvm-svn: 222686
-
- Nov 11, 2014
-
-
Tom Stellard authored
------------------------------------------------------------------------ r220148 | me | 2014-10-18 19:36:12 -0400 (Sat, 18 Oct 2014) | 6 lines New round of fixes for "Always compile debuginfo-tests for the host triple" clang tests were breaking, at least when compiling clang only, from an installed llvm. Make the lit.cfg script deal with the case when we don't have a host_triple available. ------------------------------------------------------------------------ llvm-svn: 221618
-
Tom Stellard authored
------------------------------------------------------------------------ r220112 | me | 2014-10-17 19:50:47 -0400 (Fri, 17 Oct 2014) | 2 lines Fix makefile for debuginfo-tests execution. ------------------------------------------------------------------------ llvm-svn: 221617
-
Tom Stellard authored
------------------------------------------------------------------------ r219989 | me | 2014-10-16 19:41:40 -0400 (Thu, 16 Oct 2014) | 2 lines Added %itanium_abi_host_triple to fix debuginfo-tests when clang is a cross-compiler by default ------------------------------------------------------------------------ llvm-svn: 221616
-
- Nov 06, 2014
-
-
Tom Stellard authored
------------------------------------------------------------------------ r220401 | mail | 2014-10-22 14:18:54 -0400 (Wed, 22 Oct 2014) | 6 lines test: Make this test runnable in directories with @ in their names Jenkins likes to use directories with names involving the '@' character, which breaks the sed expression in this test. Switch to use '|' on the assumption that it's less likely to show up in a path. ------------------------------------------------------------------------ llvm-svn: 221390
-
- Nov 04, 2014
-
-
Hans Wennborg authored
------------------------------------------------------------------------ r220874 | hans | 2014-10-29 14:20:57 -0700 (Wed, 29 Oct 2014) | 3 lines Follow-up to r216619: use isCXXCLassMember() instead of trying to check the context ourselves when selectively allowing late-added dll attributes on unused free functions and variables (PR20746) ------------------------------------------------------------------------ llvm-svn: 221253
-
- Nov 01, 2014
-
-
Tom Stellard authored
llvm-svn: 220990
-
- Sep 30, 2014
-
-
Hans Wennborg authored
------------------------------------------------------------------------ r216619 | hans | 2014-08-27 14:27:40 -0700 (Wed, 27 Aug 2014) | 7 lines Allow adding dll attributes on certain redecls with a warning if the decl hasn't been used yet (PR20746) This shouldn't really be allowed, but it comes up in real code (see PR). As long as the decl hasn't been used there's no technical difficulty in supporting it, so downgrade the error to a warning. Differential Revision: http://reviews.llvm.org/D5087 ------------------------------------------------------------------------ llvm-svn: 218644
-