aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
Commit message (Collapse)AuthorAgeFilesLines
* Add lengthof and endof templates that hide a lot of sizeof computations.Owen Anderson2007-09-073-16/+12
| | | | | | | Patch by Sterling Stein! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41758 91177308-0d34-0410-b5e6-96231b3b80d8
* Next round of APFloat changes.Dale Johannesen2007-09-061-16/+17
| | | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41747 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in X86InstrInfo::convertToThreeAddress that caused it to codegen:Evan Cheng2007-09-061-25/+15
| | | | | | | | | leal (,%rcx,8), %rcx It should be leal (,%rcx,8), %ecx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41735 91177308-0d34-0410-b5e6-96231b3b80d8
* Mac OS X X86-64 ABI is same as the standard.Evan Cheng2007-09-041-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41700 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r41578 with proper fixAnton Korobeynikov2007-09-031-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41680 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for calling functions with byval arguments on x86-64Rafael Espindola2007-08-312-22/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41643 91177308-0d34-0410-b5e6-96231b3b80d8
* Align i64 and f64 at 8 byte on x86-64.Rafael Espindola2007-08-311-6/+12
| | | | | | | | | This is mandated table 3.1 at http://www.x86-64.org/documentation/abi.pdf git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41642 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance APFloat to retain bits of NaNs (fixes oggenc).Dale Johannesen2007-08-312-2/+2
| | | | | | | | Use APFloat interfaces for more references, mostly of ConstantFPSDNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41632 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support to fold X86 load / store instructions. This allow ↵Evan Cheng2007-08-302-49/+99
| | | | | | rematerialized loads to be folded into their uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41599 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark load instructions with isLoad = 1.Evan Cheng2007-08-305-6/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41595 91177308-0d34-0410-b5e6-96231b3b80d8
* Change LegalFPImmediates to use APFloat.Dale Johannesen2007-08-301-5/+5
| | | | | | | | | | Add APFloat interfaces to ConstantFP, SelectionDAG. Fix integer bit in double->APFloat conversion. Convert LegalizeDAG to use APFloat interface in ConstantFPSDNode uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41587 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getX86RegNum into X86RegisterInfo and use itDuncan Sands2007-08-296-88/+80
| | | | | | | | | in the trampoline lowering. Lookup the jump and mov opcodes for the trampoline rather than hard coding them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41577 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment about using libc memset/memcpy or generating inline code.Rafael Espindola2007-08-271-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41502 91177308-0d34-0410-b5e6-96231b3b80d8
* call libc memcpy/memset if array size is bigger then threshold.Rafael Espindola2007-08-271-4/+4
| | | | | | | | | Coping 100MB array (after a warmup) shows that glibc 2.6.1 implementation on x86-64 (core 2) is 30% faster (from 0.270917s to 0.188079s) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41479 91177308-0d34-0410-b5e6-96231b3b80d8
* rename isOperandValidForConstraint to LowerAsmOperandForConstraint, Chris Lattner2007-08-252-22/+39
| | | | | | | | changing the interface to allow for future changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41384 91177308-0d34-0410-b5e6-96231b3b80d8
* add a noteChris Lattner2007-08-241-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41359 91177308-0d34-0410-b5e6-96231b3b80d8
* add some notes on really poor codegen.Chris Lattner2007-08-231-0/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41319 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the PCSymbol for Darwin x86 platforms.Bill Wendling2007-08-221-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41284 91177308-0d34-0410-b5e6-96231b3b80d8
* Use only 1 knob to enable exceptions on Darwin :). Anton Korobeynikov2007-08-211-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41208 91177308-0d34-0410-b5e6-96231b3b80d8
* Partial implementation of calling functions with byval arguments:Rafael Espindola2007-08-201-1/+21
| | | | | | | | *) The needed information is propagated to the DAG *) The X86-64 backend detects it and aborts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41179 91177308-0d34-0410-b5e6-96231b3b80d8
* add a noteChris Lattner2007-08-201-0/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41178 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ReturnAddrIndex variable to X86MachineFunctionInfo structure. This fixedAnton Korobeynikov2007-08-153-14/+24
| | | | | | | hard to catch bugs with retaddr lowering git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41104 91177308-0d34-0410-b5e6-96231b3b80d8
* add a note.Chris Lattner2007-08-151-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41103 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo pointd out by Maarten ter Huurne.Evan Cheng2007-08-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41059 91177308-0d34-0410-b5e6-96231b3b80d8
* When x86 addresses matching exceeds its recursion limit, check toDan Gohman2007-08-131-6/+12
| | | | | | | | see if the base register is already occupied before assuming it can be used. This fixes bogus code generation in the accompanying testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41049 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1607Chris Lattner2007-08-131-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41048 91177308-0d34-0410-b5e6-96231b3b80d8
* expand a noteChris Lattner2007-08-111-3/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41021 91177308-0d34-0410-b5e6-96231b3b80d8
* With evan's explicit flag representation, hopefully we will finally beChris Lattner2007-08-111-1/+1
| | | | | | | | | | | able to 3-addressify away stuff like this: movl %ecx, %eax decl %eax git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41020 91177308-0d34-0410-b5e6-96231b3b80d8
* 64-bit SSSE3 ops that use MMX registers don't require 16-byte alignment.Bill Wendling2007-08-111-6/+21
| | | | | | | Make a 'memop' pattern just for them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41017 91177308-0d34-0410-b5e6-96231b3b80d8
* Use subregs to improve any_extend code generation when feasible.Christopher Lamb2007-08-102-16/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41013 91177308-0d34-0410-b5e6-96231b3b80d8
* Increase efficiency of sign_extend_inreg by using subregisters for ↵Christopher Lamb2007-08-103-49/+89
| | | | | | truncation. As the README suggests sign_extend_subreg is selected to (sext(trunc)). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41010 91177308-0d34-0410-b5e6-96231b3b80d8
* Edit README in light of previous LEA16 commit.Christopher Lamb2007-08-101-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41009 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 2-addr to 3-addr promotion code that allows 32-bit LEA to be used via ↵Christopher Lamb2007-08-101-10/+47
| | | | | | subregisters when 16-bit LEA is disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41007 91177308-0d34-0410-b5e6-96231b3b80d8
* propagate struct size and alignment of byval arguments to the DAGRafael Espindola2007-08-101-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40986 91177308-0d34-0410-b5e6-96231b3b80d8
* For kicks, I though it would be fun to use the correct opcode.Bill Wendling2007-08-101-31/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40985 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding SSSE3 intrinsics.Bill Wendling2007-08-101-17/+284
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40982 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily backing out this change until we know why some dejagnu tests are ↵Evan Cheng2007-08-091-3/+2
| | | | | | failing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40973 91177308-0d34-0410-b5e6-96231b3b80d8
* divb / mulb outputs to ah. Under x86-64 it's not legal to read ah if the ↵Evan Cheng2007-08-092-4/+46
| | | | | | instruction requires a rex prefix (i.e. outputs to r8b, etc.). So issue shift right by 8 on AX and then truncate it to 8 bits instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40972 91177308-0d34-0410-b5e6-96231b3b80d8
* GR16_ sub-register class should be GR8_, not GR8. That is, it should only be ↵Evan Cheng2007-08-091-3/+4
| | | | | | 8-bit registers in 32-bit mode. Ditto for GR32_. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40970 91177308-0d34-0410-b5e6-96231b3b80d8
* long double 9 of N. This finishes up the X86-32 bitsDale Johannesen2007-08-091-1/+13
| | | | | | | | | (constants are still not handled). Adds ConvertActions to control fp-to-fp conversions (these are currently defaulted for all other targets, so no changes there). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40958 91177308-0d34-0410-b5e6-96231b3b80d8
* Long double patch 8 of N: make it partially work inDale Johannesen2007-08-073-100/+100
| | | | | | | | | | | | SSE mode (all but conversions <-> other FP types, I think): >>Do not mark all-80-bit operations as "Requires[FPStack]" (which really means "not SSE"). >>Refactor load-and-extend to facilitate this. >>Update comments. >>Handle long double in SSE when computing FP_REG_KILL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40906 91177308-0d34-0410-b5e6-96231b3b80d8
* Long double patch 7 of N, unless I lost count:). Dale Johannesen2007-08-073-1/+37
| | | | | | | | | Last x87 bits for full functionality (not thoroughly tested, and long doubles do not work in SSE modes at all - use -mcpu=i486 for now) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40886 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace 4-line function with 10-line version per review comment.Dale Johannesen2007-08-061-4/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40881 91177308-0d34-0410-b5e6-96231b3b80d8
* Move lengthy conditional down 1 level per review comment.Dale Johannesen2007-08-062-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40878 91177308-0d34-0410-b5e6-96231b3b80d8
* Get X86 long double calling convention to workDale Johannesen2007-08-064-3/+34
| | | | | | | | (on Darwin, anyway). Fix some table omissions for LD arithmetic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40877 91177308-0d34-0410-b5e6-96231b3b80d8
* Make 80-bit store maintain simulated FP stack correctly.Dale Johannesen2007-08-061-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40868 91177308-0d34-0410-b5e6-96231b3b80d8
* Long double patch 4 of N: initial x87 implementation.Dale Johannesen2007-08-057-6/+148
| | | | | | | Lots of problems yet but some simple things work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40847 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the patch to provide clean intrinsic function overloading support in ↵Chandler Carruth2007-08-041-2/+2
| | | | | | | | | LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future. This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40807 91177308-0d34-0410-b5e6-96231b3b80d8
* Make x86 long double alignment 32 for everything butDale Johannesen2007-08-031-1/+3
| | | | | | | Darwin (which makes size within a struct==96) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40796 91177308-0d34-0410-b5e6-96231b3b80d8
* long double patch 2 of N. Handle it in TargetData.Dale Johannesen2007-08-031-2/+2
| | | | | | | | (I've tried to get the info right for all targets, but I'm not expert on all of them - check yours.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40792 91177308-0d34-0410-b5e6-96231b3b80d8