MIPS: Verify the ISA mode and alignment of branch and jump targets
[external/binutils.git] / ld / testsuite / ld-mips-elf / undefweak-overflow.s
1 # relocs against undefined weak symbols should not be treated as
2 # overflowing
3
4         .module mips64r6
5         .globl  start
6         .weak   foo
7 start:
8         .set noreorder
9         .set mips64r6
10         beqzc   $2, foo
11         nop 
12         bnezc   $2, foo
13         lwpc    $2, foo
14         ldpc    $2, foo
15         bc      foo
16         auipc   $4, %pcrel_hi(foo)
17         addiu   $4, $4, %pcrel_lo(foo+4)
18
19         b       foo
20         nop
21         bal     foo
22         lui     $4, %gp_rel(foo)
23
24         jal     foo
25         nop
26         j       foo
27         nop
28
29         .set mips32r2
30         .set micromips
31 micro:
32         beqz16  $4, foo
33         nop
34         b16     foo
35         nop
36         b       foo
37         nop
38         bal     foo
39         nop
40
41         jal     foo
42         nop
43         j       foo
44         nop
45
46         .set nomicromips
47         .set mips16
48 mips16:
49         b       foo
50
51         jal     foo
52         nop