summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16/PIC16ISelLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid compiler warning (in -Asserts mode)Daniel Dunbar2009-08-041-2/+2
| | | | llvm-svn: 78070
* switch off of 'Section' onto MCSection. We're not properly usingChris Lattner2009-07-311-1/+1
| | | | | | MCSection subclasses yet, but this is a step in the right direction. llvm-svn: 77708
* define target names for std libcalls.Sanjiv Gupta2009-07-311-5/+32
| | | | llvm-svn: 77667
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+2
| | | | llvm-svn: 77516
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-281-2/+2
| | | | | | | | | | | | | | | | | | | | it is highly specific to the object file that will be generated in the end, this introduces a new TargetLoweringObjectFile interface that is implemented for each of ELF/MachO/COFF/Alpha/PIC16 and XCore. Though still is still a brutal and ugly refactoring, this is a major step towards goodness. This patch also: 1. fixes a bunch of dangling pointer problems in the PIC16 backend. 2. disables the TargetLowering copy ctor which PIC16 was accidentally using. 3. gets us closer to xcore having its own crazy target section flags and pic16 not having to shadow sections with its own objects. 4. fixes wierdness where ELF targets would set CStringSection but not CStringSection_. Factor the code better. 5. fixes some bugs in string lowering on ELF targets. llvm-svn: 77294
* Generate a libcall for i8 multiply.Sanjiv Gupta2009-07-271-0/+15
| | | | llvm-svn: 77179
* fixed incorrect lowering of ISD::SUB node. SUB has only one result value.Sanjiv Gupta2009-07-271-5/+14
| | | | | | It wasn't caught during tests because we never got a sub generated, (i8 was always getting promoted to int, which in turn was broken into subc/sube). Though the optimizer leaves an i8 sub now. llvm-svn: 77178
* Remove shift amount flavor. It isn't actually complete enough to Eli Friedman2009-07-211-1/+0
| | | | | | | | be useful, and it's currently unused. (Some issues: it isn't actually rich enough to capture the semantics on many architectures, and semantics can vary depending on the type being shifted.) llvm-svn: 76633
* Remove some unnecessary expansion markings. Add a few expansion Eli Friedman2009-07-171-24/+7
| | | | | | markings that show up in test/CodeGen/Generic. llvm-svn: 76160
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-2/+2
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-1/+1
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-091-2/+2
| | | | llvm-svn: 75153
* Convert more abort() calls to llvm_report_error().Torok Edwin2009-07-081-2/+2
| | | | | | Also remove trailing semicolon. llvm-svn: 75027
* For extended loads of type i1 to i8, we will need to at least one byte from ↵Sanjiv Gupta2009-07-031-1/+5
| | | | | | | | memory. The change in the .td file is to mark the side effects of mov insn. llvm-svn: 74768
* Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed ↵Tilmann Scheller2009-07-031-2/+3
| | | | | | | | | | | arguments in a vararg call. With the SVR4 ABI on PowerPC, vector arguments for vararg calls are passed differently depending on whether they are a fixed or a variable argument. Variable vector arguments always go into memory, fixed vector arguments are put into vector registers. If there are no free vector registers available, fixed vector arguments are put on the stack. The NumFixedArgs attribute allows to decide for an argument in a vararg call whether it belongs to the fixed or variable portion of the parameter list. llvm-svn: 74764
* Added floating point conditional operations support via libcalls.Sanjiv Gupta2009-06-251-0/+29
| | | | llvm-svn: 74187
* Fold the add (ptr, offset) into ptr[offset] only if the offset is small ↵Sanjiv Gupta2009-06-231-2/+4
| | | | | | enough. movwi and moviw allow value of 5-bits only (i.e. 32). llvm-svn: 73953
* Added missing libcalls for floating point to int conversions.Sanjiv Gupta2009-06-161-7/+59
| | | | llvm-svn: 73491
* Generate libcalls for floating point arithmetic and casting operations.Sanjiv Gupta2009-06-111-1/+22
| | | | llvm-svn: 73194
* Lower i16/i32 sdiv/udiv/srem/urem using libcalls.Sanjiv Gupta2009-06-051-0/+24
| | | | llvm-svn: 72942
* Remove unused code.Sanjiv Gupta2009-06-041-10/+0
| | | | llvm-svn: 72866
* Custom lower SUB with two register operands.Sanjiv Gupta2009-06-041-0/+1
| | | | llvm-svn: 72861
* Make the buildbot see green (to make it easier to spot the next personMike Stump2009-06-031-1/+2
| | | | | | that puts a new warning in). llvm-svn: 72797
* FrameIndex could be used as a value (addressof (arg)) or as an address.Sanjiv Gupta2009-06-031-2/+25
| | | | | | | Expand it exactly like GlobalAddress. Fix some more crashes (InsertBranch() not being implemented) for compiling hitec libs. llvm-svn: 72776
* Fixed a bug in which signed comparisons were being used instead of unsigned ↵Sanjiv Gupta2009-06-031-2/+2
| | | | | | comparisons. llvm-svn: 72771
* Comment grammaro/clarification.Dale Johannesen2009-06-011-2/+2
| | | | llvm-svn: 72706
* Untabification.Bill Wendling2009-05-301-1/+1
| | | | llvm-svn: 72604
* Fixing problems that got exposed after the refactoring of LegalizeDAG done ↵Sanjiv Gupta2009-05-281-4/+2
| | | | | | in 72447. llvm-svn: 72521
* Fix more naming issues.Sanjiv Gupta2009-05-111-12/+44
| | | | | | | compiler libcalls start with .lib. now. fixed section names. llvm-svn: 71424
* Changed lowering and asmprinter to use ABI Names class called PAN.Sanjiv Gupta2009-05-101-27/+20
| | | | llvm-svn: 71386
* Use 16 bit arithmetic while retrieving the address of callee's frame during ↵Sanjiv Gupta2009-05-091-7/+16
| | | | | | indirect function calls, and set pclath before every call to retrieve the frame address. llvm-svn: 71323
* Emit banksel and movlp instructions.Sanjiv Gupta2009-05-061-8/+8
| | | | | | | Split large global data (both initialized and un-initialized) into multiple sections of <= 80 bytes. Provide routines to manage PIC16 ABI naming conventions. llvm-svn: 71073
* Add a public method called getAddressSpace() to the GlobalAddressSDNode.Sanjiv Gupta2009-04-291-2/+1
| | | | llvm-svn: 70366
* GlobalValue is always pointer type, so an assert isn't required.Sanjiv Gupta2009-04-281-6/+1
| | | | llvm-svn: 70300
* Make the function begin label start after ther data pointer.Sanjiv Gupta2009-04-221-7/+9
| | | | | | The address of data frame for function can be obtained by subtracting 2 from the function begin label. llvm-svn: 69801
* Handle direct aggregate type arguments.Sanjiv Gupta2009-04-211-50/+30
| | | | llvm-svn: 69665
* Handle aggregate type arguments to direct and indirect calls.Sanjiv Gupta2009-04-141-24/+71
| | | | llvm-svn: 69022
* While passing arg of types larger than char only one byte at lower end was ↵Sanjiv Gupta2009-04-131-1/+1
| | | | | | getting passed. We couldn't catch this as we did not have tests that were passing an int value larger than 256. llvm-svn: 68946
* Added code to handle spilling and reloading of FSRs.Sanjiv Gupta2009-04-101-4/+5
| | | | llvm-svn: 68783
* Arguments to indirect calls were being passed incorrectly. They are not ↵Sanjiv Gupta2009-04-091-2/+6
| | | | | | fixed to start after return value. llvm-svn: 68705
* r68576 unconverd a bug in PIC16 port (Thanks to Dan Gohman) where we were ↵Sanjiv Gupta2009-04-091-5/+10
| | | | | | custom lowering an ADD to ADDC. llvm-svn: 68671
* Emit .line debug directives for stoppoints. The debug location is retrieved ↵Sanjiv Gupta2009-04-081-14/+0
| | | | | | by the MachineInstr itself, rather than by custom handling the DBG_STOPPOINT nodes. llvm-svn: 68602
* Handle indirect function calls.Sanjiv Gupta2009-04-081-72/+258
| | | | | | | Every function has the address of its frame in the beginning of code section. The frame address is retrieved and used to pass arguments. llvm-svn: 68597
* Map stack based frameindices for spills to zero based indices that can be ↵Sanjiv Gupta2009-04-061-18/+36
| | | | | | accessed based on an external symbol defining the location of temporary data for a function. For example: we have spill slots addressed as foo.tmp + 0, foo.tmp + 1 etc. llvm-svn: 68442
* Fixed build warnings.Sanjiv Gupta2009-04-021-2/+0
| | | | llvm-svn: 68333
* To convert the StopPoint insn into an assembler directive by ISel, we need ↵Sanjiv Gupta2009-04-021-0/+14
| | | | | | to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize. llvm-svn: 68329
* Params are not being generated as static globals now. The caller passes them ↵Sanjiv Gupta2009-04-021-13/+91
| | | | | | onto the callee's stack directly and the callee loads the argvals from its own stack. Clang generated frameindexes validatd by recalculating the stack as if all frameindexes represent 1-byte slots. llvm-svn: 68327
* Fixed comment for libcalls.Sanjiv Gupta2009-03-201-20/+23
| | | | llvm-svn: 67373
* Reformatting. Inserted code comments. Cleaned interfaces.Sanjiv Gupta2009-03-201-98/+68
| | | | | | Removed unncessary code. No functionality change. llvm-svn: 67371
* Remove refs to non-DebugLoc version of BuildMI from XCore, PIC16.Dale Johannesen2009-02-131-2/+3
| | | | llvm-svn: 64432
OpenPOWER on IntegriCloud