Jozef Kolek
07bbffd274
[mips][microMIPS] MicroMIPS 16-bit unconditional branch instruction B
...
Implement microMIPS 16-bit unconditional branch instruction B.
Implemented 16-bit microMIPS unconditional instruction has real name B16, and
B is an alias which expands to either B16 or BEQ according to the rules:
b 256 --> b16 256 # R_MICROMIPS_PC10_S1
b 12256 --> beq $zero, $zero, 12256 # R_MICROMIPS_PC16_S1
b label --> beq $zero, $zero, label # R_MICROMIPS_PC16_S1
Differential Revision: http://reviews.llvm.org/D3514
llvm-svn: 226657
2015-01-21 12:39:30 +00:00
Jozef Kolek
dc9fe311f2
Reverted revision 226577.
...
llvm-svn: 226595
2015-01-20 19:29:28 +00:00
Jozef Kolek
ca8263125b
[mips][microMIPS] MicroMIPS 16-bit unconditional branch instruction B
...
Implement microMIPS 16-bit unconditional branch instruction B.
Implemented 16-bit microMIPS unconditional instruction has real name B16, and
B is an alias which expands to either B16 or BEQ according to the rules:
b 256 --> b16 256 # R_MICROMIPS_PC10_S1
b 12256 --> beq $zero, $zero, 12256 # R_MICROMIPS_PC16_S1
b label --> beq $zero, $zero, label # R_MICROMIPS_PC16_S1
Differential Revision: http://reviews.llvm.org/D3514
llvm-svn: 226577
2015-01-20 16:45:27 +00:00
Craig Topper
03e518b16d
Replace several 'assert(false' with 'llvm_unreachable' or fold a condition into the assert.
...
llvm-svn: 225160
2015-01-05 10:15:49 +00:00
Zoran Jovanovic
d72dae73a8
[mips][microMIPS] Implement SWP and LWP instructions
...
Differential Revision: http://reviews.llvm.org/D5667
llvm-svn: 224338
2014-12-16 14:59:10 +00:00
Zoran Jovanovic
15712f82b0
[mips][microMIPS] Implement SWM16 and LWM16 instructions
...
Differential Revision: http://reviews.llvm.org/D5579
llvm-svn: 222901
2014-11-27 18:28:59 +00:00
Zoran Jovanovic
ebf19d975c
[mips][micromips] Implement SWM32 and LWM32 instructions
...
Differential Revision: http://reviews.llvm.org/D5519
llvm-svn: 222367
2014-11-19 16:44:02 +00:00
Benjamin Kramer
da144ed5a2
Canonicalize header guards into a common format.
...
Add header guards to files that were missing guards. Remove #endif comments
as they don't seem common in LLVM (we can easily add them back if we decide
they're useful)
Changes made by clang-tidy with minor tweaks.
llvm-svn: 215558
2014-08-13 16:26:38 +00:00
Zoran Jovanovic
62d7aed204
[mips][mips64r6] Add Relocations R_MIPS_PCHI16, R_MIPS_PCLO16
...
Differential Revision: http://reviews.llvm.org/D3860
llvm-svn: 209659
2014-05-27 14:58:51 +00:00
Tim Northover
3c2cc7a397
TableGen: use PrintMethods to print more aliases
...
llvm-svn: 208607
2014-05-12 18:04:06 +00:00
Craig Topper
adb1afb7c7
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition
...
llvm-svn: 207506
2014-04-29 07:58:02 +00:00
Chandler Carruth
ae889a5f85
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
...
definition below all of the header #include lines, lib/Target/...
edition.
llvm-svn: 206842
2014-04-22 02:41:26 +00:00
Daniel Sanders
22e21a2a24
Revert r205194 - [mips] Removed R_MIPS_GOT. It's identical to R_MIPS_GOT16.
...
There's a couple additional bits I missed.
llvm-svn: 205195
2014-03-31 14:34:36 +00:00
Daniel Sanders
293e334c2f
[mips] Removed R_MIPS_GOT. It's identical to R_MIPS_GOT16.
...
llvm-svn: 205194
2014-03-31 14:30:05 +00:00
Chandler Carruth
cd48c56575
[cleanup] Re-sort all the includes with utils/sort_includes.py.
...
llvm-svn: 202811
2014-03-04 10:07:28 +00:00
Petar Jovanovic
615b3679ca
[mips] Implement %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions
...
Patch implements %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions for MIPS
by creating target expression class MipsMCExpr.
Patch by Sasa Stankovic.
Differential Revision: http://llvm-reviews.chandlerc.com/D2592
llvm-svn: 200783
2014-02-04 18:41:57 +00:00
Reed Kotler
ebfdeaa94e
Distinguish and choose 16 or 32 bit forms of save/restore for Mips16.
...
llvm-svn: 196999
2013-12-11 03:32:44 +00:00
Reed Kotler
cba0ad1234
Cleaning up of prologue/epilogue code for Mips16. First step
...
here is to make save/restore into variable number of argument instructions.
llvm-svn: 196726
2013-12-08 16:51:52 +00:00
NAKAMURA Takumi
99f544b37e
[CMake] Let add_public_tablegen_target responsible to provide dependency to CommonTableGen.
...
add_public_tablegen_target adds *CommonTableGen to LLVM_COMMON_DEPENDS.
LLVM_COMMON_DEPENDS affects add_llvm_library (and other add_target stuff) within its scope.
llvm-svn: 195927
2013-11-28 17:04:04 +00:00
NAKAMURA Takumi
5dbd3bcf3d
[CMake] Prune include_directories() in llvm/lib/Target. add_llvm_target() sets them.
...
llvm-svn: 195921
2013-11-28 14:53:30 +00:00
Daniel Sanders
8e7e5fd076
[mips][msa] Added support for matching splati from normal IR (i.e. not intrinsics)
...
Updated some of the vshf since they (correctly) emit splati's now
llvm-svn: 191511
2013-09-27 11:48:57 +00:00
Daniel Sanders
db41b542e8
[mips][msa] Added support for matching shf from normal IR (i.e. not intrinsics)
...
llvm-svn: 191302
2013-09-24 14:20:00 +00:00
Akira Hatanaka
dec2e8eaf5
[mips] Place parentheses around && to silence warning.
...
llvm-svn: 190234
2013-09-07 00:26:26 +00:00
Akira Hatanaka
e685abb384
[mips] Make "b" (unconditional branch) a pseudo. "b" is an assembly idiom, which is
...
equivalent to "beq $zero, $zero, offset".
llvm-svn: 190220
2013-09-06 23:40:15 +00:00
Akira Hatanaka
297d5670ea
[micromips] Print instruction alias "not" if the last operand of a nor is zero.
...
llvm-svn: 188851
2013-08-21 01:18:46 +00:00
Akira Hatanaka
0eff6770f2
[mips] Delete unnecessary InstAliases. Also, clear some of the InstAlias'
...
EmitAlias flag and have MipsInstPrinter::printAlias print the aliases.
llvm-svn: 187824
2013-08-06 22:35:29 +00:00
Akira Hatanaka
354394e047
[mips] Replace usages of register classes with register operands. Also, remove
...
unnecessary jalr InstAliases in Mips64InstrInfo.td and add the code to print
jalr InstAliases in MipsInstPrinter::printAlias.
llvm-svn: 187821
2013-08-06 22:20:40 +00:00
Akira Hatanaka
00e403d37b
[mips] Define "bal" as a pseudo instruction. Also, fix bug in the InstAlias that
...
turns "bal" into "bgezal".
llvm-svn: 187440
2013-07-30 20:24:24 +00:00
Akira Hatanaka
591151f071
[mips] Add comment and simplify function.
...
llvm-svn: 187371
2013-07-29 19:08:34 +00:00
Akira Hatanaka
35c6208a5a
[mips] Fix FP branch instructions to have explicit FP condition code register
...
operands.
llvm-svn: 187238
2013-07-26 20:13:47 +00:00
Akira Hatanaka
f96ca1bdd3
[mips] Delete register print method MipsInstPrinter::printCPURegs that is not
...
needed. The generic method printOperand will do.
No functionality change.
llvm-svn: 187231
2013-07-26 18:50:42 +00:00
Akira Hatanaka
66dcf905b6
[mips] Print instructions "beq", "bne" and "or" using assembler pseudo
...
instructions "beqz", "bnez" and "move", when possible.
beq $2, $zero, $L1 => beqz $2, $L1
bne $2, $zero, $L1 => bnez $2, $L1
or $2, $3, $zero => move $2, $3
llvm-svn: 187229
2013-07-26 18:34:25 +00:00
Jack Carter
3dfa61ae2c
This patch that sets the EmitAlias flag in td files
...
and enables the instruction printer to print aliased
instructions.
Due to usage of RegisterOperands a change in common
code (utils/TableGen/AsmWriterEmitter.cpp) is required
to get the correct register value if it is a RegisterOperand.
Contributer: Vladimir Medic
llvm-svn: 174358
2013-02-05 08:32:10 +00:00
Jack Carter
d66ed8368e
This patch tackles the problem of parsing Mips
...
register names in the standalone assembler llvm-mc.
Registers such as $A1 can represent either a 32 or
64 bit register based on the instruction using it.
In addition, based on the abi, $T0 can represent different
32 bit registers.
The problem is resolved by the Mips specific AsmParser
td definitions changing to work together. Many cases of
RegisterClass parameters are now RegisterOperand.
Contributer: Vladimir Medic
llvm-svn: 172284
2013-01-12 01:03:14 +00:00
NAKAMURA Takumi
8f3b9c1a45
[CMake] Remove dependencies to intrinsics_gen I introduced in r169724.
...
llvm-svn: 169819
2012-12-11 05:53:54 +00:00
NAKAMURA Takumi
10a9cdfc27
[CMake] Update dependencies to intrinsics_gen corresponding to r169711.
...
llvm-svn: 169724
2012-12-10 05:27:15 +00:00
Akira Hatanaka
0f8303f1e5
[mips] Generate big GOT code.
...
llvm-svn: 168460
2012-11-21 20:40:38 +00:00
Akira Hatanaka
508804a633
Add HIGHER and HIGHEST relocations to Mips backend.
...
llvm-svn: 160599
2012-07-21 03:09:04 +00:00
Akira Hatanaka
af5cc4a41d
Enclose instruction rdhwr with directives, which are needed when target is
...
mips32 rev1 (the directives are emitted when target is mips32r2 too).
llvm-svn: 159770
2012-07-05 19:26:38 +00:00
Benjamin Kramer
bb30e1face
Fix typos found by http://github.com/lyda/misspell-check
...
llvm-svn: 157885
2012-06-02 10:20:22 +00:00
Benjamin Kramer
2f6189e2a5
Move getOpcodeName from the various target InstPrinters into the superclass MCInstPrinter.
...
All implementations used the same code.
llvm-svn: 153866
2012-04-02 08:32:38 +00:00
Craig Topper
fe02cb5e8b
Remove getInstructionName from MCInstPrinter implementations in favor of using the instruction name table from MCInstrInfo. Reduces static data in the InstPrinter implementations.
...
llvm-svn: 153863
2012-04-02 07:01:04 +00:00
Craig Topper
dbc259a436
Make MCInstrInfo available to the MCInstPrinter. This will be used to remove getInstructionName and the static data it contains since the same tables are already in MCInstrInfo.
...
llvm-svn: 153860
2012-04-02 06:09:36 +00:00
Jim Grosbach
2eea383b12
Make MCRegisterInfo available to the the MCInstPrinter.
...
Used to allow context sensitive printing of super-register or sub-register
references.
llvm-svn: 152043
2012-03-05 19:33:20 +00:00
Jia Liu
bdcd314be3
remove blanks, and some code format
...
llvm-svn: 151625
2012-02-28 07:46:26 +00:00
Jia Liu
385123e423
80 columns of Mips InstPrinter Makefile
...
llvm-svn: 151332
2012-02-24 01:47:01 +00:00
Jia Liu
cd92ae4cf2
remove Emacs-tag form .cpp files in Mips Backend, and fix some typo.
...
llvm-svn: 150805
2012-02-17 08:55:11 +00:00
Jia Liu
ecc08b8cfe
add Emacs tag and fix some comment error in file headers
...
llvm-svn: 150775
2012-02-17 01:23:50 +00:00
Craig Topper
11bcb12b5e
Convert assert(0) to llvm_unreachable
...
llvm-svn: 149961
2012-02-07 02:50:20 +00:00
Akira Hatanaka
5ac6df52af
Tidy up. Simplify logic. No functional change intended.
...
llvm-svn: 146896
2011-12-19 19:52:25 +00:00