diff options
author | Jozef Kolek <jozef.kolek@imgtec.com> | 2015-01-21 12:39:30 +0000 |
---|---|---|
committer | Jozef Kolek <jozef.kolek@imgtec.com> | 2015-01-21 12:39:30 +0000 |
commit | db8552c8340546d687c7f8c3127b845315eafde5 (patch) | |
tree | a52b49cb1ebe845c92c69b7f6ffdde47e871a570 /test/MC/Mips/micromips-branch-instructions.s | |
parent | 16dbcd741fc8c81f899ab6c84e8febb674d987ac (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/Mips/micromips-branch-instructions.s')
-rw-r--r-- | test/MC/Mips/micromips-branch-instructions.s | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/MC/Mips/micromips-branch-instructions.s b/test/MC/Mips/micromips-branch-instructions.s index d1e78988901..e85b92521ea 100644 --- a/test/MC/Mips/micromips-branch-instructions.s +++ b/test/MC/Mips/micromips-branch-instructions.s @@ -9,8 +9,8 @@ #------------------------------------------------------------------------------ # Little endian #------------------------------------------------------------------------------ -# CHECK-EL: b 1332 # encoding: [0x00,0x94,0x9a,0x02] -# CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00] +# CHECK-EL: b 1332 # encoding: [0x00,0x94,0x9a,0x02] +# CHECK-EL: nop # encoding: [0x00,0x0c] # CHECK-EL: beq $9, $6, 1332 # encoding: [0xc9,0x94,0x9a,0x02] # CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00] # CHECK-EL: bgez $6, 1332 # encoding: [0x46,0x40,0x9a,0x02] @@ -36,8 +36,8 @@ #------------------------------------------------------------------------------ # Big endian #------------------------------------------------------------------------------ -# CHECK-EB: b 1332 # encoding: [0x94,0x00,0x02,0x9a] -# CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00] +# CHECK-EB: b 1332 # encoding: [0x94,0x00,0x02,0x9a] +# CHECK-EB: nop # encoding: [0x0c,0x00] # CHECK-EB: beq $9, $6, 1332 # encoding: [0x94,0xc9,0x02,0x9a] # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00] # CHECK-EB: bgez $6, 1332 # encoding: [0x40,0x46,0x02,0x9a] @@ -61,6 +61,10 @@ # CHECK-EB: bltzals $6, 1332 # encoding: [0x42,0x26,0x02,0x9a] # CHECK-EB: nop # encoding: [0x0c,0x00] + .text + .type main, @function + .set micromips +main: b 1332 beq $9,$6,1332 bgez $6,1332 |