mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
db8552c834
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
11 lines
389 B
ArmAsm
11 lines
389 B
ArmAsm
# RUN: not llvm-mc %s -triple=mipsel-unknown-linux -mcpu=mips32r2 -arch=mips -mattr=+micromips 2>&1 -filetype=obj | FileCheck %s
|
|
#
|
|
# CHECK: LLVM ERROR: out of range PC16 fixup
|
|
|
|
.text
|
|
b foo
|
|
.space 65536 - 6, 1 # -6 = size of b instr plus size of automatically inserted nop
|
|
nop # This instr makes the branch too long to fit into a 17-bit offset
|
|
foo:
|
|
add $0,$0,$0
|