summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc
Commit message (Collapse)AuthorAgeFilesLines
...
* The Mips specific relocation R_MIPS_GOT_DISP Jack Carter2012-07-134-4/+12
| | | | | | | | | | is used in cases where global symbols are directly represented in the GOT and we use an offset into the global offset table. This patch adds direct object support for R_MIPS_GOT_DISP. llvm-svn: 160183
* Patch for Mips direct object generation.Jack Carter2012-07-111-0/+8
| | | | | | | | | | | | | | | | | When WriteFragmentData() case FT_align called Asm.getBackend().writeNopData() is called, nothing is done since Mips implementation of writeNopData just returned "true". For some reason this has not caused problems in 32 bit mode, but in 64 bit mode it caused an assert when processing multiple function units. The test case included will assert without this patch. It runs twice with different flags to prevent false positives due to changes in code generation over time. llvm-svn: 160084
* Pass the correct ELFOSABI enumeration to the MipsELFObjectWriter constructorJack Carter2012-07-021-1/+2
| | | | | Contributer: Sasa Stankovic llvm-svn: 159574
* This allows hello world to be compiled for Mips 64 direct object.Jack Carter2012-06-274-3/+54
| | | | | | | | | | | It takes advantage of r159299 which introduces relocation support for N64. elf-dump needed to be upgraded to support N64 relocations as well. This passes make check. Jack llvm-svn: 159301
* The ELF relocation record format is different for N64 Jack Carter2012-06-271-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which many Mips 64 ABIs use than for O64 which many if not all other target ABIs use. Most architectures have the following 64 bit relocation record format: typedef struct { Elf64_Addr r_offset; /* Address of reference */ Elf64_Xword r_info; /* Symbol index and type of relocation */ } Elf64_Rel; typedef struct { Elf64_Addr r_offset; Elf64_Xword r_info; Elf64_Sxword r_addend; } Elf64_Rela; Whereas N64 has the following format: typedef struct { Elf64_Addr r_offset;/* Address of reference */ Elf64_Word r_sym; /* Symbol index */ Elf64_Byte r_ssym; /* Special symbol */ Elf64_Byte r_type3; /* Relocation type */ Elf64_Byte r_type2; /* Relocation type */ Elf64_Byte r_type; /* Relocation type */ } Elf64_Rel; typedef struct { Elf64_Addr r_offset;/* Address of reference */ Elf64_Word r_sym; /* Symbol index */ Elf64_Byte r_ssym; /* Special symbol */ Elf64_Byte r_type3; /* Relocation type */ Elf64_Byte r_type2; /* Relocation type */ Elf64_Byte r_type; /* Relocation type */ Elf64_Sxword r_addend; } Elf64_Rela; The structure is the same size, but the r_info data element is now 5 separate elements. Besides the content aspects, endian byte reordering will be different for the area with each element being endianized separately. I treat this as generic and continue to pass r_type as an integer masking and unmasking the byte sized N64 values for N64 mode. I've implemented this and it causes no affect on other current targets. This passes make check. Jack llvm-svn: 159299
* Fix coding style violations. Remove white spaces and tabs.Akira Hatanaka2012-06-143-4/+5
| | | | llvm-svn: 158471
* Test commitJack Carter2012-06-091-0/+1
| | | | llvm-svn: 158250
* Allow MCCodeEmitter access to the target MCRegisterInfo.Jim Grosbach2012-05-152-0/+5
| | | | | | | | Add the MCRegisterInfo to the factories and constructors. Patch by Tom Stellard <Tom.Stellard@amd.com>. llvm-svn: 156828
* Remove some potential warnings about variables used uninitialized.Bill Wendling2012-04-221-1/+1
| | | | llvm-svn: 155307
* Add disassembler to MIPS. Akira Hatanaka2012-04-171-1/+40
| | | | | | Patch by Vladimir Medic. llvm-svn: 154935
* Do not add offset in applyFixup. This has already been accounted for in Value. Akira Hatanaka2012-04-161-4/+2
| | | | llvm-svn: 154838
* Revert r153924. There were buildbot failures.Akira Hatanaka2012-04-031-40/+1
| | | | llvm-svn: 153925
* MIPS disassembler support.Akira Hatanaka2012-04-031-1/+40
| | | | | | Patch by Vladimir Medic. llvm-svn: 153924
* Initial 64 bit direct object support.Akira Hatanaka2012-04-024-23/+49
| | | | | | | | | | | This patch allows llvm to recognize that a 64 bit object file is being produced and that the subsequently generated ELF header has the correct information. The test case checks for both big and little endian flavors. Patch by Jack Carter. llvm-svn: 153889
* Make MCInstrInfo available to the MCInstPrinter. This will be used to remove ↵Craig Topper2012-04-021-1/+2
| | | | | | getInstructionName and the static data it contains since the same tables are already in MCInstrInfo. llvm-svn: 153860
* Select static relocation model if it is jitting.Akira Hatanaka2012-03-311-1/+3
| | | | llvm-svn: 153795
* Sort relocation entries before they are written out to a file. MIPS ABIAkira Hatanaka2012-03-281-0/+103
| | | | | | | imposes a constraint that GOT16 referring to a local symbol or HI16 has to be followed immediately by a matching LO16 relocation. llvm-svn: 153553
* Prune some includesCraig Topper2012-03-271-1/+1
| | | | llvm-svn: 153502
* Retrieve and add the offset of a symbol in applyFixup rather than retrieve andAkira Hatanaka2012-03-272-67/+67
| | | | | | | set it in MipsMCCodeEmitter::getMachineOpValue. Assert in getMachineOpValue if MachineOperand MO is of an unexpected type. llvm-svn: 153494
* Define function MipsGetSymAndOffset which returns a fixup's symbol and theAkira Hatanaka2012-03-271-0/+30
| | | | | | offset applied to it. llvm-svn: 153493
* Rewrite computation of Value in adjustFixupValue so that the upper 48-bits areAkira Hatanaka2012-03-271-1/+1
| | | | | | cleared. No functionality change. llvm-svn: 153491
* Prune some includes and forward declarations.Craig Topper2012-03-261-7/+1
| | | | llvm-svn: 153429
* Add typecast to silence -Wswitch warning introduced by r153153.Craig Topper2012-03-211-1/+1
| | | | llvm-svn: 153155
* Incremental big endian patch by Jack Carter.Akira Hatanaka2012-03-212-13/+30
| | | | | | | | These changes allow us to compile big endian from the command line for 32 bit Mips targets. This patch will result in code and data actually being produced in the correct endianess. llvm-svn: 153153
* Make MCRegisterInfo available to the the MCInstPrinter.Jim Grosbach2012-03-051-1/+2
| | | | | | | Used to allow context sensitive printing of super-register or sub-register references. llvm-svn: 152043
* Pass endian information to constructors. Define separate functions to createAkira Hatanaka2012-03-015-57/+55
| | | | | | | | objects for big endian and little endian targets. Patch by Jack Carter. llvm-svn: 151788
* remove blanks, and some code formatJia Liu2012-02-282-2/+2
| | | | llvm-svn: 151625
* comment fixJia Liu2012-02-241-1/+1
| | | | llvm-svn: 151341
* some comment fixJia Liu2012-02-241-3/+3
| | | | llvm-svn: 151340
* replace a balnk with -Jia Liu2012-02-241-1/+1
| | | | llvm-svn: 151337
* remove Emacs-tag form .cpp files in Mips Backend, and fix some typo.Jia Liu2012-02-176-6/+6
| | | | llvm-svn: 150805
* add Emacs tag and fix some comment error in file headersJia Liu2012-02-176-6/+6
| | | | llvm-svn: 150775
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-051-0/+1
| | | | llvm-svn: 149814
* Add a new MachineJumpTableInfo entry type, EK_GPRel64BlockAddress, which isAkira Hatanaka2012-02-031-0/+1
| | | | | | | | needed to emit a 64-bit gp-relative relocation entry. Make changes necessary for emitting jump tables which have entries with directive .gpdword. This patch does not implement the parts needed for direct object emission or JIT. llvm-svn: 149668
* Ensure .AliasedSymbol() is called on all uses of getSymbol(). Affects ARM ↵James Molloy2012-01-281-1/+1
| | | | | | | | and MIPS ELF backends. Fixes PR11877 llvm-svn: 149180
* Widen the instruction encoder that TblGen emits to a 64 bits, which should ↵Owen Anderson2012-01-241-1/+1
| | | | | | accomodate every target I can think of offhand. llvm-svn: 148833
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-202-3/+0
| | | | llvm-svn: 148578
* Tidy up. MCAsmBackend naming conventions.Jim Grosbach2012-01-181-4/+4
| | | | llvm-svn: 148400
* Add big endian mips support. Based on a patch by Jack Carter.Rafael Espindola2012-01-113-16/+20
| | | | llvm-svn: 147924
* Move the Mips only bits of the ELF writer to lib/Target/Mips.Rafael Espindola2011-12-224-21/+145
| | | | llvm-svn: 147133
* Local dynamic TLS model for direct object output. Create the correct TLS MIPSAkira Hatanaka2011-12-223-0/+22
| | | | | | | | ELF relocations. Patch by Jack Carter. llvm-svn: 147118
* Reduce the exposure of Triple::OSType in the ELF object writer. This willRafael Espindola2011-12-211-11/+12
| | | | | | | avoid including ADT/Triple.h in many places when the target specific bits are moved. llvm-svn: 147059
* 64-bit data directive.Akira Hatanaka2011-12-201-1/+1
| | | | llvm-svn: 147005
* Unweaken vtables as per ↵David Blaikie2011-12-202-0/+3
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
* Tidy up. Simplify logic. No functional change intended.Akira Hatanaka2011-12-191-1/+2
| | | | llvm-svn: 146896
* Add support for local dynamic TLS model in LowerGlobalTLSAddress. Direct objectAkira Hatanaka2011-12-141-0/+7
| | | | | | | emission is not supported yet, but a patch that adds the support should follow soon. llvm-svn: 146572
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | llvm-svn: 146409
* Variable cleanup. Based on past patch submittals variable names haveBruno Cardoso Lopes2011-12-072-55/+60
| | | | | | | been normalized and more descriptive comments added. Patch by Reed Kotler and Jack Carter. llvm-svn: 146088
* Add a few moreLocal/Global R_MIPS_GOT related fixups andBruno Cardoso Lopes2011-12-074-46/+43
| | | | | | | | make the addend fixup code a bit more generic Patch by Jack Carter. llvm-svn: 145998
* Add register HWR29 numbering. Patch by Jack CarterBruno Cardoso Lopes2011-12-061-0/+1
| | | | llvm-svn: 145910
OpenPOWER on IntegriCloud