diff options
author | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-08-11 08:56:25 +0000 |
---|---|---|
committer | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-08-11 08:56:25 +0000 |
commit | 1c78ca6a09cec862d6aad04e820dae98b71be9fc (patch) | |
tree | ef6def2a0475fbea2672cf161260dc2830857755 /llvm/test/MC/Disassembler/Mips/mips3 | |
parent | 7337ee23d8ee9864d6b5f4140aaa56cf68388361 (diff) | |
download | bcm5719-llvm-1c78ca6a09cec862d6aad04e820dae98b71be9fc.tar.gz bcm5719-llvm-1c78ca6a09cec862d6aad04e820dae98b71be9fc.zip |
[mips] Remap move as or.
Summary:
This patch remaps the assembly idiom 'move' to 'or' instead of 'daddu' or
'addu'. The use of addu/daddu instead of or as move was highlighted as a
performance issue during the analysis of a recent 64bit design. Originally
move was encoded as 'or' by binutils but was changed for the r10k cpu family
due to their pipeline which had 2 arithmetic units and a single logical unit,
and so could issue multiple (d)addu based moves at the same time but only 1
logical move.
This patch preserves the disassembly behaviour so that disassembling a old style
(d)addu move still appears as move, but assembling move always gives an or
Patch by Simon Dardis.
Reviewers: vkalintiris
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11796
llvm-svn: 244579
Diffstat (limited to 'llvm/test/MC/Disassembler/Mips/mips3')
-rw-r--r-- | llvm/test/MC/Disassembler/Mips/mips3/valid-mips3-el.txt | 2 | ||||
-rw-r--r-- | llvm/test/MC/Disassembler/Mips/mips3/valid-mips3.txt | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/MC/Disassembler/Mips/mips3/valid-mips3-el.txt b/llvm/test/MC/Disassembler/Mips/mips3/valid-mips3-el.txt index 98ce16bb742..6ffe7748e95 100644 --- a/llvm/test/MC/Disassembler/Mips/mips3/valid-mips3-el.txt +++ b/llvm/test/MC/Disassembler/Mips/mips3/valid-mips3-el.txt @@ -118,6 +118,8 @@ 0x86 0xd8 0x00 0x46 # CHECK: mov.s $f2, $f27 0x21 0xf0 0x80 0x00 # CHECK: move $fp, $4 0x21 0xc8 0xc0 0x00 # CHECK: move $25, $6 +0x25 0xf0 0x80 0x00 # CHECK: move $fp, $4 +0x25 0xc8 0xc0 0x00 # CHECK: move $25, $6 0x00 0x48 0x9e 0x44 # CHECK: mtc1 $fp, $f9 0x11 0x00 0x20 0x02 # CHECK: mthi $17 0x13 0x00 0xa0 0x03 # CHECK: mtlo $sp diff --git a/llvm/test/MC/Disassembler/Mips/mips3/valid-mips3.txt b/llvm/test/MC/Disassembler/Mips/mips3/valid-mips3.txt index 2a38b19092f..81888588e69 100644 --- a/llvm/test/MC/Disassembler/Mips/mips3/valid-mips3.txt +++ b/llvm/test/MC/Disassembler/Mips/mips3/valid-mips3.txt @@ -35,6 +35,8 @@ 0x00 0x4c 0xb8 0x24 # CHECK: and $23, $2, $12 0x00 0x53 0x21 0x72 # CHECK: tlt $2, $19, 133 0x00 0x80 0xf0 0x21 # CHECK: move $fp, $4 +0x00 0x80 0xf0 0x25 # CHECK: move $fp, $4 +0x00 0x80 0xf0 0x2d # CHECK: move $fp, $4 0x00 0x86 0x48 0x21 # CHECK: addu $9, $4, $6 0x00 0x94 0xc8 0x06 # CHECK: srlv $25, $20, $4 0x00 0x94 0xc8 0x06 # CHECK: srlv $25, $20, $4 @@ -44,6 +46,8 @@ 0x00 0xb3 0x55 0x30 # CHECK: tge $5, $19, 340 0x00 0xba 0x28 0x2f # CHECK: dsubu $5, $5, $26 0x00 0xc0 0xc8 0x21 # CHECK: move $25, $6 +0x00 0xc0 0xc8 0x25 # CHECK: move $25, $6 +0x00 0xc0 0xc8 0x2d # CHECK: move $25, $6 0x00 0xd1 0x00 0x36 # CHECK: tne $6, $17 0x00 0xe8 0xdd 0x76 # CHECK: tne $7, $8, 885 0x00 0xea 0x00 0x30 # CHECK: tge $7, $10 |