2014-09-12 22:14:23 +00:00
|
|
|
if { ! [istarget nios2-*-*] } {
|
2017-04-10 11:32:00 +00:00
|
|
|
return
|
2014-09-12 22:14:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.d]] {
|
|
|
|
run_dump_test [file rootname $test]
|
|
|
|
}
|
2017-04-10 11:32:00 +00:00
|
|
|
|
|
|
|
global link_output
|
|
|
|
global ld
|
|
|
|
|
|
|
|
set test_name "NIOS2 Mixed R1 and R2 objects"
|
|
|
|
set test mixed1
|
|
|
|
|
|
|
|
if ![ld_assemble $as "-march=r1 $srcdir/$subdir/${test}a.s" tmpdir/${test}a.o] {
|
|
|
|
unresolved "Build mixed1a.o"
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
if ![ld_assemble $as "-march=r2 $srcdir/$subdir/${test}b.s" tmpdir/${test}b.o] {
|
|
|
|
unresolved "Build mixed1b.o"
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
if { ![ld_simple_link $ld tmpdir/$test "tmpdir/${test}a.o tmpdir/${test}b.o"] } {
|
|
|
|
if [string match "*architecture * is incompatible*" $link_output] {
|
|
|
|
pass "$test_name"
|
|
|
|
} {
|
|
|
|
fail "$test_name"
|
|
|
|
}
|
|
|
|
}
|