summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Generate compact unwind encoding from CFI directives.Bill Wendling2013-09-091-4/+12
| | | | | | | | | | | | | | | We used to generate the compact unwind encoding from the machine instructions. However, this had the problem that if the user used `-save-temps' or compiled their hand-written `.s' file (with CFI directives), we wouldn't generate the compact unwind encoding. Move the algorithm that generates the compact unwind encoding into the MCAsmBackend. This way we can generate the encoding whether the code is from a `.ll' or `.s' file. <rdar://problem/13623355> llvm-svn: 190290
* This patch produces the correct addend value forJack Carter2013-01-081-0/+1
| | | | | | | | an R_MIPS_GPREL16 relocation. Contributer: Jack Carter llvm-svn: 171882
* Renamed MCInstFragment to MCRelaxableFragment and added some comments.Eli Bendersky2013-01-081-1/+1
| | | | | | No change in functionality. llvm-svn: 171822
* Mips direct object xgot supportJack Carter2012-11-211-1/+9
| | | | | | | | | | | | | | This patch provides support for the MIPS relocations: *) R_MIPS_GOT_HI16 *) R_MIPS_GOT_LO16 *) R_MIPS_CALL_HI16 *) R_MIPS_CALL_LO16 These are used for large GOT instruction sequences. Contributer: Jack Carter llvm-svn: 168471
* When creating MCAsmBackend pass the CPU string as well. In X86AsmBackendRoman Divacky2012-09-181-4/+8
| | | | | | | | | store this and use it to not emit long nops when the CPU is geode which doesnt support them. Fixes PR11212. llvm-svn: 164132
* Fix Doxygen issues:Dmitri Gribenko2012-09-141-1/+1
| | | | | | | | | | * wrap code blocks in \code ... \endcode; * refer to parameter names in paragraphs correctly (\arg is not what most people want -- it starts a new paragraph); * use \param instead of \arg to document parameters in order to be consistent with the rest of the codebase. llvm-svn: 163902
* Fix a couple of Doxygen comment issues pointed out by -Wdocumentation.Dmitri Gribenko2012-09-121-1/+1
| | | | llvm-svn: 163721
* Mips relocation R_MIPS_64 relocates a 64 bit double word.Jack Carter2012-08-071-0/+1
| | | | | | | | I hit this in a very large program (spirit.cpp), but have not figured out how to make a small make check test for it. llvm-svn: 161366
* Mips relocations R_MIPS_HIGHER and R_MIPS_HIGHEST.Jack Carter2012-08-061-2/+12
| | | | | | | | | | | | | | These 2 relocations gain access to the highest and the second highest 16 bits of a 64 bit object. R_MIPS_HIGHER %higher(A+S) The %higher(x) function is [ (((long long) x + 0x80008000LL) >> 32) & 0xffff ]. R_MIPS_HIGHEST %highest(A+S) The %highest(x) function is [ (((long long) x + 0x800080008000LL) >> 48) & 0xffff ]. llvm-svn: 161348
* The Mips specific relocation R_MIPS_GOT_DISP Jack Carter2012-07-131-1/+3
| | | | | | | | | | 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-271-1/+9
| | | | | | | | | | | 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
* Fix coding style violations. Remove white spaces and tabs.Akira Hatanaka2012-06-141-1/+2
| | | | llvm-svn: 158471
* Do not add offset in applyFixup. This has already been accounted for in Value. Akira Hatanaka2012-04-161-4/+2
| | | | llvm-svn: 154838
* Initial 64 bit direct object support.Akira Hatanaka2012-04-021-8/+21
| | | | | | | | | | | 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
* Retrieve and add the offset of a symbol in applyFixup rather than retrieve andAkira Hatanaka2012-03-271-2/+4
| | | | | | | set it in MipsMCCodeEmitter::getMachineOpValue. Assert in getMachineOpValue if MachineOperand MO is of an unexpected type. llvm-svn: 153494
* 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-211-10/+27
| | | | | | | | 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
* Pass endian information to constructors. Define separate functions to createAkira Hatanaka2012-03-011-28/+16
| | | | | | | | objects for big endian and little endian targets. Patch by Jack Carter. llvm-svn: 151788
* remove blanks, and some code formatJia Liu2012-02-281-1/+1
| | | | llvm-svn: 151625
* remove Emacs-tag form .cpp files in Mips Backend, and fix some typo.Jia Liu2012-02-171-1/+1
| | | | llvm-svn: 150805
* add Emacs tag and fix some comment error in file headersJia Liu2012-02-171-1/+1
| | | | llvm-svn: 150775
* 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-111-11/+10
| | | | llvm-svn: 147924
* Move the Mips only bits of the ELF writer to lib/Target/Mips.Rafael Espindola2011-12-221-21/+2
| | | | llvm-svn: 147133
* Local dynamic TLS model for direct object output. Create the correct TLS MIPSAkira Hatanaka2011-12-221-0/+3
| | | | | | | | 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
* Add a few moreLocal/Global R_MIPS_GOT related fixups andBruno Cardoso Lopes2011-12-071-42/+32
| | | | | | | | make the addend fixup code a bit more generic Patch by Jack Carter. llvm-svn: 145998
* MipsAsmBackend.cpp, PPCAsmBackend.cpp: Fix -Asserts build to appease msvc.NAKAMURA Takumi2011-12-061-0/+1
| | | | llvm-svn: 145894
* Move target-specific logic out of generic MCAssembler.Jim Grosbach2011-12-061-0/+10
| | | | | | | | Whether a fixup needs relaxation for the associated instruction is a target-specific function, as the FIXME indicated. Create a hook for that and use it. llvm-svn: 145881
* This patch addresses gp relative fixups/relocations for jump tables.Akira Hatanaka2011-11-231-1/+7
| | | | llvm-svn: 145112
* Mips MC object code emission improvements:Bruno Cardoso Lopes2011-11-111-16/+131
| | | | | | | | | | "With this patch we can now generate runnable Mips code through LLVM direct object emission. We have run numerous simple programs, both C and C++ and with -O0 and -O3 from the output. The code is not production ready, but quite useful for experimentation." Patch and message by Jack Carter llvm-svn: 144414
* Register Asm backend. Add functions to MipsAsmBackend.Akira Hatanaka2011-09-301-0/+46
| | | | | | Patch by Reed Kotler at Mips Technologies. llvm-svn: 140886
* Add MCELFObjectTargetWriter and MCAsmBackend classes.Akira Hatanaka2011-09-301-0/+71
Patch by Reed Kotler at Mips Technologies. llvm-svn: 140885
OpenPOWER on IntegriCloud