summaryrefslogtreecommitdiffstats
path: root/binutils-2.21/ld/testsuite/ld-mmix
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.21/ld/testsuite/ld-mmix')
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/a.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/areg-256.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/areg-t.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/aregm.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badfil1.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badfil1.s10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badfil2.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badfil2.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badfixo.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badfixo.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badloc.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badloc.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badlop.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badlop.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badm.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badm2.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badmain.s7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badquot.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badquot.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badrx1.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badrx1.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badrx2.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badrx2.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badrx3.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-badrx3.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-bend.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-bend1.d11
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-bend2.d10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-bend3.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-bstab1.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-bstab1.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-fixo2.d27
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-fixo2.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-goodmain.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-loc64k.d24
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-loc64k.s8
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-nosym.d18
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-nosym.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-offloc.s9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-post1.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-twoinsn.s7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-widec.s7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-widec1.d12
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-widec2.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-widec2.s7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-widec3.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/b-widec3.s8
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-1.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-1.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-10.d22
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-10.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-11.d31
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-11.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-12.d9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-12m.d9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-13.d9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-13m.d9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-14.d22
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-14m.d20
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-15.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-15m.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-16.d23
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-16m.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-17.d23
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-17m.d22
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-18.d29
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-18m.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-19.d33
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-19m.d30
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-1m.d18
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-2.d23
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-2.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-20.d8
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-20m.d8
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-21.d10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-21m.d9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-22.d22
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-2m.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-3.d24
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-3.s1
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-3m.d20
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-4.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-4.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-4m.d22
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-5.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-5.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-5m.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-6.d30
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-6.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-6m.d27
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-7.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-7.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-7m.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-8.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-8.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-8m.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-9.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-9.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo-9m.d22
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bpo64addr.ld13
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec1.d41
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec1.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec1m.d15
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec2.d51
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec2.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec2m.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec801.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec802.s7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec803.s9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec804.s9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec805.s10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec806.s10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec807.s9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bspec808.s9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bza-1b.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bza-1f.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bza-2b.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bza-2f.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bza-7b.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bza-7f.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bza-8b.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bza-8f.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/bza.s7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/data1.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/dloc1.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/dloc2.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/ext1-254.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/ext1.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/ext1g.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/ext1l.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-1b.d24
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-1f.d24
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-2b.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-2f.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-4b.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-4f.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-6b.d11
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-6f.d10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-7b.d24
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-7f.d24
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-8b.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa-8f.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa.s7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa12b.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa12f.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa14b.d11
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/getaa14f.d10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-1.d27
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-1.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-10.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-11.d39
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-11b.d32
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-12.d34
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-13.d33
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-14.d32
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-14s.d23
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-15.d59
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-16.d59
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-17.d37
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-18.d39
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-19.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-2.d41
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-2.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-20.d18
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-3.d36
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-3.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-4.d35
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-4.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-5.d34
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-5.s20
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-5s.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-6.d286
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-7.d286
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-8.d37
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/greg-9.d39
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/gregbza1.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/gregget1.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/gregget2.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/gregldo1.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/gregpsj1.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/hdr-1.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-1b.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-1f.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-2b.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-2f.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-3b.d30
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-3f.d28
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-4b.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-4f.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-5b.d31
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-5f.d29
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-6b.d11
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-6f.d10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-7b.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-7f.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-8b.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-8f.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-9b.d30
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa-9f.d28
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa.s7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa12b.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa12f.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa13b.d31
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa13f.d29
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa14b.d11
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/jumpa14f.d10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc1.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc1.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc10.d13
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc10.s1
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc10m.d10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc1m.d14
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc2.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc2.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc2m.d14
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc3.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc3m.d14
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc4.d28
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc4m.d17
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc5.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc5m.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc6.d24
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc6m.d18
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc7.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc7m.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc8.d13
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc8.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc8m.d10
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc9.d13
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc9.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loc9m.d14
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local1.d48
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local1.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local10.d5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local10m.d5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local11.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local11m.d6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local12.d16
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local12m.d16
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local1m.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local2.d8
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local2.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local2m.d8
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local3.d46
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local3m.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local4.d8
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local4m.d8
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local5.d47
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local5m.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local6.d9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local6m.d9
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local7.d48
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local7m.d20
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local8.d28
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local8m.d28
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local9.d5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/local9m.d5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/locdo-1.d23
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/locdo.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loct-1.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/loct.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/locto-1.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/locto.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/main1.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/mmix.exp35
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/mmohdr1.ld11
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/mmosec1.ld16
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/mmosec2.ld13
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/nop123.s3
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pad16.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pad2p18m32.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pad2p26m32.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pad4.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja.s7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja1b-s.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja1b.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja1f-s.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja1f.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja2b.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja2f.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja7b-s.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja7b.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja7f-s.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja7f.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja8b.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushja8f.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs1.d27
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs1b.d31
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs1bm.d29
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs1m.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs1r.d22
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs2.d29
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs2b.d33
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs2bm.d31
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs2m.d28
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs2r.d27
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs3.d29
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs3b.d30
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs3bm.d28
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs3m.d28
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs3r.d32
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs4.d34
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs4b.d35
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs4bm.d33
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs4m.d33
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/pushjs4r.d29
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/reg-1.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/reg-1m.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/reg-2.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/reg-2m.d7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/regext1.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-1.d35
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-1.s14
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-2.d26
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-2.s2
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-3.d36
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-4.d22
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-5.d28
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-6.d37
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-6.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-6m.d32
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-7a.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-7b.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-7c.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-7d.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-7e.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-7m.d38
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-8a.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-8b.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-8d.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-8m.d30
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-8m.s4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sec-9.d19
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/spec801.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/spec802.d24
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/spec803.d24
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/spec804.d24
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/spec805.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/spec806.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/spec807.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/spec808.d25
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/start-1.d21
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/start-2.d4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/start.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/start2.s5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/start3.s7
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/start4.s6
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sym-1.d11
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sym-2.d142
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/sym-2.s130
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/undef-1.d4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/undef-1.s1
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/undef-1m.d4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/undef-2.d5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/undef-2.s1
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/undef-2m.d5
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/undef-3.d32
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/undef-3m.d18
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/x.s29
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/y.s33
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/zeroeh.ld4
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/zeroehelf.d17
-rw-r--r--binutils-2.21/ld/testsuite/ld-mmix/zeroehmmo.d16
363 files changed, 6709 insertions, 0 deletions
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/a.s b/binutils-2.21/ld/testsuite/ld-mmix/a.s
new file mode 100644
index 0000000..20e571b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/a.s
@@ -0,0 +1,5 @@
+* The symbol "a" is found here.
+ .text
+ .global a
+a:
+ SET $253,4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/areg-256.s b/binutils-2.21/ld/testsuite/ld-mmix/areg-256.s
new file mode 100644
index 0000000..21012d8
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/areg-256.s
@@ -0,0 +1,2 @@
+ .global areg
+areg IS $255+1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/areg-t.s b/binutils-2.21/ld/testsuite/ld-mmix/areg-t.s
new file mode 100644
index 0000000..364b01c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/areg-t.s
@@ -0,0 +1,3 @@
+ .text
+ .global areg
+areg SWYM 4,8,16
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/aregm.s b/binutils-2.21/ld/testsuite/ld-mmix/aregm.s
new file mode 100644
index 0000000..2dacbad
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/aregm.s
@@ -0,0 +1,5 @@
+ .global areg
+areg GREG Main+4
+ LDOU $3,areg,16
+ LDOU $3,$7,areg
+ LDOU $5,Main+8
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badfil1.d b/binutils-2.21/ld/testsuite/ld-mmix/b-badfil1.d
new file mode 100644
index 0000000..8a945fb
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badfil1.d
@@ -0,0 +1,7 @@
+#source: b-twoinsn.s
+#source: b-badfil1.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: file number 42 `bar.s', was already entered as `foo.s'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badfil1.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badfil1.s
new file mode 100644
index 0000000..256fa78
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badfil1.s
@@ -0,0 +1,10 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide two LOP_FILEs, but
+% specifying the same file number.
+ .text
+ .byte 0x98,06,42,2
+ .ascii "foo.s"
+ .byte 0,0,0
+ .byte 0x98,06,42,2
+ .ascii "bar.s"
+ .byte 0,0,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badfil2.d b/binutils-2.21/ld/testsuite/ld-mmix/b-badfil2.d
new file mode 100644
index 0000000..3f98a77
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badfil2.d
@@ -0,0 +1,7 @@
+#source: b-twoinsn.s
+#source: b-badfil2.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: file name for number 42 was not specified before use
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badfil2.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badfil2.s
new file mode 100644
index 0000000..23d68ba
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badfil2.s
@@ -0,0 +1,6 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FILE for file
+% number 42, without specifying the file name, which an earlier LOP_FILE
+% for the same file number was supposed to have filled in
+ .text
+ .byte 0x98,06,42,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badfixo.d b/binutils-2.21/ld/testsuite/ld-mmix/b-badfixo.d
new file mode 100644
index 0000000..3cb6088
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badfixo.d
@@ -0,0 +1,7 @@
+#source: b-twoinsn.s
+#source: b-badfixo.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: .* lop_fixo
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badfixo.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badfixo.s
new file mode 100644
index 0000000..93cd6d0
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badfixo.s
@@ -0,0 +1,5 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FIXO with invalid;
+% (!= 1, != 2), YZ field.
+ .text
+ .byte 0x98,3,0,3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badloc.d b/binutils-2.21/ld/testsuite/ld-mmix/b-badloc.d
new file mode 100644
index 0000000..dce1ebf
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badloc.d
@@ -0,0 +1,7 @@
+#source: b-twoinsn.s
+#source: b-badloc.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: .* lop_loc
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badloc.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badloc.s
new file mode 100644
index 0000000..098098a
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badloc.s
@@ -0,0 +1,5 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide a LOP_LOC with invalid;
+% (!= 1, != 2), YZ field.
+ .text
+ .byte 0x98,1,0,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badlop.d b/binutils-2.21/ld/testsuite/ld-mmix/b-badlop.d
new file mode 100644
index 0000000..b8c55e5
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badlop.d
@@ -0,0 +1,7 @@
+#source: b-twoinsn.s
+#source: b-badlop.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: unsupported lopcode
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badlop.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badlop.s
new file mode 100644
index 0000000..9e13332
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badlop.s
@@ -0,0 +1,4 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide an invalid lopcode.
+ .text
+ .byte 0x98,0xff,0,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badm.d b/binutils-2.21/ld/testsuite/ld-mmix/b-badm.d
new file mode 100644
index 0000000..39d8ecb
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badm.d
@@ -0,0 +1,6 @@
+#source: b-twoinsn.s
+#source: b-post1.s
+#source: b-badmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: initialization value for .255 is not `Main'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badm2.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badm2.s
new file mode 100644
index 0000000..eb94278
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badm2.s
@@ -0,0 +1,6 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s. It will provide an incorrect LOP_END; its YZ field is not
+% the number of tetras to the preceding LOP_STAB.
+ .text
+ .byte 0x98,0x0b,0x00,0x00,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69
+ .byte 0x01,0x6e,0x04,0x81,0x01,0x61,0x04,0x82,0x98,0x0c,0x00,0x03
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badmain.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badmain.s
new file mode 100644
index 0000000..4736955
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badmain.s
@@ -0,0 +1,7 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s, and will provide the end of a mmo file with a value of
+% :Main that does not correspond to the address in the initialization of
+% $255 - the start address.
+ .text
+ .byte 0x98,0x0b,0,0,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69
+ .byte 1,0x6e,0,0x81,1,0x61,4,0x82,0x98,0x0c,0,4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badquot.d b/binutils-2.21/ld/testsuite/ld-mmix/b-badquot.d
new file mode 100644
index 0000000..ae3d095
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badquot.d
@@ -0,0 +1,7 @@
+#source: b-twoinsn.s
+#source: b-badquot.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: .* lop_quote
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badquot.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badquot.s
new file mode 100644
index 0000000..77742db
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badquot.s
@@ -0,0 +1,5 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide a LOP_QUOTE with invalid;
+% non-zero, YZ field.
+ .text
+ .byte 0x98,0,0xff,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badrx1.d b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx1.d
new file mode 100644
index 0000000..1033476
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx1.d
@@ -0,0 +1,7 @@
+#source: b-twoinsn.s
+#source: b-badrx1.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: expected y = 0, .* lop_fixrx
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badrx1.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx1.s
new file mode 100644
index 0000000..dd35763
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx1.s
@@ -0,0 +1,6 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FIXRX with invalid
+% (non-zero), Y field.
+ .text
+ .byte 0x98,5,1,0
+ .4byte 0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badrx2.d b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx2.d
new file mode 100644
index 0000000..6e13019
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx2.d
@@ -0,0 +1,7 @@
+#source: b-twoinsn.s
+#source: b-badrx2.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: expected z .* lop_fixrx
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badrx2.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx2.s
new file mode 100644
index 0000000..20def6c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx2.s
@@ -0,0 +1,6 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FIXRX with invalid
+% (!= 16, != 24), Z field.
+ .text
+ .byte 0x98,5,0,8
+ .4byte 0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badrx3.d b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx3.d
new file mode 100644
index 0000000..c1cffed
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx3.d
@@ -0,0 +1,7 @@
+#source: b-twoinsn.s
+#source: b-badrx3.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: leading byte of operand word .* lop_fixrx
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-badrx3.s b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx3.s
new file mode 100644
index 0000000..59cd5cb
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-badrx3.s
@@ -0,0 +1,6 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FIXRX with invalid
+% (!= 0, != 1), first byte of the operand word.
+ .text
+ .byte 0x98,5,0,24
+ .byte 2,0,0,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-bend.s b/binutils-2.21/ld/testsuite/ld-mmix/b-bend.s
new file mode 100644
index 0000000..1168ee9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-bend.s
@@ -0,0 +1,6 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide an invalid LOP_END; one
+% not at the end of a file. It also does not in YZ specify a correct
+% number of bytes between it and a preceding lop_stab.
+ .text
+ .byte 0x98,12,0,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-bend1.d b/binutils-2.21/ld/testsuite/ld-mmix/b-bend1.d
new file mode 100644
index 0000000..e747753
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-bend1.d
@@ -0,0 +1,11 @@
+#source: b-twoinsn.s
+#source: b-bend.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: lop_end not last item in file
+
+# This test depend on that the non-at-end condition is tested before
+# not-correct-YZ-field and might need tweaking if the implementation
+# changes.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-bend2.d b/binutils-2.21/ld/testsuite/ld-mmix/b-bend2.d
new file mode 100644
index 0000000..234b4e5
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-bend2.d
@@ -0,0 +1,10 @@
+#source: b-twoinsn.s
+#source: b-post1.s
+#source: b-goodmain.s
+#source: b-bend.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: lop_end not last item in file
+
+# We use the b-bend.s file just to make the correct lop_end in
+# b-goodmain.s not the last one.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-bend3.d b/binutils-2.21/ld/testsuite/ld-mmix/b-bend3.d
new file mode 100644
index 0000000..3448c22
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-bend3.d
@@ -0,0 +1,6 @@
+#source: b-twoinsn.s
+#source: b-post1.s
+#source: b-badm2.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: YZ of lop_end .* not equal to the number of tetras to the preceding lop_stab
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-bstab1.d b/binutils-2.21/ld/testsuite/ld-mmix/b-bstab1.d
new file mode 100644
index 0000000..6281f06
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-bstab1.d
@@ -0,0 +1,7 @@
+#source: b-twoinsn.s
+#source: b-bstab1.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid mmo file: fields y and z of lop_stab non-zero, y: 1, z: 2
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-bstab1.s b/binutils-2.21/ld/testsuite/ld-mmix/b-bstab1.s
new file mode 100644
index 0000000..0210106
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-bstab1.s
@@ -0,0 +1,5 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide an invalid LOP_STAB, one
+% with non-zero y and/or z.
+ .text
+ .byte 0x98,11,1,2
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-fixo2.d b/binutils-2.21/ld/testsuite/ld-mmix/b-fixo2.d
new file mode 100644
index 0000000..e8e2ff8
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-fixo2.d
@@ -0,0 +1,27 @@
+#source: b-twoinsn.s
+#source: b-fixo2.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#objdump: -sht
+
+# Note that we "optimize" out the high tetrabyte of 0 written to
+# 2068098510aa5560, hence only the low part is left.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+8 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.data 0+4 2068098510aa5564 2068098510aa5564 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+SYMBOL TABLE:
+0+4 g \.text Main
+0+4 g \.text a
+
+Contents of section \.text:
+ 0000 e3fd0001 e3fd0004 .*
+Contents of section \.data:
+ 2068098510aa5564 00000008 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-fixo2.s b/binutils-2.21/ld/testsuite/ld-mmix/b-fixo2.s
new file mode 100644
index 0000000..f892999
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-fixo2.s
@@ -0,0 +1,6 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FIXO storing the
+% current address at address 0x2068098510aa5560.
+ .text
+ .byte 0x98,3,0x20,2
+ .8byte 0x68098510aa5560
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-goodmain.s b/binutils-2.21/ld/testsuite/ld-mmix/b-goodmain.s
new file mode 100644
index 0000000..c90063e
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-goodmain.s
@@ -0,0 +1,5 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s, and will provide a valid end of a mmo file.
+ .text
+ .byte 0x98,0x0b,0x00,0x00,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69
+ .byte 0x01,0x6e,0x04,0x81,0x01,0x61,0x04,0x82,0x98,0x0c,0x00,0x04
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-loc64k.d b/binutils-2.21/ld/testsuite/ld-mmix/b-loc64k.d
new file mode 100644
index 0000000..0124643
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-loc64k.d
@@ -0,0 +1,24 @@
+#source: b-loc64k.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#objdump: -dht
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+10004 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+SYMBOL TABLE:
+0+4 g \.text Main
+0+4 g \.text a
+
+Disassembly of section \.text:
+
+0+ <Main-0x4>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <Main>:
+ \.\.\.
+ 10000: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-loc64k.s b/binutils-2.21/ld/testsuite/ld-mmix/b-loc64k.s
new file mode 100644
index 0000000..ea563d2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-loc64k.s
@@ -0,0 +1,8 @@
+% The .text contents is supposed to be linked --oformat binary, and will
+% correspond to the start of a mmo file with two instructions, 64k apart.
+% This file ends before the LOP_STAB.
+ .text
+ .byte 0x98,9,1,1,0x3b,0x7f,0x9c,0xe3,0x98,1,0,2,0,0,0,0
+ .byte 0,0,0,0,0xe3,0xfd,0,1,0x98,1,0,2,0,0,0,0
+ .byte 0,1,0,0,0xe3,0xfd,0,4,0x98,0x0a,0,0xff,0,0,0,0
+ .byte 0,0,0,4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-nosym.d b/binutils-2.21/ld/testsuite/ld-mmix/b-nosym.d
new file mode 100644
index 0000000..c7953ec
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-nosym.d
@@ -0,0 +1,18 @@
+#source: b-twoinsn.s
+#source: b-post1.s
+#source: b-nosym.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#objdump: -st 2>/dev/null
+
+# Note that we have to redirect stderr when objdumping to get rid of the
+# "no symbols" message that would otherwise cause a spurious failure and
+# which we seemingly can't identify or prune in another way.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+no symbols
+
+Contents of section \.text:
+ 0000 e3fd0001 e3fd0004 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-nosym.s b/binutils-2.21/ld/testsuite/ld-mmix/b-nosym.s
new file mode 100644
index 0000000..08bfdbf
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-nosym.s
@@ -0,0 +1,5 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s, and will provide a valid end of a mmo file but with no
+% symbols (if that is actually valid).
+ .text
+ .byte 0x98,0x0b,0x00,0x00,0x98,0x0c,0x00,0x00
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-offloc.s b/binutils-2.21/ld/testsuite/ld-mmix/b-offloc.s
new file mode 100644
index 0000000..c2fb2cc
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-offloc.s
@@ -0,0 +1,9 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-post1.s and b-goodmain.s. The code below will provide a LOP_LOC
+% with a 64-bit address (0x789abcdef0123456) then 16 bytes of % random data.
+
+ .text
+ .byte 0x98,1,0,2
+ .8byte 0x789abcdef0123458
+ .byte 0xb0,0x45,0x19,0x7d,0x2c,0x1b,0x3,0xb2
+ .byte 0xe4,0xdb,0xf8,0x77,0xf,0xc7,0x66,0xfb
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-post1.s b/binutils-2.21/ld/testsuite/ld-mmix/b-post1.s
new file mode 100644
index 0000000..a60aece
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-post1.s
@@ -0,0 +1,5 @@
+% The .text contents is supposed to be linked --oformat binary, and will
+% correspond to a LOP_POST for an initialization of $255 with 4. A
+% LOP_STAB, such as in b-goodmain.s should follow.
+ .text
+ .byte 0x98,0x0a,0,0xff,0,0,0,0,0,0,0,4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-twoinsn.s b/binutils-2.21/ld/testsuite/ld-mmix/b-twoinsn.s
new file mode 100644
index 0000000..d9e0147
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-twoinsn.s
@@ -0,0 +1,7 @@
+% The .text contents is supposed to be linked --oformat binary, and will
+% correspond to the start of a mmo file with two instructions. This file
+% ends before the LOP_STAB.
+ .text
+ .byte 0x98,9,1,1,0x3b,0x7f,0x9c,0xe3,0x98,1,0,2,0,0,0,0
+ .byte 0,0,0,0,0xe3,0xfd,0,1,0x98,1,0,2,0,0,0,0
+ .byte 0,0,0,4,0xe3,0xfd,0,4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-widec.s b/binutils-2.21/ld/testsuite/ld-mmix/b-widec.s
new file mode 100644
index 0000000..c6f8c30
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-widec.s
@@ -0,0 +1,7 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s, and will provide a valid end of a mmo file, but with the
+% "n" in :Main in wide character format; the widening is with a nil, so it
+% is treated like a normal "n".
+ .text
+ .byte 0x98,0x0b,0x00,0x00,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69
+ .byte 0x81,0,0x6e,0x04,0x81,0x01,0x61,0x04,0x82,0,0,0,0x98,0x0c,0x00,0x05
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-widec1.d b/binutils-2.21/ld/testsuite/ld-mmix/b-widec1.d
new file mode 100644
index 0000000..e290ba1
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-widec1.d
@@ -0,0 +1,12 @@
+#source: b-twoinsn.s
+#source: b-post1.s
+#source: b-widec.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#objdump: -t
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+4 g \.text Main
+0+4 g \.text a
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-widec2.d b/binutils-2.21/ld/testsuite/ld-mmix/b-widec2.d
new file mode 100644
index 0000000..4094b59
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-widec2.d
@@ -0,0 +1,6 @@
+#source: b-twoinsn.s
+#source: b-post1.s
+#source: b-widec2.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: unsupported wide character sequence 0xFF 0x6E
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-widec2.s b/binutils-2.21/ld/testsuite/ld-mmix/b-widec2.s
new file mode 100644
index 0000000..7745365
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-widec2.s
@@ -0,0 +1,7 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s, and will provide a valid end of a mmo file, but with the
+% "n" in :Main in wide character format; the widening is with a 0xff, so it
+% isn't supported, and the file is rejected.
+ .text
+ .byte 0x98,0x0b,0x00,0x00,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69
+ .byte 0x81,0xff,0x6e,0x04,0x81,0x01,0x61,0x04,0x82,0,0,0,0x98,0x0c,0x00,0x05
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-widec3.d b/binutils-2.21/ld/testsuite/ld-mmix/b-widec3.d
new file mode 100644
index 0000000..f4cb3b9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-widec3.d
@@ -0,0 +1,6 @@
+#source: b-twoinsn.s
+#source: b-post1.s
+#source: b-widec3.s
+#ld: --oformat binary
+#objcopy_linked_file:
+#error: invalid symbol table: duplicate symbol `Main'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/b-widec3.s b/binutils-2.21/ld/testsuite/ld-mmix/b-widec3.s
new file mode 100644
index 0000000..0c02892
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/b-widec3.s
@@ -0,0 +1,8 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-twoinsn.s, and will provide a valid end of a mmo file, but with the
+% "n" in :Main in wide character format; the widening is with a nil, so it
+% is treated like a normal "n". Also, it provides a normal "n", so the
+% two symbols collide.
+ .text
+ .byte 0x98,0x0b,0x00,0x00,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69
+ .byte 0x91,0,0x6e,0x04,0x81,0x01,0x6e,0x04,0x83,1,0x01,0x61,0x04,0x82,0,0,0x98,0x0c,0,0x06
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-1.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-1.d
new file mode 100644
index 0000000..97bc33d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-1.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Just a simple linker-allocated GREG with no explicit GREGs.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0000000000000000 l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+4 l \.text 0+ x
+0+ g \.text 0+ _start
+#...
+
+Contents of section \.text:
+ 0000 e3fd0001 232afe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 0000002e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-1.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-1.s
new file mode 100644
index 0000000..0a76e40
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-1.s
@@ -0,0 +1,2 @@
+# A most simple instruction needing a linker-supplied GREG.
+x LDA $42,x+42
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-10.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-10.d
new file mode 100644
index 0000000..713d7ad
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-10.d
@@ -0,0 +1,22 @@
+#source: start4.s
+#source: bpo-6.s
+#source: bpo-5.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix --gc-sections
+#objdump: -st
+
+# Check that GC removes all (two) BPO:s when all are collected.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.init 0+ (|\.init)
+0+7f8 l +d \.MMIX.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+ l \.init 0+ _start
+2000000000000000 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ _edata
+2000000000000000 g \*ABS\* 0+ _end
+0+4 g \.init 0+ _start\.
+
+Contents of section \.init:
+ 0000 e37704a6 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-10.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-10.s
new file mode 100644
index 0000000..a4d1c12
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-10.s
@@ -0,0 +1,6 @@
+# Overflow; specify 223*8 registers.
+ .set i,0
+ .rept 223*4*8
+ LDA $11,_start+i*64
+ .set i,i+1
+ .endr
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-11.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-11.d
new file mode 100644
index 0000000..5925cff
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-11.d
@@ -0,0 +1,31 @@
+#source: start3.s
+#source: bpo-6.s
+#source: bpo-2.s
+#source: bpo-5.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix --gc-sections
+#objdump: -st
+
+# Check that GC removes one of the three BPO:s, for the collected section.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.init 0+ (|\.init)
+0+10 l d \.text 0+ (|\.text)
+0+7e8 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+ l \.init 0+ _start
+0+14 g \.text 0+ x
+0+10 g \.text 0+ x2
+2000000000000000 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ _edata
+2000000000000000 g \*ABS\* 0+ _end
+0+10 g \.text 0+ _start\.
+
+
+Contents of section \.init:
+ 0000 00000000 0000003d 00000000 0000003a .*
+Contents of section \.text:
+ 0010 232dfe00 232dfd00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000107c 00000000 0000a420 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-11.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-11.s
new file mode 100644
index 0000000..51ed92f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-11.s
@@ -0,0 +1,5 @@
+ .set i,0
+ .rept 222
+ LDA $11,_start+i*256
+ .set i,i+1
+ .endr
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-12.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-12.d
new file mode 100644
index 0000000..2961e8b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-12.d
@@ -0,0 +1,9 @@
+#source: start.s
+#source: bpo-7.s
+#source: greg-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: base-plus-offset relocation against register symbol
+
+# Check that we get an error message if we see a BPO against a register
+# symbol. Variant 1: a GREG allocated register.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-12m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-12m.d
new file mode 100644
index 0000000..7d847fe
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-12m.d
@@ -0,0 +1,9 @@
+#source: start.s
+#source: bpo-7.s
+#source: greg-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: base-plus-offset relocation against register symbol
+
+# Check that we get an error message if we see a BPO against a register
+# symbol. Variant 1: a GREG allocated register.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-13.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-13.d
new file mode 100644
index 0000000..78f7c7a
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-13.d
@@ -0,0 +1,9 @@
+#source: start.s
+#source: bpo-7.s
+#source: areg-256.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: base-plus-offset relocation against register symbol
+
+# Check that we get an error message if we see a BPO against a register
+# symbol. Variant 2: a register symbol.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-13m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-13m.d
new file mode 100644
index 0000000..8bd0bf6
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-13m.d
@@ -0,0 +1,9 @@
+#source: start.s
+#source: bpo-7.s
+#source: areg-256.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: base-plus-offset relocation against register symbol
+
+# Check that we get an error message if we see a BPO against a register
+# symbol. Variant 2: a register symbol.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-14.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-14.d
new file mode 100644
index 0000000..e19e4a8
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-14.d
@@ -0,0 +1,22 @@
+#source: start.s
+#source: bpo-7.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# A BPO against an external symbol.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+ g \.text 0+ _start
+0+8 g \.text 0+ areg
+#...
+
+Contents of section \.text:
+ 0000 e3fd0001 234dfe00 fd040810 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000003 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-14m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-14m.d
new file mode 100644
index 0000000..541b108
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-14m.d
@@ -0,0 +1,20 @@
+#source: start.s
+#source: bpo-7.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# A BPO against an external symbol.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+8 g \.text areg
+
+Contents of section \.text:
+ 0000 e3fd0001 234dfe00 fd040810 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000003 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-15.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-15.d
new file mode 100644
index 0000000..6845a87
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-15.d
@@ -0,0 +1,7 @@
+#source: start.s
+#source: bpo-7.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: ^[^c][^h][^i][^l][^d].* undefined reference to `areg'$
+
+# A BPO against an undefined symbol.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-15m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-15m.d
new file mode 100644
index 0000000..eacedf5
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-15m.d
@@ -0,0 +1,7 @@
+#source: start.s
+#source: bpo-7.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: ^[^c][^h][^i][^l][^d].* undefined reference to `areg'$
+
+# A BPO against an undefined symbol.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-16.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-16.d
new file mode 100644
index 0000000..d7e372c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-16.d
@@ -0,0 +1,23 @@
+#source: start.s
+#source: bpo-7.s
+#source: bpo-7.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Two BPO:s against the same value get merged.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+ g \.text 0+ _start
+0+c g \.text 0+ areg
+#...
+
+Contents of section \.text:
+ 0000 e3fd0001 234dfe00 234dfe00 fd040810 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000007 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-16m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-16m.d
new file mode 100644
index 0000000..f1fe336
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-16m.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: bpo-7.s
+#source: bpo-7.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Two BPO:s against the same value get merged.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+c g \.text areg
+
+Contents of section \.text:
+ 0000 e3fd0001 234dfe00 234dfe00 fd040810 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000007 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-17.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-17.d
new file mode 100644
index 0000000..f70b852
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-17.d
@@ -0,0 +1,23 @@
+#source: start.s
+#source: bpo-8.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# A BPO and another reloc in the same section.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+ g \.text 0+ _start
+0+10 g \.text 0+ areg
+#...
+
+Contents of section \.text:
+ 0000 e3fd0001 2336fe00 00000000 0000000c .*
+ 0010 fd040810 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000008 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-17m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-17m.d
new file mode 100644
index 0000000..6458ebe
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-17m.d
@@ -0,0 +1,22 @@
+#source: start.s
+#source: bpo-8.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# A BPO and another reloc in the same section.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+10 g \.text areg
+
+
+Contents of section \.text:
+ 0000 e3fd0001 2336fe00 00000000 0000000c .*
+ 0010 fd040810 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000008 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-18.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-18.d
new file mode 100644
index 0000000..3d1d2f1
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-18.d
@@ -0,0 +1,29 @@
+#source: start.s
+#source: bpo-1.s
+#source: bpo-2.s
+#source: bpo-5.s
+#source: bpo-6.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix -T$srcdir/$subdir/bpo64addr.ld
+#objdump: -st
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+100 l d \.text 0+ (|\.text)
+4000000000001060 l d \.text\.away 0+ (|\.text\.away)
+0+7e0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+4000000000001064 l \.text\.away 0+ x
+0+100 g \.text 0+ x
+4000000000001060 g \.text\.away 0+ Main
+0+104 g \.text 0+ x2
+4000000000001060 g \.text\.away 0+ _start
+4000000000001068 g \.text\.away 0+ y
+
+Contents of section \.text:
+ 0100 232dfc00 232dfd00 .*
+Contents of section \.text\.away:
+ 4000000000001060 e3fd0001 232afe1e 2321fe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e0 00000000 00001168 00000000 0000a514 .*
+ 07f0 40000000 00001070 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-18m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-18m.d
new file mode 100644
index 0000000..b21b6cf
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-18m.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: bpo-1.s
+#source: bpo-2.s
+#source: bpo-5.s
+#source: bpo-6.s
+#as: -linker-allocated-gregs
+#ld: -m mmo -T$srcdir/$subdir/bpo64addr.ld
+#objdump: -st
+
+.*: file format mmo
+
+SYMBOL TABLE:
+4000000000001060 g \*ABS\* Main
+0+100 g \.text x
+0+104 g \.text x2
+4000000000001060 g \*ABS\* _start
+4000000000001068 g \*ABS\* y
+
+Contents of section \.text:
+ 0100 232dfc00 232dfd00 .*
+Contents of section \.text\.away:
+ 4000000000001060 e3fd0001 232afe1e 2321fe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e0 00000000 00001168 00000000 0000a514 .*
+ 07f0 40000000 00001070 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-19.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-19.d
new file mode 100644
index 0000000..d8ee554
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-19.d
@@ -0,0 +1,33 @@
+#source: start.s
+#source: bpo-9.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# 223 (max) linker-allocated GREGs, four relocs merged for each register
+# allocated.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+100 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+#...
+0+ g \.text 0+ _start
+#...
+
+Contents of section \.text:
+ 0000 e3fd0001 230b2000 230b2040 230b2080 .*
+ 0010 230b20c0 230b2100 230b2140 230b2180 .*
+ 0020 230b21c0 230b2200 230b2240 230b2280 .*
+#...
+ 0dd0 230bfcc0 230bfd00 230bfd40 230bfd80 .*
+ 0de0 230bfdc0 230bfe00 230bfe40 230bfe80 .*
+ 0df0 230bfec0 .*
+Contents of section \.MMIX\.reg_contents:
+ 0100 00000000 00000000 00000000 00000100 .*
+ 0110 00000000 00000200 00000000 00000300 .*
+#...
+ 07d0 00000000 0000da00 00000000 0000db00 .*
+ 07e0 00000000 0000dc00 00000000 0000dd00 .*
+ 07f0 00000000 0000de00 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-19m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-19m.d
new file mode 100644
index 0000000..7f740e1
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-19m.d
@@ -0,0 +1,30 @@
+#source: start.s
+#source: bpo-9.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# 223 (max) linker-allocated GREGs, four relocs merged for each register
+# allocated.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+
+Contents of section \.text:
+ 0000 e3fd0001 230b2000 230b2040 230b2080 .*
+ 0010 230b20c0 230b2100 230b2140 230b2180 .*
+ 0020 230b21c0 230b2200 230b2240 230b2280 .*
+#...
+ 0dd0 230bfcc0 230bfd00 230bfd40 230bfd80 .*
+ 0de0 230bfdc0 230bfe00 230bfe40 230bfe80 .*
+ 0df0 230bfec0 .*
+Contents of section \.MMIX\.reg_contents:
+ 0100 00000000 00000000 00000000 00000100 .*
+ 0110 00000000 00000200 00000000 00000300 .*
+#...
+ 07d0 00000000 0000da00 00000000 0000db00 .*
+ 07e0 00000000 0000dc00 00000000 0000dd00 .*
+ 07f0 00000000 0000de00 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-1m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-1m.d
new file mode 100644
index 0000000..b2d0384
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-1m.d
@@ -0,0 +1,18 @@
+#source: start.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Just a simple linker-allocated GREG with no explicit GREGs.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+
+Contents of section \.text:
+ 0000 e3fd0001 232afe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 0000002e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-2.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-2.d
new file mode 100644
index 0000000..7206cab
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-2.d
@@ -0,0 +1,23 @@
+#source: start.s
+#source: greg-1.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Just a simple linker-allocated GREG plus one explicit GREG.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7e8 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+4 l \.text 0+ x
+0+ g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+#...
+
+Contents of section \.text:
+ 0000 e3fd0001 232afd00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000002e 00007048 860f3a38 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-2.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-2.s
new file mode 100644
index 0000000..02c7901
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-2.s
@@ -0,0 +1,2 @@
+ .global y
+y LDA $33,y+8
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-20.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-20.d
new file mode 100644
index 0000000..f05edfb
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-20.d
@@ -0,0 +1,8 @@
+#source: start.s
+#source: bpo-10.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: Too many global registers
+
+# Check that many too many gregs are recognized (and not signed/unsigned
+# bugs with checks for < 32 appear).
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-20m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-20m.d
new file mode 100644
index 0000000..91126b4
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-20m.d
@@ -0,0 +1,8 @@
+#source: start.s
+#source: bpo-10.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: Too many global registers
+
+# Check that many too many gregs are recognized (and not signed/unsigned
+# bugs with checks for < 32 appear).
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-21.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-21.d
new file mode 100644
index 0000000..f208cb6
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-21.d
@@ -0,0 +1,10 @@
+#source: start.s
+#source: bpo-11.s
+#source: bpo-7.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: ^[^c][^h][^i][^l][^d].* undefined reference to `areg'$
+
+# A BPO reloc against an undefined symbol, with a full set of normal
+# BPO:s.
+
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-21m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-21m.d
new file mode 100644
index 0000000..b437dd3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-21m.d
@@ -0,0 +1,9 @@
+#source: start.s
+#source: bpo-11.s
+#source: bpo-7.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: ^[^c][^h][^i][^l][^d].* undefined reference to `areg'$
+
+# A BPO reloc against an undefined symbol, with a full set of normal
+# BPO:s.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-22.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-22.d
new file mode 100644
index 0000000..c6a1314
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-22.d
@@ -0,0 +1,22 @@
+#source: start.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo --oformat elf64-mmix
+#objdump: -st
+
+# This weird combination of format and emulation options caused hiccups in
+# the reloc accounting machinery.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0000000000000000 l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+4 l \.text 0+ x
+0+ g \.text 0+ Main
+0+ g \.text 0+ _start
+
+Contents of section \.text:
+ 0000 e3fd0001 232afe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 0000002e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-2m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-2m.d
new file mode 100644
index 0000000..7ddcfd2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-2m.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: greg-1.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Just a simple linker-allocated GREG plus one explicit GREG.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+fe g \*REG\* areg
+
+Contents of section \.text:
+ 0000 e3fd0001 232afd00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000002e 00007048 860f3a38 .*
+
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-3.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-3.d
new file mode 100644
index 0000000..e1435ef
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-3.d
@@ -0,0 +1,24 @@
+#source: start.s
+#source: bpo-1.s
+#source: bpo-2.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Just two BPO relocs merged as one linker-allocated GREG.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+4 l \.text 0+ x
+0+ g \.text 0+ _start
+#...
+0+8 g \.text 0+ y
+#...
+
+Contents of section \.text:
+ 0000 e3fd0001 232afe1e 2321fe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000010 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-3.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-3.s
new file mode 100644
index 0000000..b975a82
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-3.s
@@ -0,0 +1 @@
+ LDOU $121,_start+42+4+4+257
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-3m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-3m.d
new file mode 100644
index 0000000..c0f4707
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-3m.d
@@ -0,0 +1,20 @@
+#source: start.s
+#source: bpo-1.s
+#source: bpo-2.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Just two BPO relocs merged as one linker-allocated GREG.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+8 g \.text y
+
+Contents of section \.text:
+ 0000 e3fd0001 232afe1e 2321fe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000010 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-4.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-4.d
new file mode 100644
index 0000000..372e7e6
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-4.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: greg-1.s
+#source: bpo-3.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Three GREGs: one explicit, two linker-allocated.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7e0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+8 l \.text 0+ x
+0+ g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+#...
+
+Contents of section \.text:
+ 0000 e3fd0001 8f79fd00 232afc00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e0 00000000 00000032 00000000 00000133 .*
+ 07f0 00007048 860f3a38 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-4.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-4.s
new file mode 100644
index 0000000..c5c21cf
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-4.s
@@ -0,0 +1,5 @@
+ .set i,0
+ .rept 223
+ LDA $11,_start+i*256
+ .set i,i+1
+ .endr
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-4m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-4m.d
new file mode 100644
index 0000000..2f3b59c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-4m.d
@@ -0,0 +1,22 @@
+#source: start.s
+#source: greg-1.s
+#source: bpo-3.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Three GREGs: one explicit, two linker-allocated.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+fe g \*REG\* areg
+
+Contents of section \.text:
+ 0000 e3fd0001 8f79fd00 232afc00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e0 00000000 00000032 00000000 00000133 .*
+ 07f0 00007048 860f3a38 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-5.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-5.d
new file mode 100644
index 0000000..a1a192d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-5.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: bpo-1.s
+#source: bpo-3.s
+#source: bpo-2.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Three linker-allocated GREGs: one eliminated.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7e8 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+4 l \.text 0+ x
+0+ g \.text 0+ _start
+#...
+0+c g \.text 0+ y
+#...
+
+Contents of section \.text:
+ 0000 e3fd0001 232afd1a 8f79fe00 2321fd00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 00000014 00000000 00000133 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-5.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-5.s
new file mode 100644
index 0000000..c0fcfac
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-5.s
@@ -0,0 +1,4 @@
+# A section with a symbol and a BPO allocation.
+ .section .text.x,"ax",@progbits
+ .global x
+x LDA $45,x+4200
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-5m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-5m.d
new file mode 100644
index 0000000..078d34e
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-5m.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: bpo-1.s
+#source: bpo-3.s
+#source: bpo-2.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Three linker-allocated GREGs: one eliminated.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+c g \.text y
+
+Contents of section \.text:
+ 0000 e3fd0001 232afd1a 8f79fe00 2321fd00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 00000014 00000000 00000133 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-6.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-6.d
new file mode 100644
index 0000000..a5978c9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-6.d
@@ -0,0 +1,30 @@
+#source: start.s
+#source: bpo-4.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# 223 (max) linker-allocated GREGs.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+100 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+#...
+0+ g \.text 0+ _start
+#...
+
+Contents of section \.text:
+ 0000 e3fd0001 230b2000 230b2100 230b2200 .*
+ 0010 230b2300 230b2400 230b2500 230b2600 .*
+#...
+ 0360 230bf700 230bf800 230bf900 230bfa00 .*
+ 0370 230bfb00 230bfc00 230bfd00 230bfe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 0100 00000000 00000000 00000000 00000100 .*
+ 0110 00000000 00000200 00000000 00000300 .*
+#...
+ 07d0 00000000 0000da00 00000000 0000db00 .*
+ 07e0 00000000 0000dc00 00000000 0000dd00 .*
+ 07f0 00000000 0000de00 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-6.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-6.s
new file mode 100644
index 0000000..a10e9a8
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-6.s
@@ -0,0 +1,4 @@
+# A section with a symbol and a BPO allocation.
+ .section .text.x2,"ax",@progbits
+ .global x2
+x2 LDA $45,x2+42000
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-6m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-6m.d
new file mode 100644
index 0000000..9d8e304
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-6m.d
@@ -0,0 +1,27 @@
+#source: start.s
+#source: bpo-4.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# 223 (max) linker-allocated GREGs.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+
+Contents of section \.text:
+ 0000 e3fd0001 230b2000 230b2100 230b2200 .*
+ 0010 230b2300 230b2400 230b2500 230b2600 .*
+#...
+ 0360 230bf700 230bf800 230bf900 230bfa00 .*
+ 0370 230bfb00 230bfc00 230bfd00 230bfe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 0100 00000000 00000000 00000000 00000100 .*
+ 0110 00000000 00000200 00000000 00000300 .*
+#...
+ 07d0 00000000 0000da00 00000000 0000db00 .*
+ 07e0 00000000 0000dc00 00000000 0000dd00 .*
+ 07f0 00000000 0000de00 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-7.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-7.d
new file mode 100644
index 0000000..693a502
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-7.d
@@ -0,0 +1,6 @@
+#source: start.s
+#source: bpo-4.s
+#source: greg-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: Too many global registers: 224
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-7.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-7.s
new file mode 100644
index 0000000..b920764
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-7.s
@@ -0,0 +1,2 @@
+# If the symbol is a register then this is an error.
+ LDA $77,areg-5
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-7m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-7m.d
new file mode 100644
index 0000000..21c4659
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-7m.d
@@ -0,0 +1,6 @@
+#source: start.s
+#source: bpo-4.s
+#source: greg-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: Too many global registers: 224
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-8.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-8.d
new file mode 100644
index 0000000..438b072
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-8.d
@@ -0,0 +1,7 @@
+#source: start.s
+#source: bpo-4.s
+#source: pad2p18m32.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: Too many global registers: 224
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-8.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-8.s
new file mode 100644
index 0000000..ebe410d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-8.s
@@ -0,0 +1,3 @@
+# A BPO and an ordinary reloc in the same section.
+ LDA $54,areg-8
+ .quad areg-4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-8m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-8m.d
new file mode 100644
index 0000000..9187672
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-8m.d
@@ -0,0 +1,7 @@
+#source: start.s
+#source: bpo-4.s
+#source: pad2p18m32.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: Too many global registers: 224
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-9.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-9.d
new file mode 100644
index 0000000..16d0017
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-9.d
@@ -0,0 +1,26 @@
+#source: start3.s
+#source: bpo-6.s
+#source: bpo-5.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix --gc-sections
+#objdump: -st
+
+# Check that GC does not mess up things when no BPO:s are collected.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.init 0+ (|\.init)
+0+10 l d \.text 0+ (|\.text)
+0+7e8 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+ l \.init 0+ _start
+0+14 g \.text 0+ x
+0+10 g \.text 0+ x2
+#...
+
+Contents of section \.init:
+ 0000 00000000 0000003d 00000000 0000003a .*
+Contents of section \.text:
+ 0010 232dfe00 232dfd00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000107c 00000000 0000a420 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-9.s b/binutils-2.21/ld/testsuite/ld-mmix/bpo-9.s
new file mode 100644
index 0000000..a608c68
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-9.s
@@ -0,0 +1,5 @@
+ .set i,0
+ .rept 223*4
+ LDA $11,_start+i*64
+ .set i,i+1
+ .endr
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo-9m.d b/binutils-2.21/ld/testsuite/ld-mmix/bpo-9m.d
new file mode 100644
index 0000000..fa3f97c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo-9m.d
@@ -0,0 +1,22 @@
+#source: start3.s
+#source: bpo-6.s
+#source: bpo-5.s
+#as: -linker-allocated-gregs
+#ld: -m mmo --gc-sections
+#objdump: -st
+
+# Check that GC does not mess up things when no BPO:s are collected.
+# Note that mmo doesn't support GC at the moment; it's a nop.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+4 g \.text x
+0+ g \.text x2
+
+Contents of section \.text:
+ 0000 232dfe00 232dfd00 00000000 0000002d .*
+ 0010 00000000 0000002a .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000106c 00000000 0000a410 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bpo64addr.ld b/binutils-2.21/ld/testsuite/ld-mmix/bpo64addr.ld
new file mode 100644
index 0000000..0324aa5
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bpo64addr.ld
@@ -0,0 +1,13 @@
+OUTPUT_ARCH(mmix)
+ENTRY(Main)
+SECTIONS
+{
+ .text 0x100 :
+ { *(.text.x); *(.text.x2); }
+
+ .text.away 0x4000000000001060 :
+ { *(.text); Main = _start; }
+
+ .MMIX.reg_contents :
+ { *(.MMIX.reg_contents.linker_allocated); *(.MMIX.reg_contents); }
+}
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec1.d b/binutils-2.21/ld/testsuite/ld-mmix/bspec1.d
new file mode 100644
index 0000000..16db5f4
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec1.d
@@ -0,0 +1,41 @@
+#source: bspec1.s
+#source: start.s
+#ld: -m elf64mmix
+#readelf: -Ssr -x1 -x2
+
+There are 6 section headers, starting at offset 0xb8:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Offset
+ +Size +EntSize +Flags +Link +Info +Align
+ +\[ 0\] +NULL +0+ +0+
+ +0+ +0+ +0 +0 +0
+ +\[ 1\] \.text +PROGBITS +0+ +0+78
+ +0+4 +0+ +AX +0 +0 +4
+ +\[ 2\] \.MMIX\.spec_data\.2 PROGBITS +0+ +0+7c
+ +0+4 +0+ +0 +0 +4
+ +\[ 3\] \.shstrtab +STRTAB +0+ +0+80
+ +0+33 +0+ +0 +0 +1
+ +\[ 4\] \.symtab +SYMTAB +0+ +0+238
+ +0+d8 +0+18 +5 +3 +8
+ +\[ 5\] \.strtab +STRTAB +0+ +0+310
+ +0+2d +0+ +0 +0 +1
+Key to Flags:
+#...
+
+There are no relocations in this file\.
+
+Symbol table '\.symtab' contains 9 entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND
+ +1: 0+ +0 +SECTION +LOCAL +DEFAULT +1
+ +2: 0+ +0 +SECTION +LOCAL +DEFAULT +2
+ +3: 0+ +0 +FUNC +GLOBAL +DEFAULT +1 Main
+ +4: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
+#...
+
+Hex dump of section '\.text':
+ 0x0+ e3fd0001 .*
+
+Hex dump of section '\.MMIX\.spec_data\.2':
+ 0x0+ 0000002a .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec1.s b/binutils-2.21/ld/testsuite/ld-mmix/bspec1.s
new file mode 100644
index 0000000..0c1707f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec1.s
@@ -0,0 +1,3 @@
+ BSPEC 2
+ TETRA :Main+42
+ ESPEC
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec1m.d b/binutils-2.21/ld/testsuite/ld-mmix/bspec1m.d
new file mode 100644
index 0000000..c3fedf8
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec1m.d
@@ -0,0 +1,15 @@
+#source: bspec1.s
+#source: start.s
+#ld: -m mmo
+#objdump: -str
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+
+Contents of section \.text:
+ 0+ e3fd0001 .*
+Contents of section \.MMIX\.spec_data\.2:
+ 0000 0000002a .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec2.d b/binutils-2.21/ld/testsuite/ld-mmix/bspec2.d
new file mode 100644
index 0000000..d2fd6dd
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec2.d
@@ -0,0 +1,51 @@
+#source: bspec1.s
+#source: bspec2.s
+#source: bspec1.s
+#source: start.s
+#source: ext1.s
+#ld: -m elf64mmix
+#readelf: -Ssr -x1 -x2 -x3
+
+There are 7 section headers, starting at offset 0xd0:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Offset
+ +Size +EntSize +Flags +Link +Info +Align
+ +\[ 0\] +NULL +0+ +0+
+ +0+ +0+ +0 +0 +0
+ +\[ 1\] \.text +PROGBITS +0+ +0+78
+ +0+4 +0+ +AX +0 +0 +4
+ +\[ 2\] \.MMIX\.spec_data\.2 PROGBITS +0+ +0+7c
+ +0+8 +0+ +0 +0 +4
+ +\[ 3\] \.MMIX\.spec_data\.3 PROGBITS +0+ +0+84
+ +0+4 +0+ +0 +0 +4
+ +\[ 4\] \.shstrtab +STRTAB +0+ +0+88
+ +0+45 +0+ +0 +0 +1
+ +\[ 5\] \.symtab +SYMTAB +0+ +0+290
+ +0+108 +0+18 +6 +4 +8
+ +\[ 6\] \.strtab +STRTAB +0+ +0+398
+ +0+32 +0+ +0 +0 +1
+Key to Flags:
+#...
+
+There are no relocations in this file\.
+
+Symbol table '\.symtab' contains 11 entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND
+ +1: 0+ +0 +SECTION +LOCAL +DEFAULT +1
+ +2: 0+ +0 +SECTION +LOCAL +DEFAULT +2
+ +3: 0+ +0 +SECTION +LOCAL +DEFAULT +3
+ +4: 0+ +0 +FUNC +GLOBAL +DEFAULT +1 Main
+ +5: 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +ABS ext1
+ +6: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
+#...
+
+Hex dump of section '\.text':
+ 0x0+ e3fd0001 .*
+
+Hex dump of section '\.MMIX\.spec_data\.2':
+ 0x0+ 0000002a 0000002a .*
+
+Hex dump of section '\.MMIX\.spec_data\.3':
+ 0x0+ 000000fc .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec2.s b/binutils-2.21/ld/testsuite/ld-mmix/bspec2.s
new file mode 100644
index 0000000..f939d77
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec2.s
@@ -0,0 +1,3 @@
+ BSPEC 3
+ TETRA ext1
+ ESPEC
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec2m.d b/binutils-2.21/ld/testsuite/ld-mmix/bspec2m.d
new file mode 100644
index 0000000..11bd48e
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec2m.d
@@ -0,0 +1,21 @@
+#source: bspec1.s
+#source: bspec2.s
+#source: bspec1.s
+#source: start.s
+#source: ext1.s
+#ld: -m mmo
+#objdump: -str
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+fc g \*ABS\* ext1
+0+ g \.text _start
+
+Contents of section \.text:
+ 0+ e3fd0001 .*
+Contents of section \.MMIX\.spec_data\.2:
+ 0000 0000002a 0000002a .*
+Contents of section \.MMIX\.spec_data\.3:
+ 0000 000000fc .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec801.s b/binutils-2.21/ld/testsuite/ld-mmix/bspec801.s
new file mode 100644
index 0000000..9c62909
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec801.s
@@ -0,0 +1,3 @@
+ BSPEC 80
+ TETRA 0x98000001
+ ESPEC
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec802.s b/binutils-2.21/ld/testsuite/ld-mmix/bspec802.s
new file mode 100644
index 0000000..13cbec4
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec802.s
@@ -0,0 +1,7 @@
+ BSPEC 80
+ TETRA 4 % Decent section length name (in 32-bit words). However...
+ ESPEC % Everything ends here. The next thing is a LOP_LOC for .data, or
+ % an ending LOP-something, hence a non-LOP_QUOTE in the name.
+
+ .data
+ TETRA 0x112233
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec803.s b/binutils-2.21/ld/testsuite/ld-mmix/bspec803.s
new file mode 100644
index 0000000..64b5e3b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec803.s
@@ -0,0 +1,9 @@
+ BSPEC 80
+ TETRA 2 % Decent section length name (in 32-bit words). However...
+ BYTE "aaaa"
+ BYTE 0x98,"aaa" # A LOP_QUOTEd part here. And also...
+ ESPEC % Everything ends here. The next thing is a LOP_LOC for .data, or
+ % an ending LOP-something, hence a non-LOP_QUOTE in the section flags.
+
+ .data
+ TETRA 0x112233
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec804.s b/binutils-2.21/ld/testsuite/ld-mmix/bspec804.s
new file mode 100644
index 0000000..2c64c0a
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec804.s
@@ -0,0 +1,9 @@
+ BSPEC 80
+ TETRA 2 % Decent section length name (in 32-bit words).
+ BYTE "aaaaaaaa"
+ TETRA 0x11 % Flags. However...
+ ESPEC % Everything ends here. The next thing is a LOP_LOC for .data, or
+ % an ending LOP-something, hence a non-LOP_QUOTE in the section
+ % length, high part.
+ .data
+ TETRA 0x112233
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec805.s b/binutils-2.21/ld/testsuite/ld-mmix/bspec805.s
new file mode 100644
index 0000000..a5c09e3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec805.s
@@ -0,0 +1,10 @@
+ BSPEC 80
+ TETRA 2 % Decent section length name (in 32-bit words).
+ BYTE "aaaaaaaa"
+ TETRA 0x11 % Flags.
+ TETRA 0 % Decent high-part of section length. However...
+ ESPEC % Everything ends here. The next thing is a LOP_LOC for .data, or
+ % an ending LOP-something, hence a non-LOP_QUOTE in the section
+ % length, high part.
+ .data
+ TETRA 0x112233
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec806.s b/binutils-2.21/ld/testsuite/ld-mmix/bspec806.s
new file mode 100644
index 0000000..8f6c75f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec806.s
@@ -0,0 +1,10 @@
+ BSPEC 80
+ TETRA 2 % Decent section length name (in 32-bit words).
+ BYTE "aaaaaaaa"
+ TETRA 0x11 % Flags.
+ OCTA 12 % Decent section length. However...
+ ESPEC % Everything ends here. The next thing is a LOP_LOC for .data, or
+ % an ending LOP-something, hence a non-LOP_QUOTE in the section
+ % length, high part.
+ .data
+ TETRA 0x112233
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec807.s b/binutils-2.21/ld/testsuite/ld-mmix/bspec807.s
new file mode 100644
index 0000000..3c16c12
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec807.s
@@ -0,0 +1,9 @@
+ BSPEC 80
+ TETRA 2 % Decent section length name (in 32-bit words).
+ BYTE "aaaaaaaa"
+ TETRA 0x11 % Flags.
+ TETRA 0,12 % Decent section length. However...
+ TETRA 0 % Things end stops after the high part of the VMA.
+ ESPEC
+ .data
+ TETRA 0x112233
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bspec808.s b/binutils-2.21/ld/testsuite/ld-mmix/bspec808.s
new file mode 100644
index 0000000..b8fc495
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bspec808.s
@@ -0,0 +1,9 @@
+ BSPEC 80
+ TETRA 2 % Decent section length name (in 32-bit words).
+ BYTE "aaaaaaaa"
+ TETRA 0x11 % Flags.
+ TETRA 0xff00,0 % Indecent section length
+ TETRA 0xff,0 % Decent vma.
+ ESPEC
+ .data
+ TETRA 0x112233
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bza-1b.d b/binutils-2.21/ld/testsuite/ld-mmix/bza-1b.d
new file mode 100644
index 0000000..dcd0313
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bza-1b.d
@@ -0,0 +1,26 @@
+#source: start.s
+#source: a.s
+#source: bza.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <bza>:
+ 8: e3fd0002 setl \$253,0x2
+ c: 5aea0006 pbnz \$234,24 <bza\+0x1c>
+ 10: e3ff0004 setl \$255,0x4
+ 14: e6ff0000 incml \$255,0x0
+ 18: e5ff0000 incmh \$255,0x0
+ 1c: e4ff0000 inch \$255,0x0
+ 20: 9fffff00 go \$255,\$255,0
+ 24: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bza-1f.d b/binutils-2.21/ld/testsuite/ld-mmix/bza-1f.d
new file mode 100644
index 0000000..bc4006f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bza-1f.d
@@ -0,0 +1,26 @@
+#source: start.s
+#source: bza.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <bza>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: 5aea0006 pbnz \$234,20 <bza\+0x1c>
+ c: e3ff0024 setl \$255,0x24
+ 10: e6ff0000 incml \$255,0x0
+ 14: e5ff0000 incmh \$255,0x0
+ 18: e4ff0000 inch \$255,0x0
+ 1c: 9fffff00 go \$255,\$255,0
+ 20: e3fd0003 setl \$253,0x3
+
+0+24 <a>:
+ 24: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bza-2b.d b/binutils-2.21/ld/testsuite/ld-mmix/bza-2b.d
new file mode 100644
index 0000000..a5d9b28
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bza-2b.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: a.s
+#source: bza.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <bza>:
+ 8: e3fd0002 setl \$253,0x2
+ c: 43eafffe bz \$234,4 <a>
+ 10: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bza-2f.d b/binutils-2.21/ld/testsuite/ld-mmix/bza-2f.d
new file mode 100644
index 0000000..21a6ca9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bza-2f.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: bza.s
+#source: a.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <bza>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: 42ea0002 bz \$234,10 <a>
+ c: e3fd0003 setl \$253,0x3
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bza-7b.d b/binutils-2.21/ld/testsuite/ld-mmix/bza-7b.d
new file mode 100644
index 0000000..ab98ad3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bza-7b.d
@@ -0,0 +1,26 @@
+#source: start.s
+#source: a.s
+#source: bza.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <bza>:
+ 8: e3fd0002 setl \$253,0x2
+ c: 5aea0006 pbnz \$234,24 <bza\+0x1c>
+ 10: e3ff0004 setl \$255,0x4
+ 14: e6ff0000 incml \$255,0x0
+ 18: e5ff0000 incmh \$255,0x0
+ 1c: e4ff0000 inch \$255,0x0
+ 20: 9fffff00 go \$255,\$255,0
+ 24: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bza-7f.d b/binutils-2.21/ld/testsuite/ld-mmix/bza-7f.d
new file mode 100644
index 0000000..be2ea56
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bza-7f.d
@@ -0,0 +1,26 @@
+#source: start.s
+#source: bza.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <bza>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: 5aea0006 pbnz \$234,20 <bza\+0x1c>
+ c: e3ff0024 setl \$255,0x24
+ 10: e6ff0000 incml \$255,0x0
+ 14: e5ff0000 incmh \$255,0x0
+ 18: e4ff0000 inch \$255,0x0
+ 1c: 9fffff00 go \$255,\$255,0
+ 20: e3fd0003 setl \$253,0x3
+
+0+24 <a>:
+ 24: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bza-8b.d b/binutils-2.21/ld/testsuite/ld-mmix/bza-8b.d
new file mode 100644
index 0000000..b0eef74
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bza-8b.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: a.s
+#source: bza.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <bza>:
+ 8: e3fd0002 setl \$253,0x2
+ c: 43eafffe bz \$234,4 <a>
+ 10: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bza-8f.d b/binutils-2.21/ld/testsuite/ld-mmix/bza-8f.d
new file mode 100644
index 0000000..2d2a521
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bza-8f.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: bza.s
+#source: a.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <bza>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: 42ea0002 bz \$234,10 <a>
+ c: e3fd0003 setl \$253,0x3
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/bza.s b/binutils-2.21/ld/testsuite/ld-mmix/bza.s
new file mode 100644
index 0000000..4cf848d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/bza.s
@@ -0,0 +1,7 @@
+* Just BEQs to an external symbol, with some padding.
+ .text
+ .global bza
+bza:
+ SET $253,2
+ BZ $234,a
+ SET $253,3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/data1.s b/binutils-2.21/ld/testsuite/ld-mmix/data1.s
new file mode 100644
index 0000000..0f4baf9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/data1.s
@@ -0,0 +1,2 @@
+ LOC #20 << 56
+xx OCTA Main+44
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/dloc1.s b/binutils-2.21/ld/testsuite/ld-mmix/dloc1.s
new file mode 100644
index 0000000..ba095c4
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/dloc1.s
@@ -0,0 +1,3 @@
+ LOC #20 << 56 + #200
+dloc1 TETRA 4,5,6
+ .global dloc1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/dloc2.s b/binutils-2.21/ld/testsuite/ld-mmix/dloc2.s
new file mode 100644
index 0000000..704da08
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/dloc2.s
@@ -0,0 +1,3 @@
+ LOC #20 << 56 + #200
+dloc2 TETRA 7,8,9
+ .global dloc2
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/ext1-254.s b/binutils-2.21/ld/testsuite/ld-mmix/ext1-254.s
new file mode 100644
index 0000000..baaf22f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/ext1-254.s
@@ -0,0 +1,2 @@
+ .global ext1
+ext1 IS 254
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/ext1.s b/binutils-2.21/ld/testsuite/ld-mmix/ext1.s
new file mode 100644
index 0000000..d69420e
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/ext1.s
@@ -0,0 +1,2 @@
+ .global ext1
+ext1 IS 252
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/ext1g.s b/binutils-2.21/ld/testsuite/ld-mmix/ext1g.s
new file mode 100644
index 0000000..1a167ab
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/ext1g.s
@@ -0,0 +1,2 @@
+ .global ext1
+ext1 GREG
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/ext1l.s b/binutils-2.21/ld/testsuite/ld-mmix/ext1l.s
new file mode 100644
index 0000000..b7e6096
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/ext1l.s
@@ -0,0 +1,2 @@
+ .global ext1
+ext1 SWYM 4,8,16
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-1b.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-1b.d
new file mode 100644
index 0000000..84b477d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-1b.d
@@ -0,0 +1,24 @@
+#source: start.s
+#source: a.s
+#source: getaa.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <getaa>:
+ 8: e3fd0002 setl \$253,0x2
+ c: e37b0004 setl \$123,0x4
+ 10: e67b0000 incml \$123,0x0
+ 14: e57b0000 incmh \$123,0x0
+ 18: e47b0000 inch \$123,0x0
+ 1c: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-1f.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-1f.d
new file mode 100644
index 0000000..cc628a2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-1f.d
@@ -0,0 +1,24 @@
+#source: start.s
+#source: getaa.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <getaa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: e37b001c setl \$123,0x1c
+ c: e67b0000 incml \$123,0x0
+ 10: e57b0000 incmh \$123,0x0
+ 14: e47b0000 inch \$123,0x0
+ 18: e3fd0003 setl \$253,0x3
+
+0+1c <a>:
+ 1c: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-2b.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-2b.d
new file mode 100644
index 0000000..4300128
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-2b.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: a.s
+#source: getaa.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <getaa>:
+ 8: e3fd0002 setl \$253,0x2
+ c: f57bfffe geta \$123,4 <a>
+ 10: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-2f.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-2f.d
new file mode 100644
index 0000000..fd32834
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-2f.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: getaa.s
+#source: a.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <getaa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f47b0002 geta \$123,10 <a>
+ c: e3fd0003 setl \$253,0x3
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-4b.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-4b.d
new file mode 100644
index 0000000..1a3614b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-4b.d
@@ -0,0 +1,26 @@
+#source: start.s
+#source: a.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: getaa.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+ \.\.\.
+
+0+40000 <getaa>:
+ 40000: e3fd0002 setl \$253,0x2
+ 40004: f57b0000 geta \$123,4 <a>
+ 40008: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-4f.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-4f.d
new file mode 100644
index 0000000..30062a6
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-4f.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: getaa.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: a.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <getaa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f47bffff geta \$123,40004 <a>
+ c: e3fd0003 setl \$253,0x3
+ \.\.\.
+
+0+40004 <a>:
+ 40004: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-6b.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-6b.d
new file mode 100644
index 0000000..0d3c711
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-6b.d
@@ -0,0 +1,11 @@
+#source: start.s
+#source: a.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pad4.s
+#source: getaa.s
+#as: -no-expand
+#ld: -m elf64mmix
+#error: relocation truncated to fit: R_MMIX_ADDR19 against symbol `a'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-6f.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-6f.d
new file mode 100644
index 0000000..370f614
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-6f.d
@@ -0,0 +1,10 @@
+#source: start.s
+#source: getaa.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#as: -no-expand
+#ld: -m elf64mmix
+#error: relocation truncated to fit: R_MMIX_ADDR19 against symbol `a'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-7b.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-7b.d
new file mode 100644
index 0000000..7a71c31
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-7b.d
@@ -0,0 +1,24 @@
+#source: start.s
+#source: a.s
+#source: getaa.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section .text:
+
+0+ <(Main|_start)>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <getaa>:
+ 8: e3fd0002 setl \$253,0x2
+ c: e37b0004 setl \$123,0x4
+ 10: e67b0000 incml \$123,0x0
+ 14: e57b0000 incmh \$123,0x0
+ 18: e47b0000 inch \$123,0x0
+ 1c: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-7f.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-7f.d
new file mode 100644
index 0000000..ea831a9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-7f.d
@@ -0,0 +1,24 @@
+#source: start.s
+#source: getaa.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <getaa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: e37b001c setl \$123,0x1c
+ c: e67b0000 incml \$123,0x0
+ 10: e57b0000 incmh \$123,0x0
+ 14: e47b0000 inch \$123,0x0
+ 18: e3fd0003 setl \$253,0x3
+
+0+1c <a>:
+ 1c: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-8b.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-8b.d
new file mode 100644
index 0000000..a54cc10
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-8b.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: a.s
+#source: getaa.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <getaa>:
+ 8: e3fd0002 setl \$253,0x2
+ c: f57bfffe geta \$123,4 <a>
+ 10: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa-8f.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa-8f.d
new file mode 100644
index 0000000..4ba7307
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa-8f.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: getaa.s
+#source: a.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0+: e3fd0001 setl \$253,0x1
+
+0+4 <getaa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f47b0002 geta \$123,10 <a>
+ c: e3fd0003 setl \$253,0x3
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa.s b/binutils-2.21/ld/testsuite/ld-mmix/getaa.s
new file mode 100644
index 0000000..cc4dfb7
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa.s
@@ -0,0 +1,7 @@
+* Just geta an external symbol, with some padding.
+ .text
+ .global getaa
+getaa:
+ SET $253,2
+ GETA $123,a
+ SET $253,3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa12b.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa12b.d
new file mode 100644
index 0000000..c4e49e4
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa12b.d
@@ -0,0 +1,26 @@
+#source: start.s
+#source: a.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: getaa.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+ \.\.\.
+
+0+40000 <getaa>:
+ 40000: e3fd0002 setl \$253,0x2
+ 40004: f57b0000 geta \$123,4 <a>
+ 40008: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa12f.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa12f.d
new file mode 100644
index 0000000..d80a39c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa12f.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: getaa.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: a.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <getaa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f47bffff geta \$123,40004 <a>
+ c: e3fd0003 setl \$253,0x3
+ \.\.\.
+
+0+40004 <a>:
+ 40004: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa14b.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa14b.d
new file mode 100644
index 0000000..47f37b9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa14b.d
@@ -0,0 +1,11 @@
+#source: start.s
+#source: a.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pad4.s
+#source: getaa.s
+#as: -no-expand
+#ld: -m mmo
+#error: relocation truncated to fit: R_MMIX_ADDR19 against `a'$
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/getaa14f.d b/binutils-2.21/ld/testsuite/ld-mmix/getaa14f.d
new file mode 100644
index 0000000..58eb70b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/getaa14f.d
@@ -0,0 +1,10 @@
+#source: start.s
+#source: getaa.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#as: -no-expand
+#ld: -m mmo
+#error: relocation truncated to fit: R_MMIX_ADDR19 against `a'$
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-1.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-1.d
new file mode 100644
index 0000000..d64ce0a
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-1.d
@@ -0,0 +1,27 @@
+#source: greg-1.s
+#source: gregldo1.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -dt
+
+# Most simple greg usage: relocate to each possible location within an
+# insn.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+c g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+#...
+
+Disassembly of section \.text:
+
+0+ <_start-0xc>:
+ 0: 8c0c20fe ldo \$12,\$32,\$254
+ 4: 8d7bfe22 ldo \$123,\$254,34
+ 8: 8dfeea38 ldo \$254,\$234,56
+
+0+c <_start>:
+ c: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-1.s b/binutils-2.21/ld/testsuite/ld-mmix/greg-1.s
new file mode 100644
index 0000000..821460c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-1.s
@@ -0,0 +1,3 @@
+# Have a single GREG register allocation.
+ .global areg
+areg GREG 123456789101112
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-10.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-10.d
new file mode 100644
index 0000000..acc702d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-10.d
@@ -0,0 +1,25 @@
+#source: greg-1.s
+#source: gregldo1.s
+#source: start.s
+#ld: -m mmo
+#objdump: -dt
+
+# Most simple greg usage: relocate to each possible location within an
+# insn; mmo.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+c g \.text Main
+0+c g \.text _start
+0+fe g \*REG\* areg
+
+Disassembly of section \.text:
+
+0+ <Main-0xc>:
+ 0: 8c0c20fe ldo \$12,\$32,areg
+ 4: 8d7bfe22 ldo \$123,areg,34
+ 8: 8dfeea38 ldo areg,\$234,56
+
+0+c <(Main|_start)>:
+ c: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-11.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-11.d
new file mode 100644
index 0000000..5fc474b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-11.d
@@ -0,0 +1,39 @@
+#source: greg-1.s
+#source: gregldo1.s
+#source: gregget2.s
+#source: a.s
+#source: greg-3.s
+#source: start.s
+#source: greg-2.s
+#as: -x
+#ld: -m mmo
+#objdump: -dt
+
+# Have two used gregs and one unused, mmo.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+20 g \.text Main
+0+fe g \*REG\* b
+0+20 g \.text _start
+0+fc g \*REG\* areg
+0+fd g \*REG\* c
+0+1c g \.text a
+
+Disassembly of section \.text:
+
+0+ <a-0x1c>:
+ 0: 8c0c20fc ldo \$12,\$32,areg
+ 4: 8d7bfc22 ldo \$123,areg,34
+ 8: 8dfcea38 ldo areg,\$234,56
+ c: e3fe001c setl b,0x1c
+ 10: e6fe0000 incml b,0x0
+ 14: e5fe0000 incmh b,0x0
+ 18: e4fe0000 inch b,0x0
+
+0+1c <a>:
+ 1c: e3fd0004 setl c,0x4
+
+0+20 <(Main|_start)>:
+ 20: e3fd0001 setl c,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-11b.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-11b.d
new file mode 100644
index 0000000..50665d0
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-11b.d
@@ -0,0 +1,32 @@
+#source: greg-1.s
+#source: gregldo1.s
+#source: gregget2.s
+#source: a.s
+#source: greg-3.s
+#source: start.s
+#source: greg-2.s
+#as: -x
+#ld: -m mmo
+#objdump: -str
+
+# Have two used gregs and one unused, mmo; display contents to visualize
+# mmo bug with register contents.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+20 g \.text Main
+0+fe g \*REG\* b
+0+20 g \.text _start
+0+fc g \*REG\* areg
+0+fd g \*REG\* c
+0+1c g \.text a
+
+
+Contents of section \.text:
+ 0+ 8c0c20fc 8d7bfc22 8dfcea38 e3fe001c .*
+ 0+10 e6fe0000 e5fe0000 e4fe0000 e3fd0004 .*
+ 0+20 e3fd0001 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e0 00007048 860f3a38 00000000 00000042 .*
+ 07f0 007acf50 505a30a2 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-12.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-12.d
new file mode 100644
index 0000000..b438632
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-12.d
@@ -0,0 +1,34 @@
+#source: greg-1.s
+#source: gregget1.s
+#source: start.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#objdump: -dt
+
+# A greg usage with an expanding insn. The register reloc must be
+# evaluated before the expanding reloc. Here, it doesn't appear in the
+# wrong order, and it doesn't seem like they would naturally appear in the
+# wrong order, but anyway; mmo.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+10 g \.text Main
+0+10 g \.text _start
+0+fe g \*REG\* areg
+0+14 g \.text a
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)-0x10>:
+ 0: e3fe0014 setl areg,0x14
+ 4: e6fe0000 incml areg,0x0
+ 8: e5fe0000 incmh areg,0x0
+ c: e4fe0000 inch areg,0x0
+
+0+10 <(Main|_start)>:
+ 10: e3fd0001 setl \$253,0x1
+
+0+14 <a>:
+ 14: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-13.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-13.d
new file mode 100644
index 0000000..091cf46
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-13.d
@@ -0,0 +1,33 @@
+#source: greg-1.s
+#source: gregbza1.s
+#source: start.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#objdump: -dt
+
+# Like greg-3, but a different expanding insn, mmo.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+18 g \.text Main
+0+18 g \.text _start
+0+fe g \*REG\* areg
+0+1c g \.text a
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)-0x18>:
+ 0: 5afe0006 pbnz areg,18 <(Main|_start)>
+ 4: e3ff001c setl \$255,0x1c
+ 8: e6ff0000 incml \$255,0x0
+ c: e5ff0000 incmh \$255,0x0
+ 10: e4ff0000 inch \$255,0x0
+ 14: 9fffff00 go \$255,\$255,0
+
+0+18 <(Main|_start)>:
+ 18: e3fd0001 setl \$253,0x1
+
+0+1c <a>:
+ 1c: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-14.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-14.d
new file mode 100644
index 0000000..19cc451
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-14.d
@@ -0,0 +1,32 @@
+#source: greg-1.s
+#source: gregpsj1.s
+#source: start.s
+#source: a.s
+#as: -x --no-pushj-stubs
+#ld: -m mmo
+#objdump: -dt
+
+# Like greg-3, but a different expanding insn.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+14 g \.text Main
+0+14 g \.text _start
+0+fe g \*REG\* areg
+0+18 g \.text a
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)-0x14>:
+ 0: e3ff0018 setl \$255,0x18
+ 4: e6ff0000 incml \$255,0x0
+ 8: e5ff0000 incmh \$255,0x0
+ c: e4ff0000 inch \$255,0x0
+ 10: bffeff00 pushgo areg,\$255,0
+
+0+14 <(Main|_start)>:
+ 14: e3fd0001 setl \$253,0x1
+
+0+18 <a>:
+ 18: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-14s.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-14s.d
new file mode 100644
index 0000000..466661c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-14s.d
@@ -0,0 +1,23 @@
+#source: greg-1.s
+#source: gregpsj1.s
+#source: start.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#objdump: -dt
+
+# Like greg-14, but using PUSHJ stubs.
+
+.*: file format mmo
+SYMBOL TABLE:
+0+4 g \.text Main
+0+4 g \.text _start
+0+fe g \*REG\* areg
+0+8 g \.text a
+Disassembly of section \.text:
+0+ <(Main|_start)-0x4>:
+ 0: f2fe0002 pushj areg,8 <a>
+0+4 <(Main|_start)>:
+ 4: e3fd0001 setl \$253,0x1
+0+8 <a>:
+ 8: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-15.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-15.d
new file mode 100644
index 0000000..4b54153
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-15.d
@@ -0,0 +1,59 @@
+#source: gregget1.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-1.s
+#source: a.s
+#source: start.s
+#as: -x
+#ld: -m mmo
+#objdump: -dt
+
+# Allocating the maximum number of gregs and referring to one at the end
+# still works, mmo.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+14 g \.text Main
+0+14 g \.text _start
+0+fe g \*REG\* areg
+0+10 g \.text a
+
+Disassembly of section \.text:
+
+0+ <a-0x10>:
+ 0: e3fe0010 setl areg,0x10
+ 4: e6fe0000 incml areg,0x0
+ 8: e5fe0000 incmh areg,0x0
+ c: e4fe0000 inch areg,0x0
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
+
+0+14 <(Main|_start)>:
+ 14: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-16.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-16.d
new file mode 100644
index 0000000..80b2338
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-16.d
@@ -0,0 +1,59 @@
+#source: gregget1.s
+#source: greg-1.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: a.s
+#source: start.s
+#as: -x
+#ld: -m mmo
+#objdump: -dt
+
+# Allocating the maximum number of gregs and referring to one at the
+# *other* end still works, mmo.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+14 g \.text Main
+0+14 g \.text _start
+0+20 g \*REG\* areg
+0+10 g \.text a
+
+Disassembly of section \.text:
+
+0+ <a-0x10>:
+ 0: e3200010 setl areg,0x10
+ 4: e6200000 incml areg,0x0
+ 8: e5200000 incmh areg,0x0
+ c: e4200000 inch areg,0x0
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
+
+0+14 <(Main|_start)>:
+ 14: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-17.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-17.d
new file mode 100644
index 0000000..e1af4b5
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-17.d
@@ -0,0 +1,37 @@
+#source: gregget1.s
+#source: greg-1.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: a.s
+#source: start.s
+#as: -x
+#ld: -m mmo
+#error: Too many global registers: 224, max 223
+
+# Allocating the maximum number of gregs *plus one* is an error, mmo.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-18.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-18.d
new file mode 100644
index 0000000..ed1bbaf
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-18.d
@@ -0,0 +1,39 @@
+#source: gregget1.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-1.s
+#source: a.s
+#source: start.s
+#as: -x
+#ld: -m mmo
+#objdump: -dt
+#error: Too many global registers: 224, max 223
+
+# Allocating the maximum number of gregs *plus one* is an error; other end
+# of the stick, mmo.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-19.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-19.d
new file mode 100644
index 0000000..4468161
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-19.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: aregm.s
+#source: gregldo1.s
+#ld: -m elf64mmix
+#objdump: -str
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+ g F \.text 0+ Main
+0+ g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+#...
+
+Contents of section \.text:
+ 0+ e3fd0001 8f03fe10 8e0307fe 8f05fe04 .*
+ 0+10 8c0c20fe 8d7bfe22 8dfeea38 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000004 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-2.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-2.d
new file mode 100644
index 0000000..ab8fbb2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-2.d
@@ -0,0 +1,41 @@
+#source: greg-1.s
+#source: gregldo1.s
+#source: gregget2.s
+#source: a.s
+#source: greg-3.s
+#source: start.s
+#source: greg-2.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dt
+
+# Have two used gregs and one unused.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7e0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+fe g \*REG\* 0+ b
+0+20 g \.text 0+ _start
+0+fc g \*REG\* 0+ areg
+0+fd g \*REG\* 0+ c
+#...
+0+1c g \.text 0+ a
+
+Disassembly of section \.text:
+
+0+ <a-0x1c>:
+ 0: 8c0c20fc ldo \$12,\$32,\$252
+ 4: 8d7bfc22 ldo \$123,\$252,34
+ 8: 8dfcea38 ldo \$252,\$234,56
+ c: e3fe001c setl \$254,0x1c
+ 10: e6fe0000 incml \$254,0x0
+ 14: e5fe0000 incmh \$254,0x0
+ 18: e4fe0000 inch \$254,0x0
+
+0+1c <a>:
+ 1c: e3fd0004 setl \$253,0x4
+
+0+20 <_start>:
+ 20: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-2.s b/binutils-2.21/ld/testsuite/ld-mmix/greg-2.s
new file mode 100644
index 0000000..588cbf1
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-2.s
@@ -0,0 +1,3 @@
+# Have another GREG register allocation.
+ .global b
+b GREG 34567891011121314
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-20.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-20.d
new file mode 100644
index 0000000..10daa08
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-20.d
@@ -0,0 +1,18 @@
+#source: start.s
+#source: aregm.s
+#source: gregldo1.s
+#ld: -m mmo
+#objdump: -str
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+fe g \*REG\* areg
+
+Contents of section \.text:
+ 0+ e3fd0001 8f03fe10 8e0307fe 8f05fe04 .*
+ 0+10 8c0c20fe 8d7bfe22 8dfeea38 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000004 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-3.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-3.d
new file mode 100644
index 0000000..25189c2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-3.d
@@ -0,0 +1,36 @@
+#source: greg-1.s
+#source: gregget1.s
+#source: start.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dt
+
+# A greg usage with an expanding insn. The register reloc must be
+# evaluated before the expanding reloc. Here, it doesn't appear in the
+# wrong order, and it doesn't seem like they would naturally appear in the
+# wrong order, but anyway.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+10 g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+#...
+0+14 g \.text 0+ a
+
+Disassembly of section \.text:
+
+0+ <_start-0x10>:
+ 0: e3fe0014 setl \$254,0x14
+ 4: e6fe0000 incml \$254,0x0
+ 8: e5fe0000 incmh \$254,0x0
+ c: e4fe0000 inch \$254,0x0
+
+0+10 <_start>:
+ 10: e3fd0001 setl \$253,0x1
+
+0+14 <a>:
+ 14: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-3.s b/binutils-2.21/ld/testsuite/ld-mmix/greg-3.s
new file mode 100644
index 0000000..5248591
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-3.s
@@ -0,0 +1,3 @@
+# Have yet another GREG register allocation.
+ .global c
+c GREG #42
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-4.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-4.d
new file mode 100644
index 0000000..8b882c1
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-4.d
@@ -0,0 +1,35 @@
+#source: greg-1.s
+#source: gregbza1.s
+#source: start.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dt
+
+# Like greg-3, but a different expanding insn.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+18 g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+#...
+0+1c g \.text 0+ a
+
+Disassembly of section \.text:
+
+0+ <_start-0x18>:
+ 0: 5afe0006 pbnz \$254,18 <_start>
+ 4: e3ff001c setl \$255,0x1c
+ 8: e6ff0000 incml \$255,0x0
+ c: e5ff0000 incmh \$255,0x0
+ 10: e4ff0000 inch \$255,0x0
+ 14: 9fffff00 go \$255,\$255,0
+
+0+18 <_start>:
+ 18: e3fd0001 setl \$253,0x1
+
+0+1c <a>:
+ 1c: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-4.s b/binutils-2.21/ld/testsuite/ld-mmix/greg-4.s
new file mode 100644
index 0000000..5e5a30f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-4.s
@@ -0,0 +1,2 @@
+# A single local greg.
+lsym GREG 78
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-5.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-5.d
new file mode 100644
index 0000000..67e50d2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-5.d
@@ -0,0 +1,34 @@
+#source: greg-1.s
+#source: gregpsj1.s
+#source: start.s
+#source: a.s
+#as: -x --no-pushj-stubs
+#ld: -m elf64mmix
+#objdump: -dt
+
+# Like greg-3, but a different expanding insn.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+14 g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+#...
+0+18 g \.text 0+ a
+
+Disassembly of section \.text:
+
+0+ <_start-0x14>:
+ 0: e3ff0018 setl \$255,0x18
+ 4: e6ff0000 incml \$255,0x0
+ 8: e5ff0000 incmh \$255,0x0
+ c: e4ff0000 inch \$255,0x0
+ 10: bffeff00 pushgo \$254,\$255,0
+
+0+14 <_start>:
+ 14: e3fd0001 setl \$253,0x1
+
+0+18 <a>:
+ 18: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-5.s b/binutils-2.21/ld/testsuite/ld-mmix/greg-5.s
new file mode 100644
index 0000000..65400af
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-5.s
@@ -0,0 +1,20 @@
+# 16 local gregs.
+A GREG
+B GREG
+C GREG
+D GREG
+
+E GREG
+F GREG
+G GREG
+H GREG
+
+I GREG
+J GREG
+K GREG
+L GREG
+
+M GREG
+N GREG
+O GREG
+P GREG
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-5s.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-5s.d
new file mode 100644
index 0000000..84f5951
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-5s.d
@@ -0,0 +1,25 @@
+#source: greg-1.s
+#source: gregpsj1.s
+#source: start.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dt
+
+# Like greg-3, but a different expanding insn.
+
+.*: file format elf64-mmix
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+4 g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+#...
+0+8 g \.text 0+ a
+Disassembly of section \.text:
+0+ <_start-0x4>:
+ 0: f2fe0002 pushj \$254,8 <a>
+0+4 <_start>:
+ 4: e3fd0001 setl \$253,0x1
+0+8 <a>:
+ 8: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-6.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-6.d
new file mode 100644
index 0000000..e4df905
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-6.d
@@ -0,0 +1,286 @@
+#source: gregget1.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-1.s
+#source: a.s
+#source: start.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dt
+
+# Allocating the maximum number of gregs and referring to one at the end
+# still works.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+0 l d \.text 0+ (|\.text)
+0+100 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+20 l \*REG\* 0+ P
+0+21 l \*REG\* 0+ O
+0+22 l \*REG\* 0+ N
+0+23 l \*REG\* 0+ M
+0+24 l \*REG\* 0+ L
+0+25 l \*REG\* 0+ K
+0+26 l \*REG\* 0+ J
+0+27 l \*REG\* 0+ I
+0+28 l \*REG\* 0+ H
+0+29 l \*REG\* 0+ G
+0+2a l \*REG\* 0+ F
+0+2b l \*REG\* 0+ E
+0+2c l \*REG\* 0+ D
+0+2d l \*REG\* 0+ C
+0+2e l \*REG\* 0+ B
+0+2f l \*REG\* 0+ A
+0+30 l \*REG\* 0+ P
+0+31 l \*REG\* 0+ O
+0+32 l \*REG\* 0+ N
+0+33 l \*REG\* 0+ M
+0+34 l \*REG\* 0+ L
+0+35 l \*REG\* 0+ K
+0+36 l \*REG\* 0+ J
+0+37 l \*REG\* 0+ I
+0+38 l \*REG\* 0+ H
+0+39 l \*REG\* 0+ G
+0+3a l \*REG\* 0+ F
+0+3b l \*REG\* 0+ E
+0+3c l \*REG\* 0+ D
+0+3d l \*REG\* 0+ C
+0+3e l \*REG\* 0+ B
+0+3f l \*REG\* 0+ A
+0+40 l \*REG\* 0+ P
+0+41 l \*REG\* 0+ O
+0+42 l \*REG\* 0+ N
+0+43 l \*REG\* 0+ M
+0+44 l \*REG\* 0+ L
+0+45 l \*REG\* 0+ K
+0+46 l \*REG\* 0+ J
+0+47 l \*REG\* 0+ I
+0+48 l \*REG\* 0+ H
+0+49 l \*REG\* 0+ G
+0+4a l \*REG\* 0+ F
+0+4b l \*REG\* 0+ E
+0+4c l \*REG\* 0+ D
+0+4d l \*REG\* 0+ C
+0+4e l \*REG\* 0+ B
+0+4f l \*REG\* 0+ A
+0+50 l \*REG\* 0+ P
+0+51 l \*REG\* 0+ O
+0+52 l \*REG\* 0+ N
+0+53 l \*REG\* 0+ M
+0+54 l \*REG\* 0+ L
+0+55 l \*REG\* 0+ K
+0+56 l \*REG\* 0+ J
+0+57 l \*REG\* 0+ I
+0+58 l \*REG\* 0+ H
+0+59 l \*REG\* 0+ G
+0+5a l \*REG\* 0+ F
+0+5b l \*REG\* 0+ E
+0+5c l \*REG\* 0+ D
+0+5d l \*REG\* 0+ C
+0+5e l \*REG\* 0+ B
+0+5f l \*REG\* 0+ A
+0+60 l \*REG\* 0+ P
+0+61 l \*REG\* 0+ O
+0+62 l \*REG\* 0+ N
+0+63 l \*REG\* 0+ M
+0+64 l \*REG\* 0+ L
+0+65 l \*REG\* 0+ K
+0+66 l \*REG\* 0+ J
+0+67 l \*REG\* 0+ I
+0+68 l \*REG\* 0+ H
+0+69 l \*REG\* 0+ G
+0+6a l \*REG\* 0+ F
+0+6b l \*REG\* 0+ E
+0+6c l \*REG\* 0+ D
+0+6d l \*REG\* 0+ C
+0+6e l \*REG\* 0+ B
+0+6f l \*REG\* 0+ A
+0+70 l \*REG\* 0+ P
+0+71 l \*REG\* 0+ O
+0+72 l \*REG\* 0+ N
+0+73 l \*REG\* 0+ M
+0+74 l \*REG\* 0+ L
+0+75 l \*REG\* 0+ K
+0+76 l \*REG\* 0+ J
+0+77 l \*REG\* 0+ I
+0+78 l \*REG\* 0+ H
+0+79 l \*REG\* 0+ G
+0+7a l \*REG\* 0+ F
+0+7b l \*REG\* 0+ E
+0+7c l \*REG\* 0+ D
+0+7d l \*REG\* 0+ C
+0+7e l \*REG\* 0+ B
+0+7f l \*REG\* 0+ A
+0+80 l \*REG\* 0+ P
+0+81 l \*REG\* 0+ O
+0+82 l \*REG\* 0+ N
+0+83 l \*REG\* 0+ M
+0+84 l \*REG\* 0+ L
+0+85 l \*REG\* 0+ K
+0+86 l \*REG\* 0+ J
+0+87 l \*REG\* 0+ I
+0+88 l \*REG\* 0+ H
+0+89 l \*REG\* 0+ G
+0+8a l \*REG\* 0+ F
+0+8b l \*REG\* 0+ E
+0+8c l \*REG\* 0+ D
+0+8d l \*REG\* 0+ C
+0+8e l \*REG\* 0+ B
+0+8f l \*REG\* 0+ A
+0+90 l \*REG\* 0+ P
+0+91 l \*REG\* 0+ O
+0+92 l \*REG\* 0+ N
+0+93 l \*REG\* 0+ M
+0+94 l \*REG\* 0+ L
+0+95 l \*REG\* 0+ K
+0+96 l \*REG\* 0+ J
+0+97 l \*REG\* 0+ I
+0+98 l \*REG\* 0+ H
+0+99 l \*REG\* 0+ G
+0+9a l \*REG\* 0+ F
+0+9b l \*REG\* 0+ E
+0+9c l \*REG\* 0+ D
+0+9d l \*REG\* 0+ C
+0+9e l \*REG\* 0+ B
+0+9f l \*REG\* 0+ A
+0+a0 l \*REG\* 0+ P
+0+a1 l \*REG\* 0+ O
+0+a2 l \*REG\* 0+ N
+0+a3 l \*REG\* 0+ M
+0+a4 l \*REG\* 0+ L
+0+a5 l \*REG\* 0+ K
+0+a6 l \*REG\* 0+ J
+0+a7 l \*REG\* 0+ I
+0+a8 l \*REG\* 0+ H
+0+a9 l \*REG\* 0+ G
+0+aa l \*REG\* 0+ F
+0+ab l \*REG\* 0+ E
+0+ac l \*REG\* 0+ D
+0+ad l \*REG\* 0+ C
+0+ae l \*REG\* 0+ B
+0+af l \*REG\* 0+ A
+0+b0 l \*REG\* 0+ P
+0+b1 l \*REG\* 0+ O
+0+b2 l \*REG\* 0+ N
+0+b3 l \*REG\* 0+ M
+0+b4 l \*REG\* 0+ L
+0+b5 l \*REG\* 0+ K
+0+b6 l \*REG\* 0+ J
+0+b7 l \*REG\* 0+ I
+0+b8 l \*REG\* 0+ H
+0+b9 l \*REG\* 0+ G
+0+ba l \*REG\* 0+ F
+0+bb l \*REG\* 0+ E
+0+bc l \*REG\* 0+ D
+0+bd l \*REG\* 0+ C
+0+be l \*REG\* 0+ B
+0+bf l \*REG\* 0+ A
+0+c0 l \*REG\* 0+ P
+0+c1 l \*REG\* 0+ O
+0+c2 l \*REG\* 0+ N
+0+c3 l \*REG\* 0+ M
+0+c4 l \*REG\* 0+ L
+0+c5 l \*REG\* 0+ K
+0+c6 l \*REG\* 0+ J
+0+c7 l \*REG\* 0+ I
+0+c8 l \*REG\* 0+ H
+0+c9 l \*REG\* 0+ G
+0+ca l \*REG\* 0+ F
+0+cb l \*REG\* 0+ E
+0+cc l \*REG\* 0+ D
+0+cd l \*REG\* 0+ C
+0+ce l \*REG\* 0+ B
+0+cf l \*REG\* 0+ A
+0+d0 l \*REG\* 0+ P
+0+d1 l \*REG\* 0+ O
+0+d2 l \*REG\* 0+ N
+0+d3 l \*REG\* 0+ M
+0+d4 l \*REG\* 0+ L
+0+d5 l \*REG\* 0+ K
+0+d6 l \*REG\* 0+ J
+0+d7 l \*REG\* 0+ I
+0+d8 l \*REG\* 0+ H
+0+d9 l \*REG\* 0+ G
+0+da l \*REG\* 0+ F
+0+db l \*REG\* 0+ E
+0+dc l \*REG\* 0+ D
+0+dd l \*REG\* 0+ C
+0+de l \*REG\* 0+ B
+0+df l \*REG\* 0+ A
+0+e0 l \*REG\* 0+ P
+0+e1 l \*REG\* 0+ O
+0+e2 l \*REG\* 0+ N
+0+e3 l \*REG\* 0+ M
+0+e4 l \*REG\* 0+ L
+0+e5 l \*REG\* 0+ K
+0+e6 l \*REG\* 0+ J
+0+e7 l \*REG\* 0+ I
+0+e8 l \*REG\* 0+ H
+0+e9 l \*REG\* 0+ G
+0+ea l \*REG\* 0+ F
+0+eb l \*REG\* 0+ E
+0+ec l \*REG\* 0+ D
+0+ed l \*REG\* 0+ C
+0+ee l \*REG\* 0+ B
+0+ef l \*REG\* 0+ A
+0+f0 l \*REG\* 0+ lsym
+0+f1 l \*REG\* 0+ lsym
+0+f2 l \*REG\* 0+ lsym
+0+f3 l \*REG\* 0+ lsym
+0+f4 l \*REG\* 0+ lsym
+0+f5 l \*REG\* 0+ lsym
+0+f6 l \*REG\* 0+ lsym
+0+f7 l \*REG\* 0+ lsym
+0+f8 l \*REG\* 0+ lsym
+0+f9 l \*REG\* 0+ lsym
+0+fa l \*REG\* 0+ lsym
+0+fb l \*REG\* 0+ lsym
+0+fc l \*REG\* 0+ lsym
+0+fd l \*REG\* 0+ lsym
+0+14 g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+2000000000000000 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ _edata
+2000000000000000 g \*ABS\* 0+ _end
+0+14 g \.text 0+ _start\.
+0+10 g \.text 0+ a
+
+Disassembly of section \.text:
+
+0+ <a-0x10>:
+ 0: e3fe0010 setl \$254,0x10
+ 4: e6fe0000 incml \$254,0x0
+ 8: e5fe0000 incmh \$254,0x0
+ c: e4fe0000 inch \$254,0x0
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
+
+0+14 <_start>:
+ 14: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-7.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-7.d
new file mode 100644
index 0000000..a5d1692
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-7.d
@@ -0,0 +1,286 @@
+#source: gregget1.s
+#source: greg-1.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: a.s
+#source: start.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dt
+
+# Allocating the maximum number of gregs and referring to one at the
+# *other* end still works.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+100 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
+0+21 l \*REG\* 0+ P
+0+22 l \*REG\* 0+ O
+0+23 l \*REG\* 0+ N
+0+24 l \*REG\* 0+ M
+0+25 l \*REG\* 0+ L
+0+26 l \*REG\* 0+ K
+0+27 l \*REG\* 0+ J
+0+28 l \*REG\* 0+ I
+0+29 l \*REG\* 0+ H
+0+2a l \*REG\* 0+ G
+0+2b l \*REG\* 0+ F
+0+2c l \*REG\* 0+ E
+0+2d l \*REG\* 0+ D
+0+2e l \*REG\* 0+ C
+0+2f l \*REG\* 0+ B
+0+30 l \*REG\* 0+ A
+0+31 l \*REG\* 0+ P
+0+32 l \*REG\* 0+ O
+0+33 l \*REG\* 0+ N
+0+34 l \*REG\* 0+ M
+0+35 l \*REG\* 0+ L
+0+36 l \*REG\* 0+ K
+0+37 l \*REG\* 0+ J
+0+38 l \*REG\* 0+ I
+0+39 l \*REG\* 0+ H
+0+3a l \*REG\* 0+ G
+0+3b l \*REG\* 0+ F
+0+3c l \*REG\* 0+ E
+0+3d l \*REG\* 0+ D
+0+3e l \*REG\* 0+ C
+0+3f l \*REG\* 0+ B
+0+40 l \*REG\* 0+ A
+0+41 l \*REG\* 0+ P
+0+42 l \*REG\* 0+ O
+0+43 l \*REG\* 0+ N
+0+44 l \*REG\* 0+ M
+0+45 l \*REG\* 0+ L
+0+46 l \*REG\* 0+ K
+0+47 l \*REG\* 0+ J
+0+48 l \*REG\* 0+ I
+0+49 l \*REG\* 0+ H
+0+4a l \*REG\* 0+ G
+0+4b l \*REG\* 0+ F
+0+4c l \*REG\* 0+ E
+0+4d l \*REG\* 0+ D
+0+4e l \*REG\* 0+ C
+0+4f l \*REG\* 0+ B
+0+50 l \*REG\* 0+ A
+0+51 l \*REG\* 0+ P
+0+52 l \*REG\* 0+ O
+0+53 l \*REG\* 0+ N
+0+54 l \*REG\* 0+ M
+0+55 l \*REG\* 0+ L
+0+56 l \*REG\* 0+ K
+0+57 l \*REG\* 0+ J
+0+58 l \*REG\* 0+ I
+0+59 l \*REG\* 0+ H
+0+5a l \*REG\* 0+ G
+0+5b l \*REG\* 0+ F
+0+5c l \*REG\* 0+ E
+0+5d l \*REG\* 0+ D
+0+5e l \*REG\* 0+ C
+0+5f l \*REG\* 0+ B
+0+60 l \*REG\* 0+ A
+0+61 l \*REG\* 0+ P
+0+62 l \*REG\* 0+ O
+0+63 l \*REG\* 0+ N
+0+64 l \*REG\* 0+ M
+0+65 l \*REG\* 0+ L
+0+66 l \*REG\* 0+ K
+0+67 l \*REG\* 0+ J
+0+68 l \*REG\* 0+ I
+0+69 l \*REG\* 0+ H
+0+6a l \*REG\* 0+ G
+0+6b l \*REG\* 0+ F
+0+6c l \*REG\* 0+ E
+0+6d l \*REG\* 0+ D
+0+6e l \*REG\* 0+ C
+0+6f l \*REG\* 0+ B
+0+70 l \*REG\* 0+ A
+0+71 l \*REG\* 0+ P
+0+72 l \*REG\* 0+ O
+0+73 l \*REG\* 0+ N
+0+74 l \*REG\* 0+ M
+0+75 l \*REG\* 0+ L
+0+76 l \*REG\* 0+ K
+0+77 l \*REG\* 0+ J
+0+78 l \*REG\* 0+ I
+0+79 l \*REG\* 0+ H
+0+7a l \*REG\* 0+ G
+0+7b l \*REG\* 0+ F
+0+7c l \*REG\* 0+ E
+0+7d l \*REG\* 0+ D
+0+7e l \*REG\* 0+ C
+0+7f l \*REG\* 0+ B
+0+80 l \*REG\* 0+ A
+0+81 l \*REG\* 0+ P
+0+82 l \*REG\* 0+ O
+0+83 l \*REG\* 0+ N
+0+84 l \*REG\* 0+ M
+0+85 l \*REG\* 0+ L
+0+86 l \*REG\* 0+ K
+0+87 l \*REG\* 0+ J
+0+88 l \*REG\* 0+ I
+0+89 l \*REG\* 0+ H
+0+8a l \*REG\* 0+ G
+0+8b l \*REG\* 0+ F
+0+8c l \*REG\* 0+ E
+0+8d l \*REG\* 0+ D
+0+8e l \*REG\* 0+ C
+0+8f l \*REG\* 0+ B
+0+90 l \*REG\* 0+ A
+0+91 l \*REG\* 0+ P
+0+92 l \*REG\* 0+ O
+0+93 l \*REG\* 0+ N
+0+94 l \*REG\* 0+ M
+0+95 l \*REG\* 0+ L
+0+96 l \*REG\* 0+ K
+0+97 l \*REG\* 0+ J
+0+98 l \*REG\* 0+ I
+0+99 l \*REG\* 0+ H
+0+9a l \*REG\* 0+ G
+0+9b l \*REG\* 0+ F
+0+9c l \*REG\* 0+ E
+0+9d l \*REG\* 0+ D
+0+9e l \*REG\* 0+ C
+0+9f l \*REG\* 0+ B
+0+a0 l \*REG\* 0+ A
+0+a1 l \*REG\* 0+ P
+0+a2 l \*REG\* 0+ O
+0+a3 l \*REG\* 0+ N
+0+a4 l \*REG\* 0+ M
+0+a5 l \*REG\* 0+ L
+0+a6 l \*REG\* 0+ K
+0+a7 l \*REG\* 0+ J
+0+a8 l \*REG\* 0+ I
+0+a9 l \*REG\* 0+ H
+0+aa l \*REG\* 0+ G
+0+ab l \*REG\* 0+ F
+0+ac l \*REG\* 0+ E
+0+ad l \*REG\* 0+ D
+0+ae l \*REG\* 0+ C
+0+af l \*REG\* 0+ B
+0+b0 l \*REG\* 0+ A
+0+b1 l \*REG\* 0+ P
+0+b2 l \*REG\* 0+ O
+0+b3 l \*REG\* 0+ N
+0+b4 l \*REG\* 0+ M
+0+b5 l \*REG\* 0+ L
+0+b6 l \*REG\* 0+ K
+0+b7 l \*REG\* 0+ J
+0+b8 l \*REG\* 0+ I
+0+b9 l \*REG\* 0+ H
+0+ba l \*REG\* 0+ G
+0+bb l \*REG\* 0+ F
+0+bc l \*REG\* 0+ E
+0+bd l \*REG\* 0+ D
+0+be l \*REG\* 0+ C
+0+bf l \*REG\* 0+ B
+0+c0 l \*REG\* 0+ A
+0+c1 l \*REG\* 0+ P
+0+c2 l \*REG\* 0+ O
+0+c3 l \*REG\* 0+ N
+0+c4 l \*REG\* 0+ M
+0+c5 l \*REG\* 0+ L
+0+c6 l \*REG\* 0+ K
+0+c7 l \*REG\* 0+ J
+0+c8 l \*REG\* 0+ I
+0+c9 l \*REG\* 0+ H
+0+ca l \*REG\* 0+ G
+0+cb l \*REG\* 0+ F
+0+cc l \*REG\* 0+ E
+0+cd l \*REG\* 0+ D
+0+ce l \*REG\* 0+ C
+0+cf l \*REG\* 0+ B
+0+d0 l \*REG\* 0+ A
+0+d1 l \*REG\* 0+ P
+0+d2 l \*REG\* 0+ O
+0+d3 l \*REG\* 0+ N
+0+d4 l \*REG\* 0+ M
+0+d5 l \*REG\* 0+ L
+0+d6 l \*REG\* 0+ K
+0+d7 l \*REG\* 0+ J
+0+d8 l \*REG\* 0+ I
+0+d9 l \*REG\* 0+ H
+0+da l \*REG\* 0+ G
+0+db l \*REG\* 0+ F
+0+dc l \*REG\* 0+ E
+0+dd l \*REG\* 0+ D
+0+de l \*REG\* 0+ C
+0+df l \*REG\* 0+ B
+0+e0 l \*REG\* 0+ A
+0+e1 l \*REG\* 0+ P
+0+e2 l \*REG\* 0+ O
+0+e3 l \*REG\* 0+ N
+0+e4 l \*REG\* 0+ M
+0+e5 l \*REG\* 0+ L
+0+e6 l \*REG\* 0+ K
+0+e7 l \*REG\* 0+ J
+0+e8 l \*REG\* 0+ I
+0+e9 l \*REG\* 0+ H
+0+ea l \*REG\* 0+ G
+0+eb l \*REG\* 0+ F
+0+ec l \*REG\* 0+ E
+0+ed l \*REG\* 0+ D
+0+ee l \*REG\* 0+ C
+0+ef l \*REG\* 0+ B
+0+f0 l \*REG\* 0+ A
+0+f1 l \*REG\* 0+ lsym
+0+f2 l \*REG\* 0+ lsym
+0+f3 l \*REG\* 0+ lsym
+0+f4 l \*REG\* 0+ lsym
+0+f5 l \*REG\* 0+ lsym
+0+f6 l \*REG\* 0+ lsym
+0+f7 l \*REG\* 0+ lsym
+0+f8 l \*REG\* 0+ lsym
+0+f9 l \*REG\* 0+ lsym
+0+fa l \*REG\* 0+ lsym
+0+fb l \*REG\* 0+ lsym
+0+fc l \*REG\* 0+ lsym
+0+fd l \*REG\* 0+ lsym
+0+fe l \*REG\* 0+ lsym
+0+14 g \.text 0+ _start
+0+20 g \*REG\* 0+ areg
+2000000000000000 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ _edata
+2000000000000000 g \*ABS\* 0+ _end
+0+14 g \.text 0+ _start\.
+0+10 g \.text 0+ a
+
+Disassembly of section \.text:
+
+0+ <a-0x10>:
+ 0: e3200010 setl \$32,0x10
+ 4: e6200000 incml \$32,0x0
+ 8: e5200000 incmh \$32,0x0
+ c: e4200000 inch \$32,0x0
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
+
+0+14 <_start>:
+ 14: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-8.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-8.d
new file mode 100644
index 0000000..cb6b776
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-8.d
@@ -0,0 +1,37 @@
+#source: gregget1.s
+#source: greg-1.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: a.s
+#source: start.s
+#as: -x
+#ld: -m elf64mmix
+#error: Too many global registers: 224, max 223
+
+# Allocating the maximum number of gregs *plus one* is an error.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/greg-9.d b/binutils-2.21/ld/testsuite/ld-mmix/greg-9.d
new file mode 100644
index 0000000..c9d9fcd
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/greg-9.d
@@ -0,0 +1,39 @@
+#source: gregget1.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-1.s
+#source: a.s
+#source: start.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dt
+#error: Too many global registers: 224, max 223
+
+# Allocating the maximum number of gregs *plus one* is an error; other end
+# of the stick.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/gregbza1.s b/binutils-2.21/ld/testsuite/ld-mmix/gregbza1.s
new file mode 100644
index 0000000..878c66f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/gregbza1.s
@@ -0,0 +1,4 @@
+# Use a symbolic register areg, presumably allocated by greg in another file.
+# The "BZ" will be expanded, and the reloc for areg must be resolved
+# before the other relocs for that insn.
+ BZ areg,a
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/gregget1.s b/binutils-2.21/ld/testsuite/ld-mmix/gregget1.s
new file mode 100644
index 0000000..49f97f0
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/gregget1.s
@@ -0,0 +1,4 @@
+# Use a symbolic register areg, presumably allocated by greg in another file.
+# The "GETA" will be expanded, and the reloc for areg must be resolved
+# before the other relocs for that insn.
+ GETA areg,a
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/gregget2.s b/binutils-2.21/ld/testsuite/ld-mmix/gregget2.s
new file mode 100644
index 0000000..855136c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/gregget2.s
@@ -0,0 +1,4 @@
+# Use a symbolic register b, presumably allocated by greg in another file.
+# The "GETA" will be expanded, and the reloc for b must be resolved before
+# the other relocs for that insn.
+ GETA b,a
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/gregldo1.s b/binutils-2.21/ld/testsuite/ld-mmix/gregldo1.s
new file mode 100644
index 0000000..a69bd8c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/gregldo1.s
@@ -0,0 +1,4 @@
+# Use a symbolic register areg, presumably allocated by greg in another file.
+ LDO $12,$32,areg
+ LDO $123,areg,34
+ LDO areg,$234,56
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/gregpsj1.s b/binutils-2.21/ld/testsuite/ld-mmix/gregpsj1.s
new file mode 100644
index 0000000..87b68a3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/gregpsj1.s
@@ -0,0 +1,4 @@
+# Use a symbolic register areg, presumably allocated by greg in another file.
+# The "PUSHJ" will be expanded, and the reloc for areg must be resolved
+# before the other relocs for that insn.
+ PUSHJ areg,a
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/hdr-1.d b/binutils-2.21/ld/testsuite/ld-mmix/hdr-1.d
new file mode 100644
index 0000000..3cb8265
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/hdr-1.d
@@ -0,0 +1,19 @@
+#source: start.s
+#source: a.s
+#ld: -T $srcdir/$subdir/mmohdr1.ld
+#objdump: -sht
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+8 0+100 0+100 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+SYMBOL TABLE:
+0+100 g \.text Main
+0+100 g \.text _start
+0+104 g \.text a
+
+
+Contents of section \.text:
+ 0100 e3fd0001 e3fd0004 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-1b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-1b.d
new file mode 100644
index 0000000..3baff9b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-1b.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: a.s
+#source: jumpa.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <jumpa>:
+ 8: e3fd0002 setl \$253,0x2
+ c: f1fffffe jmp 4 <a>
+ 10: fd000000 swym 0,0,0
+ 14: fd000000 swym 0,0,0
+ 18: fd000000 swym 0,0,0
+ 1c: fd000000 swym 0,0,0
+ 20: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-1f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-1f.d
new file mode 100644
index 0000000..983d294
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-1f.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: jumpa.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <jumpa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f0000006 jmp 20 <a>
+ c: fd000000 swym 0,0,0
+ 10: fd000000 swym 0,0,0
+ 14: fd000000 swym 0,0,0
+ 18: fd000000 swym 0,0,0
+ 1c: e3fd0003 setl \$253,0x3
+
+0+20 <a>:
+ 20: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-2b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-2b.d
new file mode 100644
index 0000000..f594055
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-2b.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: a.s
+#source: jumpa.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <jumpa>:
+ 8: e3fd0002 setl \$253,0x2
+ c: f1fffffe jmp 4 <a>
+ 10: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-2f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-2f.d
new file mode 100644
index 0000000..a923e21
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-2f.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: jumpa.s
+#source: a.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <jumpa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f0000002 jmp 10 <a>
+ c: e3fd0003 setl \$253,0x3
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-3b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-3b.d
new file mode 100644
index 0000000..d2f1b50
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-3b.d
@@ -0,0 +1,30 @@
+#source: start.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: jumpa.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+ \.\.\.
+
+0+4000000 <jumpa>:
+ 4000000: e3fd0002 setl \$253,0x2
+ 4000004: f1000000 jmp 4 <a>
+ 4000008: fd000000 swym 0,0,0
+ 400000c: fd000000 swym 0,0,0
+ 4000010: fd000000 swym 0,0,0
+ 4000014: fd000000 swym 0,0,0
+ 4000018: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-3f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-3f.d
new file mode 100644
index 0000000..4a5e10d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-3f.d
@@ -0,0 +1,28 @@
+#source: start.s
+#source: jumpa.s
+#source: pad2p26m32.s
+#source: pad4.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <jumpa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f0ffffff jmp 4000004 <a>
+ c: fd000000 swym 0,0,0
+ 10: fd000000 swym 0,0,0
+ 14: fd000000 swym 0,0,0
+ 18: fd000000 swym 0,0,0
+ 1c: e3fd0003 setl \$253,0x3
+ \.\.\.
+
+0+4000004 <a>:
+ 4000004: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-4b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-4b.d
new file mode 100644
index 0000000..9d35932
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-4b.d
@@ -0,0 +1,26 @@
+#source: start.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: jumpa.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+ \.\.\.
+
+0+4000000 <jumpa>:
+ 4000000: e3fd0002 setl \$253,0x2
+ 4000004: f1000000 jmp 4 <a>
+ 4000008: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-4f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-4f.d
new file mode 100644
index 0000000..3c0885b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-4f.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: jumpa.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: a.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <jumpa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f0ffffff jmp 4000004 <a>
+ c: e3fd0003 setl \$253,0x3
+ \.\.\.
+
+0+4000004 <a>:
+ 4000004: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-5b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-5b.d
new file mode 100644
index 0000000..b2fcaf4
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-5b.d
@@ -0,0 +1,31 @@
+#source: start.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pad4.s
+#source: jumpa.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+ \.\.\.
+
+0+4000004 <jumpa>:
+ 4000004: e3fd0002 setl \$253,0x2
+ 4000008: e3ff0004 setl \$255,0x4
+ 400000c: e6ff0000 incml \$255,0x0
+ 4000010: e5ff0000 incmh \$255,0x0
+ 4000014: e4ff0000 inch \$255,0x0
+ 4000018: 9fffff00 go \$255,\$255,0
+ 400001c: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-5f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-5f.d
new file mode 100644
index 0000000..bb91e70
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-5f.d
@@ -0,0 +1,29 @@
+#source: start.s
+#source: jumpa.s
+#source: pad2p26m32.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <jumpa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: e3ff0008 setl \$255,0x8
+ c: e6ff0400 incml \$255,0x400
+ 10: e5ff0000 incmh \$255,0x0
+ 14: e4ff0000 inch \$255,0x0
+ 18: 9fffff00 go \$255,\$255,0
+ 1c: e3fd0003 setl \$253,0x3
+ \.\.\.
+
+0+4000008 <a>:
+ 4000008: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-6b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-6b.d
new file mode 100644
index 0000000..e4ba8cd
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-6b.d
@@ -0,0 +1,11 @@
+#source: start.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pad4.s
+#source: jumpa.s
+#as: -no-expand
+#ld: -m elf64mmix
+#error: relocation truncated to fit: R_MMIX_ADDR27 against symbol `a'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-6f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-6f.d
new file mode 100644
index 0000000..65c4ab0
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-6f.d
@@ -0,0 +1,10 @@
+#source: start.s
+#source: jumpa.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#as: -no-expand
+#ld: -m elf64mmix
+#error: relocation truncated to fit: R_MMIX_ADDR27 against symbol `a'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-7b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-7b.d
new file mode 100644
index 0000000..202d006
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-7b.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: a.s
+#source: jumpa.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <jumpa>:
+ 8: e3fd0002 setl \$253,0x2
+ c: f1fffffe jmp 4 <a>
+ 10: fd000000 swym 0,0,0
+ 14: fd000000 swym 0,0,0
+ 18: fd000000 swym 0,0,0
+ 1c: fd000000 swym 0,0,0
+ 20: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-7f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-7f.d
new file mode 100644
index 0000000..b8345e1
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-7f.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: jumpa.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <jumpa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f0000006 jmp 20 <a>
+ c: fd000000 swym 0,0,0
+ 10: fd000000 swym 0,0,0
+ 14: fd000000 swym 0,0,0
+ 18: fd000000 swym 0,0,0
+ 1c: e3fd0003 setl \$253,0x3
+
+0+20 <a>:
+ 20: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-8b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-8b.d
new file mode 100644
index 0000000..456c949
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-8b.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: a.s
+#source: jumpa.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <jumpa>:
+ 8: e3fd0002 setl \$253,0x2
+ c: f1fffffe jmp 4 <a>
+ 10: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-8f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-8f.d
new file mode 100644
index 0000000..05777ce
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-8f.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: jumpa.s
+#source: a.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <jumpa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f0000002 jmp 10 <a>
+ c: e3fd0003 setl \$253,0x3
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-9b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-9b.d
new file mode 100644
index 0000000..2a639d3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-9b.d
@@ -0,0 +1,30 @@
+#source: start.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: jumpa.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+ \.\.\.
+
+0+4000000 <jumpa>:
+ 4000000: e3fd0002 setl \$253,0x2
+ 4000004: f1000000 jmp 4 <a>
+ 4000008: fd000000 swym 0,0,0
+ 400000c: fd000000 swym 0,0,0
+ 4000010: fd000000 swym 0,0,0
+ 4000014: fd000000 swym 0,0,0
+ 4000018: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa-9f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-9f.d
new file mode 100644
index 0000000..a4a2932
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa-9f.d
@@ -0,0 +1,28 @@
+#source: start.s
+#source: jumpa.s
+#source: pad2p26m32.s
+#source: pad4.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <jumpa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f0ffffff jmp 4000004 <a>
+ c: fd000000 swym 0,0,0
+ 10: fd000000 swym 0,0,0
+ 14: fd000000 swym 0,0,0
+ 18: fd000000 swym 0,0,0
+ 1c: e3fd0003 setl \$253,0x3
+ \.\.\.
+
+0+4000004 <a>:
+ 4000004: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa.s b/binutils-2.21/ld/testsuite/ld-mmix/jumpa.s
new file mode 100644
index 0000000..16ba54b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa.s
@@ -0,0 +1,7 @@
+* Just jump to an external symbol, with some padding.
+ .text
+ .global jumpa
+jumpa:
+ SET $253,2
+ JMP a
+ SET $253,3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa12b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa12b.d
new file mode 100644
index 0000000..8efe690
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa12b.d
@@ -0,0 +1,26 @@
+#source: start.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: jumpa.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+ \.\.\.
+
+0+4000000 <jumpa>:
+ 4000000: e3fd0002 setl \$253,0x2
+ 4000004: f1000000 jmp 4 <a>
+ 4000008: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa12f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa12f.d
new file mode 100644
index 0000000..6e2968f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa12f.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: jumpa.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: a.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <jumpa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f0ffffff jmp 4000004 <a>
+ c: e3fd0003 setl \$253,0x3
+ \.\.\.
+
+0+4000004 <a>:
+ 4000004: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa13b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa13b.d
new file mode 100644
index 0000000..bda81e3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa13b.d
@@ -0,0 +1,31 @@
+#source: start.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pad4.s
+#source: jumpa.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+ \.\.\.
+
+0+4000004 <jumpa>:
+ 4000004: e3fd0002 setl \$253,0x2
+ 4000008: e3ff0004 setl \$255,0x4
+ 400000c: e6ff0000 incml \$255,0x0
+ 4000010: e5ff0000 incmh \$255,0x0
+ 4000014: e4ff0000 inch \$255,0x0
+ 4000018: 9fffff00 go \$255,\$255,0
+ 400001c: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa13f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa13f.d
new file mode 100644
index 0000000..335d7ab
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa13f.d
@@ -0,0 +1,29 @@
+#source: start.s
+#source: jumpa.s
+#source: pad2p26m32.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <jumpa>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: e3ff0008 setl \$255,0x8
+ c: e6ff0400 incml \$255,0x400
+ 10: e5ff0000 incmh \$255,0x0
+ 14: e4ff0000 inch \$255,0x0
+ 18: 9fffff00 go \$255,\$255,0
+ 1c: e3fd0003 setl \$253,0x3
+ \.\.\.
+
+0+4000008 <a>:
+ 4000008: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa14b.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa14b.d
new file mode 100644
index 0000000..006e1bd
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa14b.d
@@ -0,0 +1,11 @@
+#source: start.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pad4.s
+#source: jumpa.s
+#as: -no-expand
+#ld: -m mmo
+#error: relocation truncated to fit: R_MMIX_ADDR27 against `a'$
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/jumpa14f.d b/binutils-2.21/ld/testsuite/ld-mmix/jumpa14f.d
new file mode 100644
index 0000000..bcf7504
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/jumpa14f.d
@@ -0,0 +1,10 @@
+#source: start.s
+#source: jumpa.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#as: -no-expand
+#ld: -m mmo
+#error: relocation truncated to fit: R_MMIX_ADDR27 against `a'$
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc1.d b/binutils-2.21/ld/testsuite/ld-mmix/loc1.d
new file mode 100644
index 0000000..cac2689
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc1.d
@@ -0,0 +1,19 @@
+#source: loc1.s
+#ld: -e loc1 -m elf64mmix
+#objdump: -str
+
+# Single text file.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+1000 l d \.text 0+ (|\.text)
+0+1000 g \.text 0+ loc1
+0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text
+2000000000000000 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ _edata
+2000000000000000 g \*ABS\* 0+ _end
+0+1000 g \.text 0+ _start\.
+
+Contents of section \.text:
+ 1000 fd030303 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc1.s b/binutils-2.21/ld/testsuite/ld-mmix/loc1.s
new file mode 100644
index 0000000..d420650
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc1.s
@@ -0,0 +1,3 @@
+ LOC #1000
+loc1 SWYM 3,3,3
+ .global loc1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc10.d b/binutils-2.21/ld/testsuite/ld-mmix/loc10.d
new file mode 100644
index 0000000..84180b4
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc10.d
@@ -0,0 +1,13 @@
+#ld: -m elf64mmix --defsym __.MMIX.start..text=0x8000000000000000
+#objdump: -str
+
+# Setting file start through the special symbol.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+#...
+8000000000000000 g \*ABS\* 0+ __\.MMIX\.start\.\.text
+#...
+Contents of section \.text:
+ 8000000000000000 f4000000 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc10.s b/binutils-2.21/ld/testsuite/ld-mmix/loc10.s
new file mode 100644
index 0000000..3d139d3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc10.s
@@ -0,0 +1 @@
+Boot GETA $0,Boot %set dynamic- and forced-trap handler
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc10m.d b/binutils-2.21/ld/testsuite/ld-mmix/loc10m.d
new file mode 100644
index 0000000..509f151
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc10m.d
@@ -0,0 +1,10 @@
+#source: loc10.s
+#ld: -m mmo --defsym __.MMIX.start..text=0x8000000000000000
+#objdump: -str
+
+# Setting file start through the special symbol, mmo version.
+
+.*: file format mmo
+#...
+Contents of section \.text:
+ 8000000000000000 f4000000 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc1m.d b/binutils-2.21/ld/testsuite/ld-mmix/loc1m.d
new file mode 100644
index 0000000..9721bcb
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc1m.d
@@ -0,0 +1,14 @@
+#source: loc1.s
+#ld: -m mmo -e loc1
+#objdump: -str
+
+# err: two locs.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+1000 g \.text Main
+0+1000 g \.text loc1
+
+Contents of section \.text:
+ 1000 fd030303 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc2.d b/binutils-2.21/ld/testsuite/ld-mmix/loc2.d
new file mode 100644
index 0000000..7d44c22
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc2.d
@@ -0,0 +1,21 @@
+#source: loc1.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -str
+
+# Two text files.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+1000 l d \.text 0+ (|\.text)
+0+1004 g \.text 0+ _start
+0+1000 g \.text 0+ loc1
+0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text
+2000000000000000 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ _edata
+2000000000000000 g \*ABS\* 0+ _end
+0+1004 g \.text 0+ _start\.
+
+Contents of section \.text:
+ 1000 fd030303 e3fd0001 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc2.s b/binutils-2.21/ld/testsuite/ld-mmix/loc2.s
new file mode 100644
index 0000000..1c25693
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc2.s
@@ -0,0 +1,3 @@
+ LOC #2000
+loc2 SWYM 3,2,3
+ .global loc2
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc2m.d b/binutils-2.21/ld/testsuite/ld-mmix/loc2m.d
new file mode 100644
index 0000000..4d62b24
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc2m.d
@@ -0,0 +1,14 @@
+#source: loc1.s
+#source: start.s
+#ld: -m mmo
+#objdump: -str
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+1004 g \.text Main
+0+1004 g \.text _start
+0+1000 g \.text loc1
+
+Contents of section \.text:
+ 1000 fd030303 e3fd0001 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc3.d b/binutils-2.21/ld/testsuite/ld-mmix/loc3.d
new file mode 100644
index 0000000..ff0fe8a
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc3.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: loc1.s
+#ld: -m elf64mmix
+#objdump: -str
+
+# Two text files in opposite order.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+1000 l d \.text 0+ (|\.text)
+0+1000 g \.text 0+ _start
+0+1004 g \.text 0+ loc1
+0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text
+2000000000000000 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ _edata
+2000000000000000 g \*ABS\* 0+ _end
+0+1000 g \.text 0+ _start\.
+
+Contents of section \.text:
+ 1000 e3fd0001 fd030303 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc3m.d b/binutils-2.21/ld/testsuite/ld-mmix/loc3m.d
new file mode 100644
index 0000000..928ac9e
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc3m.d
@@ -0,0 +1,14 @@
+#source: start.s
+#source: loc1.s
+#ld: -m mmo
+#objdump: -str
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+1000 g \.text Main
+0+1000 g \.text _start
+0+1004 g \.text loc1
+
+Contents of section \.text:
+ 1000 e3fd0001 fd030303 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc4.d b/binutils-2.21/ld/testsuite/ld-mmix/loc4.d
new file mode 100644
index 0000000..34428a9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc4.d
@@ -0,0 +1,28 @@
+#source: loc1.s
+#source: data1.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -str
+
+# Two text files and one data.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+1000 l d \.text 0+ (|\.text)
+2000000000000000 l d \.data 0+ (|\.data)
+2000000000000000 l \.data 0+ xx
+0+1004 g F \.text 0+ Main
+2000000000000000 g \*ABS\* 0+ __\.MMIX\.start\.\.data
+0+1004 g \.text 0+ _start
+0+1000 g \.text 0+ loc1
+0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text
+2000000000000008 g \*ABS\* 0+ __bss_start
+2000000000000008 g \*ABS\* 0+ _edata
+2000000000000008 g \*ABS\* 0+ _end
+0+1004 g \.text 0+ _start\.
+
+Contents of section \.text:
+ 1000 fd030303 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000000 00000000 00001030 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc4m.d b/binutils-2.21/ld/testsuite/ld-mmix/loc4m.d
new file mode 100644
index 0000000..40a4f97
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc4m.d
@@ -0,0 +1,17 @@
+#source: loc1.s
+#source: data1.s
+#source: start.s
+#ld: -m mmo
+#objdump: -str
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+1004 g \.text Main
+0+1004 g \.text _start
+0+1000 g \.text loc1
+
+Contents of section \.text:
+ 1000 fd030303 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000004 00001030 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc5.d b/binutils-2.21/ld/testsuite/ld-mmix/loc5.d
new file mode 100644
index 0000000..089c155
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc5.d
@@ -0,0 +1,6 @@
+#source: loc1.s
+#source: start.s
+#source: loc2.s
+#ld: -m elf64mmix
+#objdump: -str
+#error: multiple definition of `__\.MMIX\.start\.\.text'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc5m.d b/binutils-2.21/ld/testsuite/ld-mmix/loc5m.d
new file mode 100644
index 0000000..8fedb1c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc5m.d
@@ -0,0 +1,6 @@
+#source: loc1.s
+#source: start.s
+#source: loc2.s
+#ld: -m mmo
+#objdump: -str
+#error: multiple definition of `__\.MMIX\.start\.\.text'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc6.d b/binutils-2.21/ld/testsuite/ld-mmix/loc6.d
new file mode 100644
index 0000000..425edae
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc6.d
@@ -0,0 +1,24 @@
+#source: dloc1.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -str
+
+# Text files and one loc:ed data at offset.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+2000000000000200 l d \.data 0+ (|\.data)
+2000000000000200 g \.data 0+ dloc1
+2000000000000200 g \*ABS\* 0+ __\.MMIX\.start\.\.data
+0+ g \.text 0+ _start
+200000000000020c g \*ABS\* 0+ __bss_start
+200000000000020c g \*ABS\* 0+ _edata
+2000000000000210 g \*ABS\* 0+ _end
+0+ g \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000200 00000004 00000005 00000006 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc6m.d b/binutils-2.21/ld/testsuite/ld-mmix/loc6m.d
new file mode 100644
index 0000000..b2a58a7
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc6m.d
@@ -0,0 +1,18 @@
+#source: dloc1.s
+#source: start.s
+#ld: -m mmo
+#objdump: -str
+
+# Text files and one loc:ed data at offset.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+2000000000000200 g \.data dloc1
+0+ g \.text _start
+
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000200 00000004 00000005 00000006 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc7.d b/binutils-2.21/ld/testsuite/ld-mmix/loc7.d
new file mode 100644
index 0000000..b980f61
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc7.d
@@ -0,0 +1,6 @@
+#source: dloc1.s
+#source: start.s
+#source: dloc2.s
+#ld: -m elf64mmix
+#objdump: -str
+#error: multiple definition of `__\.MMIX\.start\.\.data'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc7m.d b/binutils-2.21/ld/testsuite/ld-mmix/loc7m.d
new file mode 100644
index 0000000..be8115f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc7m.d
@@ -0,0 +1,6 @@
+#source: dloc1.s
+#source: start.s
+#source: dloc2.s
+#ld: -m mmo
+#objdump: -str
+#error: multiple definition of `__\.MMIX\.start\.\.data'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc8.d b/binutils-2.21/ld/testsuite/ld-mmix/loc8.d
new file mode 100644
index 0000000..ac68990
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc8.d
@@ -0,0 +1,13 @@
+#ld: -m elf64mmix
+#objdump: -str
+
+# Setting file start through the special symbol, in-source.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+#...
+8000000000000000 g \*ABS\* 0+ __\.MMIX\.start\.\.text
+#...
+Contents of section \.text:
+ 8000000000000000 f4000000 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc8.s b/binutils-2.21/ld/testsuite/ld-mmix/loc8.s
new file mode 100644
index 0000000..28592f9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc8.s
@@ -0,0 +1,3 @@
+ .globl __.MMIX.start..text
+ .set __.MMIX.start..text,0x8000000000000000
+Boot GETA $0,Boot %set dynamic- and forced-trap handler
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc8m.d b/binutils-2.21/ld/testsuite/ld-mmix/loc8m.d
new file mode 100644
index 0000000..52fb079
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc8m.d
@@ -0,0 +1,10 @@
+#source: loc8.s
+#ld: -m mmo
+#objdump: -str
+
+# Setting file start through the special symbol, in-source, mmo version.
+
+.*: file format mmo
+#...
+Contents of section \.text:
+ 8000000000000000 f4000000 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc9.d b/binutils-2.21/ld/testsuite/ld-mmix/loc9.d
new file mode 100644
index 0000000..458fef6
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc9.d
@@ -0,0 +1,13 @@
+#ld: -m elf64mmix
+#objdump: -str
+
+# Setting file start through the LOC pseudo, see PR 6607.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+#...
+8000000000000000 g \*ABS\* 0+ __\.MMIX\.start\.\.text
+#...
+Contents of section \.text:
+ 8000000000000000 f4000000 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc9.s b/binutils-2.21/ld/testsuite/ld-mmix/loc9.s
new file mode 100644
index 0000000..99a5c5d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc9.s
@@ -0,0 +1,3 @@
+ LOC #8000000000000000
+Boot GETA $0,Boot %set dynamic- and forced-trap handler
+ .globl Boot
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loc9m.d b/binutils-2.21/ld/testsuite/ld-mmix/loc9m.d
new file mode 100644
index 0000000..be2beff
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loc9m.d
@@ -0,0 +1,14 @@
+#source: loc9.s
+#ld: -e Boot -m mmo
+#objdump: -str
+
+# Setting file start through the LOC pseudo, see PR 6607, mmo version.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+#...
+8000000000000000 g \.text Boot
+#...
+Contents of section \.text:
+ 8000000000000000 f4000000 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local1.d b/binutils-2.21/ld/testsuite/ld-mmix/local1.d
new file mode 100644
index 0000000..3899f74
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local1.d
@@ -0,0 +1,48 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: regext1.s
+#source: start.s
+#ld: -m elf64mmix
+#readelf: -Ssx1 -x2
+
+# We check that the externally visible symbol ext1 is a local register
+# (different meaning of "local" than for symbol), which can be seen as
+# somewhat twisted.
+
+There are 6 section headers, starting at offset 0xc8:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Offset
+ +Size +EntSize +Flags +Link +Info +Align
+ +\[ 0\] +NULL +0+ +0+
+ +0+ +0+ +0 +0 +0
+ +\[ 1\] \.text +PROGBITS +0+ +0+78
+ +0+8 +0+ +AX +0 +0 +4
+ +\[ 2\] \.MMIX\.reg_content PROGBITS +0+7e8 +0+80
+ +0+10 +0+ +W +0 +0 +1
+ +\[ 3\] \.shstrtab +STRTAB +0+ +0+90
+ +0+34 +0+ +0 +0 +1
+ +\[ 4\] \.symtab +SYMTAB +0+ +0+248
+ +0+108 +0+18 +5 +5 +8
+ +\[ 5\] \.strtab +STRTAB +0+ +0+350
+ +0+32 +0+ +0 +0 +1
+Key to Flags:
+#...
+
+Symbol table '\.symtab' contains 11 entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND
+ +1: 0+ +0 +SECTION +LOCAL +DEFAULT +1
+ +2: 0+7e8 +0 +SECTION +LOCAL +DEFAULT +2
+ +3: 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
+ +4: 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
+ +5: 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +PRC\[0xff00\] ext1
+ +6: 0+4 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
+#...
+
+Hex dump of section '\.text':
+ 0x0+ fd030201 e3fd0001 .*
+
+Hex dump of section '\.MMIX\.reg_contents':
+ 0x0+7e8 00000000 0000004e 00000000 0000004e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local1.s b/binutils-2.21/ld/testsuite/ld-mmix/local1.s
new file mode 100644
index 0000000..47bf390
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local1.s
@@ -0,0 +1,2 @@
+ LOCAL ext1
+ SWYM 3,2,1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local10.d b/binutils-2.21/ld/testsuite/ld-mmix/local10.d
new file mode 100644
index 0000000..f276405
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local10.d
@@ -0,0 +1,5 @@
+#source: local1.s
+#source: ext1g.s
+#source: start.s
+#ld: -m elf64mmix
+#error: 254 is not a local register
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local10m.d b/binutils-2.21/ld/testsuite/ld-mmix/local10m.d
new file mode 100644
index 0000000..9095d74
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local10m.d
@@ -0,0 +1,5 @@
+#source: local1.s
+#source: ext1g.s
+#source: start.s
+#ld: -m mmo
+#error: 254 is not a local register
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local11.d b/binutils-2.21/ld/testsuite/ld-mmix/local11.d
new file mode 100644
index 0000000..761cea0
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local11.d
@@ -0,0 +1,6 @@
+#source: local1.s
+#source: greg-1.s
+#source: ext1l.s
+#source: start.s
+#ld: -m elf64mmix
+#error: valid only with a register or absolute value
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local11m.d b/binutils-2.21/ld/testsuite/ld-mmix/local11m.d
new file mode 100644
index 0000000..b6952a7
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local11m.d
@@ -0,0 +1,6 @@
+#source: local1.s
+#source: greg-1.s
+#source: ext1l.s
+#source: start.s
+#ld: -m mmo
+#error: valid only with a register or absolute value
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local12.d b/binutils-2.21/ld/testsuite/ld-mmix/local12.d
new file mode 100644
index 0000000..2dd1eb4
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local12.d
@@ -0,0 +1,16 @@
+#source: local1.s
+#source: ext1-254.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -shr
+
+# Check that 254 is local when we don't have any registers.
+
+.*: file format elf64-mmix
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+8 0+ 0+ 0+78 2\*\*2
+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+Contents of section \.text:
+ 0000 fd030201 e3fd0001 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local12m.d b/binutils-2.21/ld/testsuite/ld-mmix/local12m.d
new file mode 100644
index 0000000..2cfb701
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local12m.d
@@ -0,0 +1,16 @@
+#source: local1.s
+#source: ext1-254.s
+#source: start.s
+#ld: -m mmo
+#objdump: -shr
+
+# Check that 254 is local when we don't have any registers.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+8 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+Contents of section \.text:
+ 0000 fd030201 e3fd0001 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local1m.d b/binutils-2.21/ld/testsuite/ld-mmix/local1m.d
new file mode 100644
index 0000000..a5c63e7
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local1m.d
@@ -0,0 +1,19 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: regext1.s
+#source: start.s
+#ld: -m mmo
+#objdump: -str
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+4 g \.text Main
+0+fc g \*REG\* ext1
+0+4 g \.text _start
+
+Contents of section \.text:
+ 0000 fd030201 e3fd0001 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000004e 00000000 0000004e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local2.d b/binutils-2.21/ld/testsuite/ld-mmix/local2.d
new file mode 100644
index 0000000..e5ad203
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local2.d
@@ -0,0 +1,8 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: regext1.s
+#source: start.s
+#ld: -m elf64mmix
+#error: not a local register
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local2.s b/binutils-2.21/ld/testsuite/ld-mmix/local2.s
new file mode 100644
index 0000000..9d2c329
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local2.s
@@ -0,0 +1,2 @@
+ LOCAL 128
+ SWYM 2,2,2
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local2m.d b/binutils-2.21/ld/testsuite/ld-mmix/local2m.d
new file mode 100644
index 0000000..6e88936
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local2m.d
@@ -0,0 +1,8 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: regext1.s
+#source: start.s
+#ld: -m mmo
+#error: not a local register
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local3.d b/binutils-2.21/ld/testsuite/ld-mmix/local3.d
new file mode 100644
index 0000000..cebdf09
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local3.d
@@ -0,0 +1,46 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: ext1.s
+#source: start.s
+#ld: -m elf64mmix
+#readelf: -Ssx1 -x2
+
+# Like local1, but ext1 is here a constant, not a global register.
+
+There are 6 section headers, starting at offset 0xc8:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Offset
+ +Size +EntSize +Flags +Link +Info +Align
+ +\[ 0\] +NULL +0+ +0+
+ +0+ +0+ +0 +0 +0
+ +\[ 1\] \.text +PROGBITS +0+ +0+78
+ +0+8 +0+ +AX +0 +0 +4
+ +\[ 2\] \.MMIX\.reg_content PROGBITS +0+7e8 +0+80
+ +0+10 +0+ +W +0 +0 +1
+ +\[ 3\] \.shstrtab +STRTAB +0+ +0+90
+ +0+34 +0+ +0 +0 +1
+ +\[ 4\] \.symtab +SYMTAB +0+ +0+248
+ +0+108 +0+18 +5 +5 +8
+ +\[ 5\] \.strtab +STRTAB +0+ +0+350
+ +0+32 +0+ +0 +0 +1
+Key to Flags:
+#...
+
+Symbol table '\.symtab' contains 11 entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND
+ +1: 0+ +0 +SECTION +LOCAL +DEFAULT +1
+ +2: 0+7e8 +0 +SECTION +LOCAL +DEFAULT +2
+ +3: 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
+ +4: 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
+ +5: 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +ABS ext1
+ +6: 0+4 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
+#...
+
+Hex dump of section '\.text':
+ 0x0+ fd030201 e3fd0001 .*
+
+Hex dump of section '\.MMIX\.reg_contents':
+ 0x0+7e8 00000000 0000004e 00000000 0000004e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local3m.d b/binutils-2.21/ld/testsuite/ld-mmix/local3m.d
new file mode 100644
index 0000000..2143d70
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local3m.d
@@ -0,0 +1,19 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: ext1.s
+#source: start.s
+#ld: -m mmo
+#objdump: -str
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+4 g \.text Main
+0+fc g \*ABS\* ext1
+0+4 g \.text _start
+
+Contents of section \.text:
+ 0000 fd030201 e3fd0001 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000004e 00000000 0000004e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local4.d b/binutils-2.21/ld/testsuite/ld-mmix/local4.d
new file mode 100644
index 0000000..13fa8e6
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local4.d
@@ -0,0 +1,8 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: ext1.s
+#source: start.s
+#ld: -m elf64mmix
+#error: not a local register
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local4m.d b/binutils-2.21/ld/testsuite/ld-mmix/local4m.d
new file mode 100644
index 0000000..d18cb20
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local4m.d
@@ -0,0 +1,8 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: ext1.s
+#source: start.s
+#ld: -m mmo
+#error: is not a local register
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local5.d b/binutils-2.21/ld/testsuite/ld-mmix/local5.d
new file mode 100644
index 0000000..ee60297
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local5.d
@@ -0,0 +1,47 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: local2.s
+#source: local1.s
+#source: regext1.s
+#source: start.s
+#ld: -m elf64mmix
+#readelf: -Ssx1 -x2
+
+# Like local1, but with two checks for a local register.
+
+There are 6 section headers, starting at offset 0xc8:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Offset
+ +Size +EntSize +Flags +Link +Info +Align
+ +\[ 0\] +NULL +0+ +0+
+ +0+ +0+ +0 +0 +0
+ +\[ 1\] \.text +PROGBITS +0+ +0+78
+ +0+c +0+ +AX +0 +0 +4
+ +\[ 2\] \.MMIX\.reg_content PROGBITS +0+7e8 +0+84
+ +0+10 +0+ +W +0 +0 +1
+ +\[ 3\] \.shstrtab +STRTAB +0+ +0+94
+ +0+34 +0+ +0 +0 +1
+ +\[ 4\] \.symtab +SYMTAB +0+ +0+248
+ +0+108 +0+18 +5 +5 +8
+ +\[ 5\] \.strtab +STRTAB +0+ +0+350
+ +0+32 +0+ +0 +0 +1
+Key to Flags:
+#...
+
+Symbol table '\.symtab' contains 11 entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND
+ +1: 0+ +0 +SECTION +LOCAL +DEFAULT +1
+ +2: 0+7e8 +0 +SECTION +LOCAL +DEFAULT +2
+ +3: 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
+ +4: 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
+ +5: 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +PRC\[0xff00\] ext1
+ +6: 0+8 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
+#...
+
+Hex dump of section '\.text':
+ 0x0+ fd020202 fd030201 e3fd0001 .*
+
+Hex dump of section '\.MMIX\.reg_contents':
+ 0x0+7e8 00000000 0000004e 00000000 0000004e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local5m.d b/binutils-2.21/ld/testsuite/ld-mmix/local5m.d
new file mode 100644
index 0000000..6b4c89b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local5m.d
@@ -0,0 +1,21 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: local2.s
+#source: local1.s
+#source: regext1.s
+#source: start.s
+#ld: -m mmo
+#objdump: -str
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+8 g \.text Main
+0+fc g \*REG\* ext1
+0+8 g \.text _start
+
+
+Contents of section \.text:
+ 0000 fd020202 fd030201 e3fd0001 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000004e 00000000 0000004e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local6.d b/binutils-2.21/ld/testsuite/ld-mmix/local6.d
new file mode 100644
index 0000000..b2ed1ed
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local6.d
@@ -0,0 +1,9 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: local2.s
+#source: ext1.s
+#source: start.s
+#ld: -m elf64mmix
+#error: not a local register
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local6m.d b/binutils-2.21/ld/testsuite/ld-mmix/local6m.d
new file mode 100644
index 0000000..be64ca2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local6m.d
@@ -0,0 +1,9 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: local2.s
+#source: ext1.s
+#source: start.s
+#ld: -m mmo
+#error: not a local register
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local7.d b/binutils-2.21/ld/testsuite/ld-mmix/local7.d
new file mode 100644
index 0000000..bc2cd6c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local7.d
@@ -0,0 +1,48 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: local2.s
+#source: ext1.s
+#source: start.s
+#ld: -m elf64mmix
+#readelf: -Ssx1 -x2
+
+# Like local1, but ext1 is here a constant, not a global register and two
+# local-register checks.
+
+There are 6 section headers, starting at offset 0xc8:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Offset
+ +Size +EntSize +Flags +Link +Info +Align
+ +\[ 0\] +NULL +0+ +0+
+ +0+ +0+ +0 +0 +0
+ +\[ 1\] \.text +PROGBITS +0+ +0+78
+ +0+c +0+ +AX +0 +0 +4
+ +\[ 2\] \.MMIX\.reg_content PROGBITS +0+7e8 +0+84
+ +0+10 +0+ +W +0 +0 +1
+ +\[ 3\] \.shstrtab +STRTAB +0+ +0+94
+ +0+34 +0+ +0 +0 +1
+ +\[ 4\] \.symtab +SYMTAB +0+ +0+248
+ +0+108 +0+18 +5 +5 +8
+ +\[ 5\] \.strtab +STRTAB +0+ +0+350
+ +0+32 +0+ +0 +0 +1
+Key to Flags:
+#...
+
+Symbol table '\.symtab' contains 11 entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND
+ +1: 0+ +0 +SECTION +LOCAL +DEFAULT +1
+ +2: 0+7e8 +0 +SECTION +LOCAL +DEFAULT +2
+ +3: 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
+ +4: 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
+ +5: 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +ABS ext1
+ +6: 0+8 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
+#...
+
+Hex dump of section '\.text':
+ 0x0+ fd030201 fd020202 e3fd0001 .*
+
+Hex dump of section '\.MMIX\.reg_contents':
+ 0x0+7e8 00000000 0000004e 00000000 0000004e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local7m.d b/binutils-2.21/ld/testsuite/ld-mmix/local7m.d
new file mode 100644
index 0000000..8277a94
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local7m.d
@@ -0,0 +1,20 @@
+#source: greg-4.s
+#source: greg-4.s
+#source: local1.s
+#source: local2.s
+#source: ext1.s
+#source: start.s
+#ld: -m mmo
+#objdump: -str
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+8 g \.text Main
+0+fc g \*ABS\* ext1
+0+8 g \.text _start
+
+Contents of section \.text:
+ 0000 fd030201 fd020202 e3fd0001 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000004e 00000000 0000004e .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local8.d b/binutils-2.21/ld/testsuite/ld-mmix/local8.d
new file mode 100644
index 0000000..f82e6d0
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local8.d
@@ -0,0 +1,28 @@
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: local2.s
+#source: local1.s
+#source: ext1.s
+#source: start.s
+#ld: -m elf64mmix
+#error: 128 is not a local register
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local8m.d b/binutils-2.21/ld/testsuite/ld-mmix/local8m.d
new file mode 100644
index 0000000..4e07afe
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local8m.d
@@ -0,0 +1,28 @@
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-5.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: greg-4.s
+#source: local2.s
+#source: local1.s
+#source: ext1.s
+#source: start.s
+#ld: -m mmo
+#error: 128 is not a local register
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local9.d b/binutils-2.21/ld/testsuite/ld-mmix/local9.d
new file mode 100644
index 0000000..cc4f8c7
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local9.d
@@ -0,0 +1,5 @@
+#source: local1.s
+#source: ext1l.s
+#source: start.s
+#ld: -m elf64mmix
+#error: valid only with a register or absolute value
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/local9m.d b/binutils-2.21/ld/testsuite/ld-mmix/local9m.d
new file mode 100644
index 0000000..7842984
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/local9m.d
@@ -0,0 +1,5 @@
+#source: local1.s
+#source: ext1l.s
+#source: start.s
+#ld: -m mmo
+#error: valid only with a register or absolute value
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/locdo-1.d b/binutils-2.21/ld/testsuite/ld-mmix/locdo-1.d
new file mode 100644
index 0000000..4a16735
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/locdo-1.d
@@ -0,0 +1,23 @@
+#source: locdo.s -globalize-symbols
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -str
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+2000000000000008 l d \.data 0+ (|\.data)
+2000000000000008 g \*ABS\* 0+ __\.MMIX\.start\.\.data
+2000000000000008 g \.data 0+ od
+0+ g \.text 0+ _start
+2000000000000010 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ Data_Segment
+2000000000000010 g \*ABS\* 0+ _edata
+2000000000000010 g \*ABS\* 0+ _end
+0+ g \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000008 20000000 00000008 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/locdo.s b/binutils-2.21/ld/testsuite/ld-mmix/locdo.s
new file mode 100644
index 0000000..3402445
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/locdo.s
@@ -0,0 +1,2 @@
+ LOC Data_Segment+2
+od OCTA od
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loct-1.d b/binutils-2.21/ld/testsuite/ld-mmix/loct-1.d
new file mode 100644
index 0000000..24f4112
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loct-1.d
@@ -0,0 +1,19 @@
+#source: loct.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -str
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+1004 l d \.text 0+ (|\.text)
+0+1004 l \.text 0+ t
+0+100c g \.text 0+ _start
+0+1004 g \*ABS\* 0+ __\.MMIX\.start\.\.text
+2000000000000000 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ _edata
+2000000000000000 g \*ABS\* 0+ _end
+0+100c g \.text 0+ _start\.
+
+Contents of section \.text:
+ 1004 fd000000 00001004 e3fd0001 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/loct.s b/binutils-2.21/ld/testsuite/ld-mmix/loct.s
new file mode 100644
index 0000000..5aaa406
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/loct.s
@@ -0,0 +1,3 @@
+ LOC #1002
+t SWYM
+ TETRA t
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/locto-1.d b/binutils-2.21/ld/testsuite/ld-mmix/locto-1.d
new file mode 100644
index 0000000..5c5c391
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/locto-1.d
@@ -0,0 +1,19 @@
+#source: locto.s -globalize-symbols
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -str
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+1008 l d \.text 0+ (|\.text)
+0+1008 g \.text 0+ od
+0+1010 g \.text 0+ _start
+0+1008 g \*ABS\* 0+ __\.MMIX\.start\.\.text
+2000000000000000 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ _edata
+2000000000000000 g \*ABS\* 0+ _end
+0+1010 g \.text 0+ _start\.
+
+Contents of section \.text:
+ 1008 00000000 00001008 e3fd0001 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/locto.s b/binutils-2.21/ld/testsuite/ld-mmix/locto.s
new file mode 100644
index 0000000..5ffa445
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/locto.s
@@ -0,0 +1,2 @@
+ LOC #1002
+od OCTA od
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/main1.s b/binutils-2.21/ld/testsuite/ld-mmix/main1.s
new file mode 100644
index 0000000..212d1ef
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/main1.s
@@ -0,0 +1,5 @@
+% For tests regarding the Main symbol and mmo. Most tests use start.s as
+% a base file.
+ .text
+Main:
+ SET $253,1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/mmix.exp b/binutils-2.21/ld/testsuite/ld-mmix/mmix.exp
new file mode 100644
index 0000000..e44101e
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/mmix.exp
@@ -0,0 +1,35 @@
+# Expect script for ld-mmix tests
+# Copyright 2001, 2005, 2007 Free Software Foundation, Inc.
+#
+# This file is part of the GNU Binutils.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+# Written by Hans-Peter Nilsson (hp@bitrange.com)
+#
+
+# Test MMIX and mmo object format handling.
+
+if ![istarget mmix-*-*] {
+ return
+}
+
+set rd_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
+foreach mmixtest $rd_test_list {
+ # We need to strip the ".d", but can leave the dirname.
+ verbose [file rootname $mmixtest]
+ run_dump_test [file rootname $mmixtest]
+}
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/mmohdr1.ld b/binutils-2.21/ld/testsuite/ld-mmix/mmohdr1.ld
new file mode 100644
index 0000000..716c3f4
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/mmohdr1.ld
@@ -0,0 +1,11 @@
+OUTPUT_ARCH(mmix)
+OUTPUT_FORMAT("mmo")
+ENTRY(Main)
+SECTIONS
+{
+ .text 0x100 + sizeof_headers :
+ { *(.text); Main = _start; }
+
+ .MMIX.reg_contents :
+ { *(.MMIX.reg_contents); }
+}
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/mmosec1.ld b/binutils-2.21/ld/testsuite/ld-mmix/mmosec1.ld
new file mode 100644
index 0000000..4e7e799
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/mmosec1.ld
@@ -0,0 +1,16 @@
+OUTPUT_ARCH(mmix)
+ENTRY(Main)
+SECTIONS
+{
+ .text 0x100 :
+ { *(.text); Main = _start; }
+
+ .other 0x1000000000000000 :
+ { *(secname); *(anothersec); *(thirdsec); *(.a.fourth.section); }
+
+ .data 0x2000000000000000 :
+ { *(.data); }
+
+ .MMIX.reg_contents :
+ { *(.MMIX.reg_contents); }
+}
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/mmosec2.ld b/binutils-2.21/ld/testsuite/ld-mmix/mmosec2.ld
new file mode 100644
index 0000000..57025e2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/mmosec2.ld
@@ -0,0 +1,13 @@
+OUTPUT_ARCH(mmix)
+ENTRY(Main)
+SECTIONS
+{
+ .text 0x1000000000000000 :
+ { *(.text); Main = _start; }
+
+ .data 0x2000000000000000 :
+ { *(.data); }
+
+ .MMIX.reg_contents :
+ { *(.MMIX.reg_contents); }
+}
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/nop123.s b/binutils-2.21/ld/testsuite/ld-mmix/nop123.s
new file mode 100644
index 0000000..2d14f43
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/nop123.s
@@ -0,0 +1,3 @@
+# A nop to pad with an explicit insn.
+ .text
+ SWYM 1,2,3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pad16.s b/binutils-2.21/ld/testsuite/ld-mmix/pad16.s
new file mode 100644
index 0000000..7692337
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pad16.s
@@ -0,0 +1,4 @@
+* Padding 16 bytes, suitable for testing relocs together with the larger
+* padding files.
+ .text
+ .space 16,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pad2p18m32.s b/binutils-2.21/ld/testsuite/ld-mmix/pad2p18m32.s
new file mode 100644
index 0000000..ede581f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pad2p18m32.s
@@ -0,0 +1,4 @@
+* Padding (1 << 19)/2 - 32 bytes; that is, suitable for testing the
+* short-range relocs.
+ .text
+ .space (1 << 19)/2 - 32,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pad2p26m32.s b/binutils-2.21/ld/testsuite/ld-mmix/pad2p26m32.s
new file mode 100644
index 0000000..05f45c8
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pad2p26m32.s
@@ -0,0 +1,4 @@
+* Padding (1 << 27)/2 - 32 bytes; that is, suitable for testing the
+* long-range relocs.
+ .text
+ .space (1 << 27)/2 - 32,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pad4.s b/binutils-2.21/ld/testsuite/ld-mmix/pad4.s
new file mode 100644
index 0000000..49dbe6d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pad4.s
@@ -0,0 +1,4 @@
+* Padding 16 bytes, suitable for testing relocs together with the larger
+* padding files.
+ .text
+ .space 4,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja.s b/binutils-2.21/ld/testsuite/ld-mmix/pushja.s
new file mode 100644
index 0000000..857ca9d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja.s
@@ -0,0 +1,7 @@
+* Just PUSHJs to an external symbol, with some padding.
+ .text
+ .global pushja
+pushja:
+ SET $253,2
+ PUSHJ $12,a
+ SET $253,3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja1b-s.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja1b-s.d
new file mode 100644
index 0000000..ac55651
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja1b-s.d
@@ -0,0 +1,19 @@
+#source: start.s
+#source: a.s
+#source: pushja.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+# Like pushja1b but with PUSHJ stub.
+
+.*: file format elf64-mmix
+Disassembly of section \.text:
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+0+8 <pushja>:
+ 8: e3fd0002 setl \$253,0x2
+ c: f30cfffe pushj \$12,4 <a>
+ 10: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja1b.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja1b.d
new file mode 100644
index 0000000..b61162f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja1b.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: a.s
+#source: pushja.s
+#as: -x --no-pushj-stubs
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <pushja>:
+ 8: e3fd0002 setl \$253,0x2
+ c: e3ff0004 setl \$255,0x4
+ 10: e6ff0000 incml \$255,0x0
+ 14: e5ff0000 incmh \$255,0x0
+ 18: e4ff0000 inch \$255,0x0
+ 1c: bf0cff00 pushgo \$12,\$255,0
+ 20: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja1f-s.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja1f-s.d
new file mode 100644
index 0000000..801ff22
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja1f-s.d
@@ -0,0 +1,19 @@
+#source: start.s
+#source: pushja.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#objdump: -dr
+
+# Like pushja1f, but with PUSHJ stub.
+
+.*: file format elf64-mmix
+Disassembly of section \.text:
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <a>
+ c: e3fd0003 setl \$253,0x3
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja1f.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja1f.d
new file mode 100644
index 0000000..5f27400
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja1f.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: pushja.s
+#source: a.s
+#as: -x --no-pushj-stubs
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: e3ff0020 setl \$255,0x20
+ c: e6ff0000 incml \$255,0x0
+ 10: e5ff0000 incmh \$255,0x0
+ 14: e4ff0000 inch \$255,0x0
+ 18: bf0cff00 pushgo \$12,\$255,0
+ 1c: e3fd0003 setl \$253,0x3
+
+0+20 <a>:
+ 20: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja2b.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja2b.d
new file mode 100644
index 0000000..623754f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja2b.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: a.s
+#source: pushja.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <pushja>:
+ 8: e3fd0002 setl \$253,0x2
+ c: f30cfffe pushj \$12,4 <a>
+ 10: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja2f.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja2f.d
new file mode 100644
index 0000000..687d559
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja2f.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: pushja.s
+#source: a.s
+#as: -no-expand
+#ld: -m elf64mmix
+#objdump: -dr
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <a>
+ c: e3fd0003 setl \$253,0x3
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja7b-s.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja7b-s.d
new file mode 100644
index 0000000..7835eda
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja7b-s.d
@@ -0,0 +1,19 @@
+#source: start.s
+#source: a.s
+#source: pushja.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+# Like pushja7b, but with PUSHJ stub.
+
+.*: file format mmo
+Disassembly of section \.text:
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+0+8 <pushja>:
+ 8: e3fd0002 setl \$253,0x2
+ c: f30cfffe pushj \$12,4 <a>
+ 10: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja7b.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja7b.d
new file mode 100644
index 0000000..5da05e3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja7b.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: a.s
+#source: pushja.s
+#as: -x --no-pushj-stubs
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <pushja>:
+ 8: e3fd0002 setl \$253,0x2
+ c: e3ff0004 setl \$255,0x4
+ 10: e6ff0000 incml \$255,0x0
+ 14: e5ff0000 incmh \$255,0x0
+ 18: e4ff0000 inch \$255,0x0
+ 1c: bf0cff00 pushgo \$12,\$255,0
+ 20: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja7f-s.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja7f-s.d
new file mode 100644
index 0000000..487d54a
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja7f-s.d
@@ -0,0 +1,19 @@
+#source: start.s
+#source: pushja.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#objdump: -dr
+
+# Like pushja7f, but with PUSHJ stub.
+
+.*: file format mmo
+Disassembly of section \.text:
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <a>
+ c: e3fd0003 setl \$253,0x3
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja7f.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja7f.d
new file mode 100644
index 0000000..83721c7
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja7f.d
@@ -0,0 +1,25 @@
+#source: start.s
+#source: pushja.s
+#source: a.s
+#as: -x --no-pushj-stubs
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: e3ff0020 setl \$255,0x20
+ c: e6ff0000 incml \$255,0x0
+ 10: e5ff0000 incmh \$255,0x0
+ 14: e4ff0000 inch \$255,0x0
+ 18: bf0cff00 pushgo \$12,\$255,0
+ 1c: e3fd0003 setl \$253,0x3
+
+0+20 <a>:
+ 20: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja8b.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja8b.d
new file mode 100644
index 0000000..da1f216
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja8b.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: a.s
+#source: pushja.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <a>:
+ 4: e3fd0004 setl \$253,0x4
+
+0+8 <pushja>:
+ 8: e3fd0002 setl \$253,0x2
+ c: f30cfffe pushj \$12,4 <a>
+ 10: e3fd0003 setl \$253,0x3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushja8f.d b/binutils-2.21/ld/testsuite/ld-mmix/pushja8f.d
new file mode 100644
index 0000000..8ae45f9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushja8f.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: pushja.s
+#source: a.s
+#as: -no-expand
+#ld: -m mmo
+#objdump: -dr
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(Main|_start)>:
+ 0: e3fd0001 setl \$253,0x1
+
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <a>
+ c: e3fd0003 setl \$253,0x3
+
+0+10 <a>:
+ 10: e3fd0004 setl \$253,0x4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs1.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs1.d
new file mode 100644
index 0000000..66892e0
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs1.d
@@ -0,0 +1,27 @@
+#source: start4.s
+#source: pushja.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: a.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -dr
+
+# Check that PUSHJ with an offset just within the offset range gets no
+# stub expansion, ELF version.
+
+.*: file format elf64-mmix
+Disassembly of section \.init:
+0+ <_start>:
+ 0: e37704a6 setl \$119,0x4a6
+Disassembly of section \.text:
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20cffff pushj \$12,40004 <a>
+ c: e3fd0003 setl \$253,0x3
+ \.\.\.
+0+40004 <a>:
+ 40004: e3fd0004 setl \$253,0x4
+0+40008 <_start>:
+ 40008: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs1b.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs1b.d
new file mode 100644
index 0000000..f9a2491
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs1b.d
@@ -0,0 +1,31 @@
+#source: start4.s
+#source: nop123.s
+#source: a.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pushja.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -dr
+
+# Check that PUSHJ with an offset just within the offset range gets no
+# stub expansion, backwards, ELF version.
+
+.*: file format elf64-mmix
+Disassembly of section \.init:
+0+ <_start>:
+ 0: e37704a6 setl \$119,0x4a6
+Disassembly of section \.text:
+0+4 <a-0x4>:
+ 4: fd010203 swym 1,2,3
+0+8 <a>:
+ 8: e3fd0004 setl \$253,0x4
+ \.\.\.
+0+40004 <pushja>:
+ 40004: e3fd0002 setl \$253,0x2
+ 40008: f30c0000 pushj \$12,8 <a>
+ 4000c: e3fd0003 setl \$253,0x3
+0+40010 <_start>:
+ 40010: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs1bm.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs1bm.d
new file mode 100644
index 0000000..d70da89
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs1bm.d
@@ -0,0 +1,29 @@
+#source: nop123.s
+#source: nop123.s
+#source: a.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pushja.s
+#source: start.s
+#ld: -m mmo
+#objdump: -dr
+
+# Check that PUSHJ with an offset just within the offset range gets no
+# stub expansion, backwards, mmo version.
+
+.*: file format mmo
+Disassembly of section \.text:
+0+ <a-0x8>:
+ 0: fd010203 swym 1,2,3
+ 4: fd010203 swym 1,2,3
+0+8 <a>:
+ 8: e3fd0004 setl \$253,0x4
+ \.\.\.
+0+40004 <pushja>:
+ 40004: e3fd0002 setl \$253,0x2
+ 40008: f30c0000 pushj \$12,8 <a>
+ 4000c: e3fd0003 setl \$253,0x3
+0+40010 <Main>:
+ 40010: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs1m.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs1m.d
new file mode 100644
index 0000000..0df80a2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs1m.d
@@ -0,0 +1,26 @@
+#source: nop123.s
+#source: pushja.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: a.s
+#source: start.s
+#ld: -m mmo
+#objdump: -dr
+
+# Check that PUSHJ with an offset just within the offset range gets no
+# stub expansion, mmo version.
+
+.*: file format mmo
+Disassembly of section \.text:
+0+ <pushja-0x4>:
+ 0: fd010203 swym 1,2,3
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20cffff pushj \$12,40004 <a>
+ c: e3fd0003 setl \$253,0x3
+ \.\.\.
+0+40004 <a>:
+ 40004: e3fd0004 setl \$253,0x4
+0+40008 <Main>:
+ 40008: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs1r.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs1r.d
new file mode 100644
index 0000000..3083274
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs1r.d
@@ -0,0 +1,22 @@
+#source: nop123.s
+#source: pushja.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: nop123.s
+#ld: -r -m elf64mmix
+#objdump: -dr
+
+# When linking relocatable, check that PUSHJ with a distance to the end of
+# the section just within the offset range gets no stub expansion.
+
+.*: file format elf64-mmix
+Disassembly of section \.text:
+0+ <pushja-0x4>:
+ 0: fd010203 swym 1,2,3
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0000 pushj \$12,8 <pushja\+0x4>
+ 8: R_MMIX_PUSHJ_STUBBABLE a
+ c: e3fd0003 setl \$253,0x3
+ \.\.\.
+ 40000: fd010203 swym 1,2,3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs2.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs2.d
new file mode 100644
index 0000000..c6b5829
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs2.d
@@ -0,0 +1,29 @@
+#source: start4.s
+#source: pushja.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -dr
+
+# Check that PUSHJ with an offset just outside the PUSHJ offset range gets
+# a JMP stub expansion, ELF version.
+
+.*: file format elf64-mmix
+Disassembly of section \.init:
+0+ <_start>:
+ 0: e37704a6 setl \$119,0x4a6
+Disassembly of section \.text:
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <pushja\+0xc>
+ c: e3fd0003 setl \$253,0x3
+ 10: f000ffff jmp 4000c <a>
+ \.\.\.
+0+4000c <a>:
+ 4000c: e3fd0004 setl \$253,0x4
+0+40010 <_start>:
+ 40010: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs2b.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs2b.d
new file mode 100644
index 0000000..a6f2299
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs2b.d
@@ -0,0 +1,33 @@
+#source: start4.s
+#source: nop123.s
+#source: a.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pad4.s
+#source: pushja.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -dr
+
+# Check that PUSHJ with an offset just outside the offset range gets a JMP
+# stub expansion, backwards, ELF version.
+
+.*: file format elf64-mmix
+Disassembly of section \.init:
+0+ <_start>:
+ 0: e37704a6 setl \$119,0x4a6
+Disassembly of section \.text:
+0+4 <a-0x4>:
+ 4: fd010203 swym 1,2,3
+0+8 <a>:
+ 8: e3fd0004 setl \$253,0x4
+ \.\.\.
+0+40008 <pushja>:
+ 40008: e3fd0002 setl \$253,0x2
+ 4000c: f20c0002 pushj \$12,40014 <pushja\+0xc>
+ 40010: e3fd0003 setl \$253,0x3
+ 40014: f1fefffd jmp 8 <a>
+0+40018 <_start>:
+ 40018: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs2bm.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs2bm.d
new file mode 100644
index 0000000..1f37c66
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs2bm.d
@@ -0,0 +1,31 @@
+#source: nop123.s
+#source: nop123.s
+#source: a.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pad4.s
+#source: pushja.s
+#source: start.s
+#ld: -m mmo
+#objdump: -dr
+
+# Check that PUSHJ with an offset just outside the offset range gets a JMP
+# stub expansion, backwards, mmo version.
+
+.*: file format mmo
+Disassembly of section \.text:
+0+ <a-0x8>:
+ 0: fd010203 swym 1,2,3
+ 4: fd010203 swym 1,2,3
+0+8 <a>:
+ 8: e3fd0004 setl \$253,0x4
+ \.\.\.
+0+40008 <pushja>:
+ 40008: e3fd0002 setl \$253,0x2
+ 4000c: f20c0002 pushj \$12,40014 <pushja\+0xc>
+ 40010: e3fd0003 setl \$253,0x3
+ 40014: f1fefffd jmp 8 <a>
+0+40018 <Main>:
+ 40018: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs2m.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs2m.d
new file mode 100644
index 0000000..8c7af13
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs2m.d
@@ -0,0 +1,28 @@
+#source: nop123.s
+#source: pushja.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#source: start.s
+#ld: -m mmo
+#objdump: -dr
+
+# Check that PUSHJ with an offset just outside the PUSHJ offset range gets
+# a JMP stub expansion, mmo version.
+
+.*: file format mmo
+Disassembly of section \.text:
+0+ <pushja-0x4>:
+ 0: fd010203 swym 1,2,3
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <pushja\+0xc>
+ c: e3fd0003 setl \$253,0x3
+ 10: f000ffff jmp 4000c <a>
+ \.\.\.
+0+4000c <a>:
+ 4000c: e3fd0004 setl \$253,0x4
+0+40010 <Main>:
+ 40010: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs2r.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs2r.d
new file mode 100644
index 0000000..df181e0
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs2r.d
@@ -0,0 +1,27 @@
+#source: nop123.s
+#source: pushja.s
+#source: ext1l.s
+#source: pad2p18m32.s
+#source: pad16.s
+#source: nop123.s
+#ld: -r -m elf64mmix
+#objdump: -dr
+
+# When linking relocatably, check that PUSHJ with a distance to the end of
+# the section just outside the offset range gets expanded.
+
+.*: file format elf64-mmix
+Disassembly of section \.text:
+0+ <pushja-0x4>:
+ 0: fd010203 swym 1,2,3
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <pushja\+0xc>
+ c: e3fd0003 setl \$253,0x3
+ 10: f0000000 jmp 10 <pushja\+0xc>
+ 10: R_MMIX_JMP a
+ \.\.\.
+0+24 <ext1>:
+ 24: fd040810 swym 4,8,16
+ \.\.\.
+ 40018: fd010203 swym 1,2,3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs3.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs3.d
new file mode 100644
index 0000000..75afe1b
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs3.d
@@ -0,0 +1,29 @@
+#source: start4.s
+#source: pushja.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -dr
+
+# Check that PUSHJ with an offset just within reach of JMP gets it, ELF
+# version.
+
+.*: file format elf64-mmix
+Disassembly of section \.init:
+0+ <_start>:
+ 0: e37704a6 setl \$119,0x4a6
+Disassembly of section \.text:
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <pushja\+0xc>
+ c: e3fd0003 setl \$253,0x3
+ 10: f0ffffff jmp 400000c <a>
+ \.\.\.
+0+400000c <a>:
+ 400000c: e3fd0004 setl \$253,0x4
+0+4000010 <_start>:
+ 4000010: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs3b.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs3b.d
new file mode 100644
index 0000000..33812bb
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs3b.d
@@ -0,0 +1,30 @@
+#source: start4.s
+#source: nop123.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pushja.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -dr
+
+# Check that PUSHJ with an offset just inside the offset range of a JMP
+# stub expansion works, backwards, ELF version.
+
+.*: file format elf64-mmix
+Disassembly of section \.init:
+0+ <_start>:
+ 0: e37704a6 setl \$119,0x4a6
+Disassembly of section \.text:
+0+4 <a-0x4>:
+ 4: fd010203 swym 1,2,3
+0+8 <a>:
+ 8: e3fd0004 setl \$253,0x4
+ \.\.\.
+0+3fffffc <pushja>:
+ 3fffffc: e3fd0002 setl \$253,0x2
+ 4000000: f20c0002 pushj \$12,4000008 <pushja\+0xc>
+ 4000004: e3fd0003 setl \$253,0x3
+ 4000008: f1000000 jmp 8 <a>
+0+400000c <_start>:
+ 400000c: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs3bm.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs3bm.d
new file mode 100644
index 0000000..f485d14
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs3bm.d
@@ -0,0 +1,28 @@
+#source: nop123.s
+#source: nop123.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pushja.s
+#source: start.s
+#ld: -m mmo
+#objdump: -dr
+
+# Check that PUSHJ with an offset just inside the offset range of a JMP
+# stub expansion works, backwards, mmo version.
+
+.*: file format mmo
+Disassembly of section \.text:
+0+ <a-0x8>:
+ 0: fd010203 swym 1,2,3
+ 4: fd010203 swym 1,2,3
+0+8 <a>:
+ 8: e3fd0004 setl \$253,0x4
+ \.\.\.
+0+3fffffc <pushja>:
+ 3fffffc: e3fd0002 setl \$253,0x2
+ 4000000: f20c0002 pushj \$12,4000008 <pushja\+0xc>
+ 4000004: e3fd0003 setl \$253,0x3
+ 4000008: f1000000 jmp 8 <a>
+0+400000c <Main>:
+ 400000c: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs3m.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs3m.d
new file mode 100644
index 0000000..35df726
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs3m.d
@@ -0,0 +1,28 @@
+#source: nop123.s
+#source: pushja.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#source: start.s
+#ld: -m mmo
+#objdump: -dr
+
+# Check that PUSHJ with an offset just within reach of JMP gets it, mmo
+# version.
+
+.*: file format mmo
+Disassembly of section \.text:
+0+ <pushja-0x4>:
+ 0: fd010203 swym 1,2,3
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <pushja\+0xc>
+ c: e3fd0003 setl \$253,0x3
+ 10: f0ffffff jmp 400000c <a>
+ \.\.\.
+0+400000c <a>:
+ 400000c: e3fd0004 setl \$253,0x4
+0+4000010 <Main>:
+ 4000010: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs3r.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs3r.d
new file mode 100644
index 0000000..537b3f9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs3r.d
@@ -0,0 +1,32 @@
+#source: nop123.s
+#source: pushja.s
+#source: undef-2.s
+#source: nop123.s
+#source: pad16.s
+#source: pad2p18m32.s
+#ld: -r -m elf64mmix
+#objdump: -dr
+
+# When linking relocatably, check two expanded stubbable PUSHJs.
+
+# With better relaxation support for relocatable links, both should be
+# able to pass through unexpanded. Right now, we just check that they can
+# coexist peacefully.
+
+.*: file format elf64-mmix
+Disassembly of section \.text:
+0+ <pushja-0x4>:
+ 0: fd010203 swym 1,2,3
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <pushja\+0xc>
+ c: e3fd0003 setl \$253,0x3
+ 10: f0000000 jmp 10 <pushja\+0xc>
+ 10: R_MMIX_JMP a
+ \.\.\.
+ 24: f2050001 pushj \$5,28 <pushja\+0x24>
+ 28: f0000000 jmp 28 <pushja\+0x24>
+ 28: R_MMIX_JMP undefd
+ \.\.\.
+ 3c: fd010203 swym 1,2,3
+ \.\.\.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs4.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs4.d
new file mode 100644
index 0000000..e010449
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs4.d
@@ -0,0 +1,34 @@
+#source: start4.s
+#source: pushja.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -dr
+
+# Check that PUSHJ with an offset just outside reach of JMP works; it will
+# get the full expansion, ELF version.
+
+.*: file format elf64-mmix
+Disassembly of section \.init:
+0+ <_start>:
+ 0: e37704a6 setl \$119,0x4a6
+Disassembly of section \.text:
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <pushja\+0xc>
+ c: e3fd0003 setl \$253,0x3
+ 10: e3ff0020 setl \$255,0x20
+ 14: e6ff0400 incml \$255,0x400
+ 18: e5ff0000 incmh \$255,0x0
+ 1c: e4ff0000 inch \$255,0x0
+ 20: 9f00ff00 go \$0,\$255,0
+ \.\.\.
+0+4000020 <a>:
+ 4000020: e3fd0004 setl \$253,0x4
+0+4000024 <_start>:
+ 4000024: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs4b.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs4b.d
new file mode 100644
index 0000000..cef68d7
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs4b.d
@@ -0,0 +1,35 @@
+#source: start4.s
+#source: nop123.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pushja.s
+#source: start.s
+#ld: -m elf64mmix
+#objdump: -dr
+
+# Check that PUSHJ with an offset just outside the offset range of a JMP
+# stub expansion works, backwards, ELF version.
+
+.*: file format elf64-mmix
+Disassembly of section \.init:
+0+ <_start>:
+ 0: e37704a6 setl \$119,0x4a6
+Disassembly of section \.text:
+0+4 <a-0x4>:
+ 4: fd010203 swym 1,2,3
+0+8 <a>:
+ 8: e3fd0004 setl \$253,0x4
+ \.\.\.
+0+4000000 <pushja>:
+ 4000000: e3fd0002 setl \$253,0x2
+ 4000004: f20c0002 pushj \$12,400000c <pushja\+0xc>
+ 4000008: e3fd0003 setl \$253,0x3
+ 400000c: e3ff0008 setl \$255,0x8
+ 4000010: e6ff0000 incml \$255,0x0
+ 4000014: e5ff0000 incmh \$255,0x0
+ 4000018: e4ff0000 inch \$255,0x0
+ 400001c: 9f00ff00 go \$0,\$255,0
+0+4000020 <_start>:
+ 4000020: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs4bm.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs4bm.d
new file mode 100644
index 0000000..53b74f1
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs4bm.d
@@ -0,0 +1,33 @@
+#source: nop123.s
+#source: nop123.s
+#source: a.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pushja.s
+#source: start.s
+#ld: -m mmo
+#objdump: -dr
+
+# Check that PUSHJ with an offset just outside the offset range of a JMP
+# stub expansion works, backwards, mmo version.
+
+.*: file format mmo
+Disassembly of section \.text:
+0+ <a-0x8>:
+ 0: fd010203 swym 1,2,3
+ 4: fd010203 swym 1,2,3
+0+8 <a>:
+ 8: e3fd0004 setl \$253,0x4
+ \.\.\.
+0+4000000 <pushja>:
+ 4000000: e3fd0002 setl \$253,0x2
+ 4000004: f20c0002 pushj \$12,400000c <pushja\+0xc>
+ 4000008: e3fd0003 setl \$253,0x3
+ 400000c: e3ff0008 setl \$255,0x8
+ 4000010: e6ff0000 incml \$255,0x0
+ 4000014: e5ff0000 incmh \$255,0x0
+ 4000018: e4ff0000 inch \$255,0x0
+ 400001c: 9f00ff00 go \$0,\$255,0
+0+4000020 <Main>:
+ 4000020: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs4m.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs4m.d
new file mode 100644
index 0000000..153e96c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs4m.d
@@ -0,0 +1,33 @@
+#source: nop123.s
+#source: pushja.s
+#source: pad2p26m32.s
+#source: pad16.s
+#source: pad4.s
+#source: pad4.s
+#source: pad4.s
+#source: a.s
+#source: start.s
+#ld: -m mmo
+#objdump: -dr
+
+# Check that PUSHJ with an offset just outside reach of JMP works; it will
+# get the full expansion, mmo version.
+
+.*: file format mmo
+Disassembly of section \.text:
+0+ <pushja-0x4>:
+ 0: fd010203 swym 1,2,3
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <pushja\+0xc>
+ c: e3fd0003 setl \$253,0x3
+ 10: e3ff0020 setl \$255,0x20
+ 14: e6ff0400 incml \$255,0x400
+ 18: e5ff0000 incmh \$255,0x0
+ 1c: e4ff0000 inch \$255,0x0
+ 20: 9f00ff00 go \$0,\$255,0
+ \.\.\.
+0+4000020 <a>:
+ 4000020: e3fd0004 setl \$253,0x4
+0+4000024 <Main>:
+ 4000024: e3fd0001 setl \$253,0x1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/pushjs4r.d b/binutils-2.21/ld/testsuite/ld-mmix/pushjs4r.d
new file mode 100644
index 0000000..e734dc6
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/pushjs4r.d
@@ -0,0 +1,29 @@
+#source: nop123.s
+#source: pushja.s
+#source: undef-2.s
+#source: pad2p18m32.s
+#source: nop123.s
+#ld: -r -m elf64mmix
+#objdump: -dr
+
+# When linking relocatably, check two stubbable PUSHJ:s, one expanded.
+
+# With better relaxation support for relocatable links, both should be
+# able to pass through unexpanded. Right now, we just check that they can
+# coexist peacefully.
+
+.*: file format elf64-mmix
+Disassembly of section \.text:
+0+ <pushja-0x4>:
+ 0: fd010203 swym 1,2,3
+0+4 <pushja>:
+ 4: e3fd0002 setl \$253,0x2
+ 8: f20c0002 pushj \$12,10 <pushja\+0xc>
+ c: e3fd0003 setl \$253,0x3
+ 10: f0000000 jmp 10 <pushja\+0xc>
+ 10: R_MMIX_JMP a
+ \.\.\.
+ 24: f2050000 pushj \$5,24 <pushja\+0x20>
+ 24: R_MMIX_PUSHJ_STUBBABLE undefd
+ \.\.\.
+ 40008: fd010203 swym 1,2,3
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/reg-1.d b/binutils-2.21/ld/testsuite/ld-mmix/reg-1.d
new file mode 100644
index 0000000..125fa32
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/reg-1.d
@@ -0,0 +1,7 @@
+#source: areg-256.s
+#source: gregget1.s
+#source: start.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#error: relocation truncated to fit: R_MMIX_REG against symbol `areg'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/reg-1m.d b/binutils-2.21/ld/testsuite/ld-mmix/reg-1m.d
new file mode 100644
index 0000000..73bdb1a
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/reg-1m.d
@@ -0,0 +1,7 @@
+#source: areg-256.s
+#source: gregget1.s
+#source: start.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#error: relocation truncated to fit: R_MMIX_REG against `areg'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/reg-2.d b/binutils-2.21/ld/testsuite/ld-mmix/reg-2.d
new file mode 100644
index 0000000..09b0da4
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/reg-2.d
@@ -0,0 +1,7 @@
+#source: areg-t.s
+#source: gregget1.s
+#source: start.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#error: register relocation against non-register symbol: areg in \.text
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/reg-2m.d b/binutils-2.21/ld/testsuite/ld-mmix/reg-2m.d
new file mode 100644
index 0000000..f6edbef
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/reg-2m.d
@@ -0,0 +1,7 @@
+#source: areg-t.s
+#source: gregget1.s
+#source: start.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#error: register relocation against non-register symbol: areg in \.text
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/regext1.s b/binutils-2.21/ld/testsuite/ld-mmix/regext1.s
new file mode 100644
index 0000000..7703905
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/regext1.s
@@ -0,0 +1,2 @@
+ .global ext1
+ext1 IS $252
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-1.d b/binutils-2.21/ld/testsuite/ld-mmix/sec-1.d
new file mode 100644
index 0000000..eab62a2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-1.d
@@ -0,0 +1,35 @@
+#source: sec-1.s
+#source: start.s
+#ld: -m elf64mmix
+#objcopy_linked_file: -O mmo
+#objdump: -sh
+
+# Test conversion from ELF to mmo with non-mmo-sections present,
+# testing that support.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 secname 0+19 0+4 0+4 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+ 2 \.a\.fourth\.section 0+10 0+20 0+20 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 3 anothersec 0+13 2000000000000000 2000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, DATA
+ 4 thirdsec 0+a 0+ 0+ 0+ 2\*\*2
+ CONTENTS, READONLY
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section secname:
+ 0004 00000001 00000002 00000003 00000004 .*
+ 0014 ffffffff fffff827 50 .*
+Contents of section \.a\.fourth\.section:
+ 0020 00000000 0087a238 00000000 302a55a8 .*
+Contents of section anothersec:
+ 2000000000000000 0000000a 00000009 00000008 00000007 .*
+ 2000000000000010 252729 .*
+Contents of section thirdsec:
+ 0000 00030d41 000186a2 2628 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-1.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-1.s
new file mode 100644
index 0000000..77e26e3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-1.s
@@ -0,0 +1,14 @@
+ .section secname,"ax"
+ TETRA 1,2,3,4,-1,-2009
+ BYTE 80
+
+ .section anothersec,"aw"
+ TETRA 10,9,8,7
+ BYTE 37,39,41
+
+ .section thirdsec
+ TETRA 200001,100002
+ BYTE 38,40
+
+ .section .a.fourth.section,"a"
+ OCTA 8888888,808080808
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-2.d b/binutils-2.21/ld/testsuite/ld-mmix/sec-2.d
new file mode 100644
index 0000000..10623f3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-2.d
@@ -0,0 +1,26 @@
+#source: sec-1.s
+#source: start.s
+#source: data1.s
+#ld: -m mmo -T $srcdir/$subdir/mmosec1.ld
+#objdump: -sh
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+100 0+100 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.other 0+50 1000000000000000 1000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE, DATA
+ 2 \.data 0+4 2000000000000004 2000000000000004 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+Contents of section \.text:
+ 0100 e3fd0001 .*
+Contents of section \.other:
+ 1000000000000000 00000001 00000002 00000003 00000004 .*
+ 1000000000000010 ffffffff fffff827 50000000 0000000a .*
+ 1000000000000020 00000009 00000008 00000007 25272900 .*
+ 1000000000000030 00030d41 000186a2 26280000 00000000 .*
+ 1000000000000040 00000000 0087a238 00000000 302a55a8 .*
+Contents of section \.data:
+ 2000000000000004 0000012c .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-2.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-2.s
new file mode 100644
index 0000000..3ac0555
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-2.s
@@ -0,0 +1,2 @@
+ .section .other,"ax"
+ TETRA 12,34,1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-3.d b/binutils-2.21/ld/testsuite/ld-mmix/sec-3.d
new file mode 100644
index 0000000..791b5ea
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-3.d
@@ -0,0 +1,36 @@
+#source: sec-1.s
+#source: start.s
+#source: data1.s
+#ld: -m mmo
+#objdump: -sh
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 secname 0+19 0+4 0+4 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+ 2 \.a\.fourth\.section 0+10 0+20 0+20 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 3 \.data 0+4 2000000000000004 2000000000000004 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+ 4 anothersec 0+13 2000000000000008 2000000000000008 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, DATA
+ 5 thirdsec 0+a 0+ 0+ 0+ 2\*\*2
+ CONTENTS, READONLY
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section secname:
+ 0004 00000001 00000002 00000003 00000004 .*
+ 0014 ffffffff fffff827 50 .*
+Contents of section \.a\.fourth\.section:
+ 0020 00000000 0087a238 00000000 302a55a8 .*
+Contents of section \.data:
+ 2000000000000004 0000002c .*
+Contents of section anothersec:
+ 2000000000000008 0000000a 00000009 00000008 00000007 .*
+ 2000000000000018 252729 .*
+Contents of section thirdsec:
+ 0000 00030d41 000186a2 2628 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-4.d b/binutils-2.21/ld/testsuite/ld-mmix/sec-4.d
new file mode 100644
index 0000000..251f6a2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-4.d
@@ -0,0 +1,22 @@
+#source: sec-2.s
+#source: start.s
+#source: data1.s
+#ld: -m mmo -T $srcdir/$subdir/mmosec1.ld
+#objdump: -sh
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+100 0+100 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.data 0+4 2000000000000004 2000000000000004 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+ 2 \.other 0+c 1000000000000000 1000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+Contents of section \.text:
+ 0100 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000004 0000012c .*
+Contents of section \.other:
+ 1000000000000000 0000000c 00000022 00000001 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-5.d b/binutils-2.21/ld/testsuite/ld-mmix/sec-5.d
new file mode 100644
index 0000000..24aa0e1
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-5.d
@@ -0,0 +1,28 @@
+#source: b-twoinsn.s
+#source: b-offloc.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objdump: -sh
+
+# Check that sections are automatically created to cope with contents at
+# unexpected addresses when an mmo is read in. We used to do this by
+# e.g. linking .text at an unexpected address, like in sec-9.d. That no
+# longer works, because .text and .data now gets section descriptors at
+# mmo output when the address and contents doesn't trivially reflect the
+# section contents at link time. To test, we instead read in an mmo
+# formed from a link to binary format, like the b-*.d tests for mmo
+# execution paths.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+8 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.MMIX\.sec\.0 0+10 789abcdef0123458 789abcdef0123458 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+Contents of section \.text:
+ 0+ e3fd0001 e3fd0004 .*
+Contents of section \.MMIX\.sec\.0:
+ 789abcdef0123458 b045197d 2c1b03b2 e4dbf877 0fc766fb .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-6.d b/binutils-2.21/ld/testsuite/ld-mmix/sec-6.d
new file mode 100644
index 0000000..5b692e2
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-6.d
@@ -0,0 +1,37 @@
+#source: start.s
+#source: sec-6.s
+#source: a.s
+#as: -x
+#ld: -m elf64mmix
+#objcopy_linked_file: -O mmo
+#objdump: -xs
+
+# A non-loaded section with relocs would have the SEC_RELOC bit set in the
+# output if we didn't clear it. For reference, here's the ELF copied to
+# mmo, so we make sure no spurious flags are introduced.
+
+.*: file format mmo
+.*
+architecture: mmix, flags 0x0+10:
+HAS_SYMS
+start address 0x0+
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+8 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.debug_frame 0+10 0+ 0+ 0+ 2\*\*2
+ CONTENTS, READONLY, DEBUGGING
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+8 g \.text debugb
+2000000000000000 g \*ABS\* __bss_start
+2000000000000000 g \*ABS\* _edata
+2000000000000000 g \*ABS\* _end
+0+4 g \.text a
+
+Contents of section \.text:
+ 0000 e3fd0001 e3fd0004 .*
+Contents of section \.debug_frame:
+ 0000 00000000 00000004 00000000 00000008 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-6.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-6.s
new file mode 100644
index 0000000..7d83883
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-6.s
@@ -0,0 +1,5 @@
+ .global debugb
+ .section .debug_frame,"",@progbits
+ .8byte a
+debugb:
+ .8byte debugb
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-6m.d b/binutils-2.21/ld/testsuite/ld-mmix/sec-6m.d
new file mode 100644
index 0000000..8d12cfb
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-6m.d
@@ -0,0 +1,32 @@
+#source: start.s
+#source: sec-6.s
+#source: a.s
+#as: -x
+#ld: -m mmo
+#objdump: -xs
+
+# A non-loaded section with relocs would have the SEC_RELOC bit set in the
+# output if we didn't clear it.
+
+.*: file format mmo
+.*
+architecture: mmix, flags 0x0+10:
+HAS_SYMS
+start address 0x0+
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+8 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.debug_frame 0+10 0+ 0+ 0+ 2\*\*2
+ CONTENTS, READONLY, DEBUGGING
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+8 g \.text debugb
+0+4 g \.text a
+
+Contents of section \.text:
+ 0000 e3fd0001 e3fd0004 .*
+Contents of section \.debug_frame:
+ 0000 00000000 00000004 00000000 00000008 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-7a.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-7a.s
new file mode 100644
index 0000000..58cc7ab
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-7a.s
@@ -0,0 +1,6 @@
+ .section .di
+ .byte 42
+ .rept 32763
+ .byte 0
+ .endr
+ .byte 43
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-7b.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-7b.s
new file mode 100644
index 0000000..963ca47
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-7b.s
@@ -0,0 +1,6 @@
+ .section .di
+ .byte 44
+ .rept 32764
+ .byte 0
+ .endr
+ .byte 45
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-7c.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-7c.s
new file mode 100644
index 0000000..f6faf85
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-7c.s
@@ -0,0 +1,6 @@
+ .section .di
+ .byte 46
+ .rept 32765
+ .byte 0
+ .endr
+ .byte 47
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-7d.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-7d.s
new file mode 100644
index 0000000..4d73c5f
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-7d.s
@@ -0,0 +1,6 @@
+ .section .di
+ .byte 48
+ .rept 32766
+ .byte 0
+ .endr
+ .byte 49
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-7e.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-7e.s
new file mode 100644
index 0000000..2ffde13
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-7e.s
@@ -0,0 +1,6 @@
+ .section .di
+ .byte 50
+ .rept 32767
+ .byte 0
+ .endr
+ .byte 51
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-7m.d b/binutils-2.21/ld/testsuite/ld-mmix/sec-7m.d
new file mode 100644
index 0000000..bc930e5
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-7m.d
@@ -0,0 +1,38 @@
+#source: start.s
+#source: sec-7a.s
+#source: sec-7b.s
+#source: sec-7c.s
+#source: sec-7d.s
+#source: sec-7e.s
+#ld: -m mmo
+#objcopy_linked_file:
+#objdump: -hs
+
+# When producing mmo output: sections with an input length not a
+# multiple of 4, and whose total length in linked output
+# exceeded the "chunk size" (32768), would get to-4-padding
+# inserted at each chunk division. Also check that section
+# sizes aren't rounded up at objcopy.
+
+.*: file format mmo
+
+Sections:
+Idx Name[ ]+Size[ ]+VMA[ ]+LMA[ ]+File off Algn
+ 0 \.text[ ]+0+4 0+ 0+ 0+ 2\*\*2
+[ ]+CONTENTS, ALLOC, LOAD, CODE
+ 1 \.di +0+27ffb +0+4 +0+4 +0+ +2\*\*2
+[ ]+CONTENTS, READONLY
+Contents of section \.text:
+ 0000 e3fd0001[ ]+.*
+Contents of section \.di:
+ 00000 2a000000 00000000 00000000 00000000 .*
+#...
+ 07ff0 00000000 00000000 00000000 2b2c0000 .*
+#...
+ 0fff0 00000000 00000000 00002d2e 00000000 .*
+#...
+ 17ff0 00000000 00000000 002f3000 00000000 .*
+#...
+ 1fff0 00000000 00000000 00313200 00000000 .*
+#...
+ 27ff0 00000000 00000000 000033[ ]+.*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-8a.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-8a.s
new file mode 100644
index 0000000..4ac94f7
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-8a.s
@@ -0,0 +1,4 @@
+ .section .text.1
+ .byte 42
+ .space 32759
+ .byte 43
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-8b.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-8b.s
new file mode 100644
index 0000000..17eb415
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-8b.s
@@ -0,0 +1,4 @@
+ .section .text.1
+ .byte 44
+ .space 32764
+ .byte 45
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-8d.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-8d.s
new file mode 100644
index 0000000..0eb5b56
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-8d.s
@@ -0,0 +1,4 @@
+ .section .text.1
+ .byte 48
+ .space 32766
+ .byte 49
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-8m.d b/binutils-2.21/ld/testsuite/ld-mmix/sec-8m.d
new file mode 100644
index 0000000..fb06b04
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-8m.d
@@ -0,0 +1,30 @@
+#source: start.s
+#source: sec-8a.s
+#source: sec-8b.s
+#source: sec-8m.s
+#source: sec-8d.s
+#ld: -m mmo
+#objdump: -s
+
+# Distantly related to sec-7m.s in that section lengths mattered for the
+# bug. When one input-section (seen in mmo.c as a chunk of data to
+# output) had a length not a multiple of four, the last bytes were saved
+# to be concatenated with the next chunk. If it was followed by a chunk
+# with a leading multiple-of-four number of zero bytes, those zero bytes
+# would be omitted, and the "saved" bytes would be concatenated with the
+# following (not-all-zeros) bytes. Hence a shift of the last bytes of the
+# first chunk.
+
+.*: file format mmo
+
+Contents of section \.text:
+ 00000 e3fd0001 2a000000 00000000 00000000 .*
+#...
+ 07ff0 00000000 00000000 00000000 2b2c0000 .*
+#...
+ 0fff0 00000000 00000000 00002d00 00000000 .*
+ 10000 00000000 00000000 0000002e 2f303132 .*
+ 10010 33000000 00000000 00000000 00000000 .*
+ 10020 00300000 00000000 00000000 00000000 .*
+#...
+ 18020 31 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-8m.s b/binutils-2.21/ld/testsuite/ld-mmix/sec-8m.s
new file mode 100644
index 0000000..dc695da
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-8m.s
@@ -0,0 +1,4 @@
+ .section .text.1
+ .byte 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0
+ .byte 46, 47, 48, 49, 50, 51
+ .byte 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sec-9.d b/binutils-2.21/ld/testsuite/ld-mmix/sec-9.d
new file mode 100644
index 0000000..4bddc35
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sec-9.d
@@ -0,0 +1,19 @@
+#source: start.s
+#ld: -m mmo -T $srcdir/$subdir/mmosec2.ld
+#objdump: -sh
+
+# This is based on sec-5.d which used to link .text at an unexpected
+# address to check that a special section was created in objdump when
+# reading in contents at an unusual location without a proper section
+# descriptor. As .text (like .data) now gets a section descriptor when
+# linked to an unexpected location, the old test is transformed into a
+# specific check that the section description for .text works.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 1000000000000000 1000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+Contents of section \.text:
+ 1000000000000000 e3fd0001 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/spec801.d b/binutils-2.21/ld/testsuite/ld-mmix/spec801.d
new file mode 100644
index 0000000..27918e9
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/spec801.d
@@ -0,0 +1,21 @@
+#source: bspec801.s
+#source: start.s
+#ld: -m mmo
+#objdump: -sh
+
+# Check exceptional cases for LOP_SPEC 80, which we parse according to a
+# specific format: see documentation and mmo.c
+# #1: name length has LOP_QUOTE.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 00000004 0000000000000000 0000000000000000 00000000 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.MMIX\.spec_data\.80 00000004 0000000000000000 0000000000000000 00000000 2\*\*2
+ CONTENTS
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.MMIX\.spec_data\.80:
+ 0000 98000001 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/spec802.d b/binutils-2.21/ld/testsuite/ld-mmix/spec802.d
new file mode 100644
index 0000000..ea0ebc3
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/spec802.d
@@ -0,0 +1,24 @@
+#source: bspec802.s
+#source: start.s
+#ld: -m mmo
+#objdump: -sh
+
+# See spec801.d.
+# #2: non-quote LOP in name.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+ 2 \.MMIX\.spec_data\.80 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000000 00112233 .*
+Contents of section \.MMIX\.spec_data\.80:
+ 0000 00000004 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/spec803.d b/binutils-2.21/ld/testsuite/ld-mmix/spec803.d
new file mode 100644
index 0000000..b933d6c
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/spec803.d
@@ -0,0 +1,24 @@
+#source: bspec803.s
+#source: start.s
+#ld: -m mmo
+#objdump: -sh
+
+# See spec801.d.
+# #3: LOP_QUOTE in name and non-quote LOP in section flags.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+ 2 \.MMIX\.spec_data\.80 0+c 0+ 0+ 0+ 2\*\*2
+ CONTENTS
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000000 00112233 .*
+Contents of section \.MMIX\.spec_data\.80:
+ 0000 00000002 61616161 98616161 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/spec804.d b/binutils-2.21/ld/testsuite/ld-mmix/spec804.d
new file mode 100644
index 0000000..170bc5e
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/spec804.d
@@ -0,0 +1,24 @@
+#source: bspec804.s
+#source: start.s
+#ld: -m mmo
+#objdump: -sh
+
+# See spec801.d.
+# #4: non-quote LOP in section length, high part.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+ 2 \.MMIX\.spec_data\.80 0+10 0+ 0+ 0+ 2\*\*2
+ CONTENTS
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000000 00112233 .*
+Contents of section \.MMIX\.spec_data\.80:
+ 0000 00000002 61616161 61616161 00000011 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/spec805.d b/binutils-2.21/ld/testsuite/ld-mmix/spec805.d
new file mode 100644
index 0000000..c4cdd02
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/spec805.d
@@ -0,0 +1,25 @@
+#source: bspec805.s
+#source: start.s
+#ld: -m mmo
+#objdump: -sh
+
+# See spec801.d.
+# #5: non-quote LOP in section length, low part.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+ 2 \.MMIX\.spec_data\.80 0+14 0+ 0+ 0+ 2\*\*2
+ CONTENTS
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000000 00112233 .*
+Contents of section \.MMIX\.spec_data\.80:
+ 0000 00000002 61616161 61616161 00000011 .*
+ 0010 00000000 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/spec806.d b/binutils-2.21/ld/testsuite/ld-mmix/spec806.d
new file mode 100644
index 0000000..7f64948
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/spec806.d
@@ -0,0 +1,25 @@
+#source: bspec806.s
+#source: start.s
+#ld: -m mmo
+#objdump: -sh
+
+# See spec801.d.
+# #6: non-quote LOP in section vma, high part.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+ 2 \.MMIX\.spec_data\.80 0+18 0+ 0+ 0+ 2\*\*2
+ CONTENTS
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000000 00112233 .*
+Contents of section \.MMIX\.spec_data\.80:
+ 0000 00000002 61616161 61616161 00000011 .*
+ 0010 00000000 0000000c .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/spec807.d b/binutils-2.21/ld/testsuite/ld-mmix/spec807.d
new file mode 100644
index 0000000..f37e57a
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/spec807.d
@@ -0,0 +1,25 @@
+#source: bspec807.s
+#source: start.s
+#ld: -m mmo
+#objdump: -sh
+
+# See spec801.d.
+# #7: non-quote LOP in section vma, low part.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+ 2 \.MMIX\.spec_data\.80 0+1c 0+ 0+ 0+ 2\*\*2
+ CONTENTS
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000000 00112233 .*
+Contents of section \.MMIX\.spec_data\.80:
+ 0000 00000002 61616161 61616161 00000011 .*
+ 0010 00000000 0000000c 00000000 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/spec808.d b/binutils-2.21/ld/testsuite/ld-mmix/spec808.d
new file mode 100644
index 0000000..e1d6784
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/spec808.d
@@ -0,0 +1,25 @@
+#source: bspec808.s
+#source: start.s
+#ld: -m mmo
+#objdump: -sh
+
+# See spec801.d.
+# #8: Indecent section length.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+ 2 \.MMIX\.spec_data\.80 0+20 0+ 0+ 0+ 2\*\*2
+ CONTENTS
+Contents of section \.text:
+ 0000 e3fd0001 .*
+Contents of section \.data:
+ 2000000000000000 00112233 .*
+Contents of section \.MMIX\.spec_data\.80:
+ 0000 00000002 61616161 61616161 00000011 .*
+ 0010 0000ff00 00000000 000000ff 00000000 .*
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/start-1.d b/binutils-2.21/ld/testsuite/ld-mmix/start-1.d
new file mode 100644
index 0000000..37c23d6
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/start-1.d
@@ -0,0 +1,21 @@
+#source: start2.s
+#ld: -m elf64mmix
+#objdump: -td
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+ (|\.text)
+0+4 g \.text 0+ _start
+2000000000000000 g \*ABS\* 0+ __bss_start
+2000000000000000 g \*ABS\* 0+ _edata
+2000000000000000 g \*ABS\* 0+ _end
+0+4 g \.text 0+ _start\.
+
+Disassembly of section \.text:
+
+0+ <_start-0x4>:
+ 0: fd000001 swym 0,0,1
+
+0+4 <_start>:
+ 4: fd000002 swym 0,0,2
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/start-2.d b/binutils-2.21/ld/testsuite/ld-mmix/start-2.d
new file mode 100644
index 0000000..e380dc0
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/start-2.d
@@ -0,0 +1,4 @@
+#source: main1.s
+#source: a.s
+#ld: -m mmo -e a
+#error: Bad symbol definition: `Main' set to
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/start.s b/binutils-2.21/ld/testsuite/ld-mmix/start.s
new file mode 100644
index 0000000..b2e3c85
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/start.s
@@ -0,0 +1,5 @@
+* Just a start symbol and some non-NOP padding.
+ .text
+ .global _start
+_start:
+ SET $253,1
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/start2.s b/binutils-2.21/ld/testsuite/ld-mmix/start2.s
new file mode 100644
index 0000000..3398788
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/start2.s
@@ -0,0 +1,5 @@
+ .text
+ SWYM 1
+ .global _start
+_start:
+ SWYM 2
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/start3.s b/binutils-2.21/ld/testsuite/ld-mmix/start3.s
new file mode 100644
index 0000000..1055870
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/start3.s
@@ -0,0 +1,7 @@
+# When GC, all sections in each file must be referenced from within a kept
+# section.
+ .section .init,"ax",@progbits
+_start:
+ .quad x+41
+ .quad x2+42
+
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/start4.s b/binutils-2.21/ld/testsuite/ld-mmix/start4.s
new file mode 100644
index 0000000..4948d78
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/start4.s
@@ -0,0 +1,6 @@
+# When GC, all sections in each file must be referenced from within a kept
+# section (which .init is, which .text isn't). Here, we don't refer to
+# anything so whatever is linked will be discarded.
+ .section .init,"ax",@progbits
+_start:
+ SETL $119,1190
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sym-1.d b/binutils-2.21/ld/testsuite/ld-mmix/sym-1.d
new file mode 100644
index 0000000..64d6376
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sym-1.d
@@ -0,0 +1,11 @@
+#source: start.s
+#source: a.s
+#ld: -m mmo
+#nm: -n
+
+# Test that nm can grok a simple mmo symbol table (or that mmo lets nm
+# grok it).
+
+0+ T Main
+0+ T _start
+0+4 T a
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sym-2.d b/binutils-2.21/ld/testsuite/ld-mmix/sym-2.d
new file mode 100644
index 0000000..61bae32
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sym-2.d
@@ -0,0 +1,142 @@
+#source: start.s
+#source: sym-2.s
+#source: a.s
+#as: -globalize-symbols
+#ld: -m mmo
+#objcopy_linked_file:
+#objdump: -t
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g[ ]+\.text Main
+0+4 g[ ]+\.text a40
+0+4 g[ ]+\.text a33
+0+4 g[ ]+\.text a45
+0+4 g[ ]+\.text a21
+0+4 g[ ]+\.text a99
+0+4 g[ ]+\.text a114
+0+4 g[ ]+\.text a122
+0+4 g[ ]+\.text a73
+0+4 g[ ]+\.text a111
+0+4 g[ ]+\.text a109
+0+4 g[ ]+\.text a65
+0+4 g[ ]+\.text a28
+0+4 g[ ]+\.text a30
+0+4 g[ ]+\.text a10
+0+4 g[ ]+\.text a103
+0+4 g[ ]+\.text a42
+0+4 g[ ]+\.text a62
+0+4 g[ ]+\.text a25
+0+4 g[ ]+\.text a128
+0+4 g[ ]+\.text a9
+0+4 g[ ]+\.text a11
+0+4 g[ ]+\.text a81
+0+4 g[ ]+\.text a55
+0+4 g[ ]+\.text a88
+0+4 g[ ]+\.text a100
+0+4 g[ ]+\.text a104
+0+4 g[ ]+\.text a8
+0+4 g[ ]+\.text a86
+0+4 g[ ]+\.text a91
+0+4 g[ ]+\.text a1
+0+4 g[ ]+\.text a49
+0+4 g[ ]+\.text a43
+0+4 g[ ]+\.text a56
+0+4 g[ ]+\.text a116
+0+4 g[ ]+\.text a124
+0+4 g[ ]+\.text a98
+0+4 g[ ]+\.text a117
+0+4 g[ ]+\.text a80
+0+4 g[ ]+\.text a121
+0+4 g[ ]+\.text a36
+0+4 g[ ]+\.text a75
+0+4 g[ ]+\.text a48
+0+4 g[ ]+\.text a3
+0+4 g[ ]+\.text a63
+0+4 g[ ]+\.text a26
+0+4 g[ ]+\.text a78
+0+4 g[ ]+\.text a61
+0+4 g[ ]+\.text a24
+0+4 g[ ]+\.text a64
+0+4 g[ ]+\.text a27
+0+4 g[ ]+\.text a83
+0+4 g[ ]+\.text a57
+0+4 g[ ]+\.text a123
+0+4 g[ ]+\.text a34
+0+4 g[ ]+\.text a12
+0+4 g[ ]+\.text a14
+0+4 g[ ]+\.text a70
+0+4 g[ ]+\.text a39
+0+4 g[ ]+\.text a82
+0+4 g[ ]+\.text a102
+0+4 g[ ]+\.text a106
+0+4 g[ ]+\.text a110
+0+ g[ ]+\.text _start
+0+4 g[ ]+\.text a41
+0+4 g[ ]+\.text a85
+0+4 g[ ]+\.text a58
+0+4 g[ ]+\.text a89
+0+4 g[ ]+\.text a54
+0+4 g[ ]+\.text a19
+0+4 g[ ]+\.text a93
+0+4 g[ ]+\.text a126
+0+4 g[ ]+\.text a22
+0+4 g[ ]+\.text a96
+0+4 g[ ]+\.text a7
+0+4 g[ ]+\.text a35
+0+4 g[ ]+\.text a31
+0+4 g[ ]+\.text a5
+0+4 g[ ]+\.text a44
+0+4 g[ ]+\.text a105
+0+4 g[ ]+\.text a90
+0+4 g[ ]+\.text a97
+0+4 g[ ]+\.text a92
+0+4 g[ ]+\.text a2
+0+4 g[ ]+\.text a120
+0+4 g[ ]+\.text a113
+0+4 g[ ]+\.text a77
+0+4 g[ ]+\.text a125
+0+4 g[ ]+\.text a118
+0+4 g[ ]+\.text a32
+0+4 g[ ]+\.text a108
+0+4 g[ ]+\.text a47
+0+4 g[ ]+\.text a112
+0+4 g[ ]+\.text a59
+0+4 g[ ]+\.text a87
+0+4 g[ ]+\.text a94
+0+4 g[ ]+\.text a20
+0+4 g[ ]+\.text a51
+0+4 g[ ]+\.text a16
+0+4 g[ ]+\.text a53
+0+4 g[ ]+\.text a18
+0+4 g[ ]+\.text a66
+0+4 g[ ]+\.text a29
+0+4 g[ ]+\.text a72
+0+4 g[ ]+\.text a79
+0+4 g[ ]+\.text a74
+0+4 g[ ]+\.text a68
+0+4 g[ ]+\.text a95
+0+4 g[ ]+\.text a60
+0+4 g[ ]+\.text a23
+0+4 g[ ]+\.text a67
+0+4 g[ ]+\.text a
+0+4 g[ ]+\.text a38
+0+4 g[ ]+\.text a107
+0+4 g[ ]+\.text a127
+0+4 g[ ]+\.text a101
+0+4 g[ ]+\.text a115
+0+4 g[ ]+\.text a71
+0+4 g[ ]+\.text a84
+0+4 g[ ]+\.text a69
+0+4 g[ ]+\.text a37
+0+4 g[ ]+\.text a76
+0+4 g[ ]+\.text a52
+0+4 g[ ]+\.text a17
+0+4 g[ ]+\.text a13
+0+4 g[ ]+\.text a50
+0+4 g[ ]+\.text a15
+0+4 g[ ]+\.text a119
+0+4 g[ ]+\.text a6
+0+4 g[ ]+\.text a46
+0+4 g[ ]+\.text a4
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/sym-2.s b/binutils-2.21/ld/testsuite/ld-mmix/sym-2.s
new file mode 100644
index 0000000..c8df27e
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/sym-2.s
@@ -0,0 +1,130 @@
+% Just 128 symbols to test that we can handle it in mmo. Assemble it with
+% -globalize-symbols.
+a1:
+a2:
+a3:
+a4:
+a5:
+a6:
+a7:
+a8:
+a9:
+a10:
+a11:
+a12:
+a13:
+a14:
+a15:
+a16:
+a17:
+a18:
+a19:
+a20:
+a21:
+a22:
+a23:
+a24:
+a25:
+a26:
+a27:
+a28:
+a29:
+a30:
+a31:
+a32:
+a33:
+a34:
+a35:
+a36:
+a37:
+a38:
+a39:
+a40:
+a41:
+a42:
+a43:
+a44:
+a45:
+a46:
+a47:
+a48:
+a49:
+a50:
+a51:
+a52:
+a53:
+a54:
+a55:
+a56:
+a57:
+a58:
+a59:
+a60:
+a61:
+a62:
+a63:
+a64:
+a65:
+a66:
+a67:
+a68:
+a69:
+a70:
+a71:
+a72:
+a73:
+a74:
+a75:
+a76:
+a77:
+a78:
+a79:
+a80:
+a81:
+a82:
+a83:
+a84:
+a85:
+a86:
+a87:
+a88:
+a89:
+a90:
+a91:
+a92:
+a93:
+a94:
+a95:
+a96:
+a97:
+a98:
+a99:
+a100:
+a101:
+a102:
+a103:
+a104:
+a105:
+a106:
+a107:
+a108:
+a109:
+a110:
+a111:
+a112:
+a113:
+a114:
+a115:
+a116:
+a117:
+a118:
+a119:
+a120:
+a121:
+a122:
+a123:
+a124:
+a125:
+a126:
+a127:
+a128:
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/undef-1.d b/binutils-2.21/ld/testsuite/ld-mmix/undef-1.d
new file mode 100644
index 0000000..fb8c7ee
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/undef-1.d
@@ -0,0 +1,4 @@
+#source: undef-1.s
+#source: start.s
+#ld: -m elf64mmix
+#error: undefined reference to `regvar'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/undef-1.s b/binutils-2.21/ld/testsuite/ld-mmix/undef-1.s
new file mode 100644
index 0000000..668cd15
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/undef-1.s
@@ -0,0 +1 @@
+ ADDU regvar,$8,$9
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/undef-1m.d b/binutils-2.21/ld/testsuite/ld-mmix/undef-1m.d
new file mode 100644
index 0000000..001d7f6
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/undef-1m.d
@@ -0,0 +1,4 @@
+#source: undef-1.s
+#source: start.s
+#ld: -m mmo
+#error: undefined reference to `regvar'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/undef-2.d b/binutils-2.21/ld/testsuite/ld-mmix/undef-2.d
new file mode 100644
index 0000000..52844db
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/undef-2.d
@@ -0,0 +1,5 @@
+#source: undef-2.s
+#source: start.s
+#as: -x
+#ld: -m elf64mmix
+#error: undefined reference to `undefd'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/undef-2.s b/binutils-2.21/ld/testsuite/ld-mmix/undef-2.s
new file mode 100644
index 0000000..d912b15
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/undef-2.s
@@ -0,0 +1 @@
+ PUSHJ $5,undefd
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/undef-2m.d b/binutils-2.21/ld/testsuite/ld-mmix/undef-2m.d
new file mode 100644
index 0000000..aa0becc
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/undef-2m.d
@@ -0,0 +1,5 @@
+#source: undef-2.s
+#source: start.s
+#as: -x
+#ld: -m mmo
+#error: undefined reference to `undefd'
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/undef-3.d b/binutils-2.21/ld/testsuite/ld-mmix/undef-3.d
new file mode 100644
index 0000000..2571513
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/undef-3.d
@@ -0,0 +1,32 @@
+#source: start.s
+#ld: -u undefd -m elf64mmix
+#readelf: -S -s
+
+There are 5 section headers, starting at offset 0xa0:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Offset
+ +Size +EntSize +Flags +Link +Info +Align
+ +\[ 0\] +NULL +0+ +0+
+ +0+ +0+ +0 +0 +0
+ +\[ 1\] \.text +PROGBITS +0+ +0+78
+ +0+4 +0+ +AX +0 +0 +4
+ +\[ 2\] \.shstrtab +STRTAB +0+ +0+7c
+ +0+21 +0+ +0 +0 +1
+ +\[ 3\] \.symtab +SYMTAB +0+ +0+1e0
+ +0+c0 +0+18 +4 +2 +8
+ +\[ 4\] \.strtab +STRTAB +0+ +0+2a0
+ +0+2f +0+ +0 +0 +1
+Key to Flags:
+#...
+
+Symbol table '\.symtab' contains 8 entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND
+ +1: 0+ +0 +SECTION +LOCAL +DEFAULT +1
+ +2: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +UND undefd
+ +3: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
+ +4: 2000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +5: 2000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +6: 2000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+ +7: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +1 _start\.
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/undef-3m.d b/binutils-2.21/ld/testsuite/ld-mmix/undef-3m.d
new file mode 100644
index 0000000..08e1df1
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/undef-3m.d
@@ -0,0 +1,18 @@
+#source: start.s
+#ld: -m mmo -u undefd
+#objdump: -x
+
+.*: file format mmo
+.*
+architecture: mmix, flags 0x0+10:
+HAS_SYMS
+start address 0x0+
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+4 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \*UND\* undefd
+0+ g \.text _start
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/x.s b/binutils-2.21/ld/testsuite/ld-mmix/x.s
new file mode 100644
index 0000000..e7222b1
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/x.s
@@ -0,0 +1,29 @@
+;# Main file, x.s, with the program (_start) referring to two
+;# linkonce functions fn and fn2. The functions fn and fn2 are
+;# supposed to be equivalent of C++ template instantiations; the
+;# main file instantiates fn. An exception-table-lookalike entry
+;# refers to fn via a local label. We use .gcc_except_table as we
+;# can't be bothered to produce syntactically valid .eh_frame contents
+;# and there's no option to turn off warning messages for invalid
+;# contents.
+
+ .text
+ .global _start
+_start:
+ .long fn
+ .long fn2
+
+ .section .gnu.linkonce.t.fn,"ax",@progbits
+ .weak fn
+ .type fn,@function
+fn:
+L:a:
+ .long 1
+ .long 2
+L:b:
+ .size fn,L:b-L:a
+
+ .section .gcc_except_table,"aw",@progbits
+ .long 2
+ .long L:a
+ .long L:b-L:a
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/y.s b/binutils-2.21/ld/testsuite/ld-mmix/y.s
new file mode 100644
index 0000000..1773d67
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/y.s
@@ -0,0 +1,33 @@
+;# Library file y.s has linkonce entries for fn and fn2. Note
+;# that this version of fn has different code, as if compiled
+;# with different optimization flags than the one in x.s (not
+;# important for this test, though). The reference from
+;# .gcc_except_table to the linkonce-excluded fn2 must be zero,
+;# or g++ EH will not work.
+
+ .section .gnu.linkonce.t.fn2,"ax",@progbits
+ .weak fn2
+ .type fn2,@function
+fn2:
+L:c:
+ .long 3
+L:d:
+ .size fn2,L:d-L:c
+
+ .section .gnu.linkonce.t.fn,"ax",@progbits
+ .weak fn
+ .type fn,@function
+fn:
+L:e:
+ .long 4
+L:f:
+ .size fn,L:f-L:e
+
+ .section .gcc_except_table,"aw",@progbits
+ .long 7
+ .long L:c
+ .long L:d-L:c
+
+ .long 0x6066
+ .long L:e
+ .long L:f-L:e
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/zeroeh.ld b/binutils-2.21/ld/testsuite/ld-mmix/zeroeh.ld
new file mode 100644
index 0000000..efdab4d
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/zeroeh.ld
@@ -0,0 +1,4 @@
+SECTIONS {
+ .text 0xa00 : { *(.text); *(.gnu.linkonce.t.*) }
+ .gcc_except_table 0x2000 : { *(.gcc_except_table) }
+}
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/zeroehelf.d b/binutils-2.21/ld/testsuite/ld-mmix/zeroehelf.d
new file mode 100644
index 0000000..7299234
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/zeroehelf.d
@@ -0,0 +1,17 @@
+#source: x.s
+#source: y.s
+#ld: -m elf64mmix -Ttext 0xa00 -T $srcdir/$subdir/zeroeh.ld
+#objdump: -s
+
+# The word at address 201c, for the linkonce-excluded section, must be zero.
+
+.*: file format elf64-mmix
+
+Contents of section \.text:
+ 0a00 00000a08 00000a10 00000001 00000002 .*
+ 0a10 00000003 .*
+Contents of section \.gcc_except_table:
+ 2000 00000002 00000a08 00000008 00000007 .*
+ 2010 00000a10 00000004 00006066 00000000 .*
+ 2020 00000004 .*
+#pass
diff --git a/binutils-2.21/ld/testsuite/ld-mmix/zeroehmmo.d b/binutils-2.21/ld/testsuite/ld-mmix/zeroehmmo.d
new file mode 100644
index 0000000..1b76532
--- /dev/null
+++ b/binutils-2.21/ld/testsuite/ld-mmix/zeroehmmo.d
@@ -0,0 +1,16 @@
+#source: x.s
+#source: y.s
+#ld: -m mmo -Ttext 0xa00 -T $srcdir/$subdir/zeroeh.ld
+#objdump: -s
+
+# The word at address 201c, for the linkonce-excluded section, must be zero.
+
+.*: file format mmo
+
+Contents of section \.text:
+ 0a00 00000a08 00000a10 00000001 00000002 .*
+ 0a10 00000003 .*
+Contents of section \.gcc_except_table:
+ 2000 00000002 00000a08 00000008 00000007 .*
+ 2010 00000a10 00000004 00006066 00000000 .*
+ 2020 00000004 .*