#
# D30V assembler tests
#

proc run_list_test { name opts } {
  global srcdir subdir
  set testname "D30V $name"
  set file $srcdir/$subdir/$name
  gas_run ${name}.s $opts ">&dump.out"
  if {[regexp_diff "dump.out" "${file}.l"] } {
    fail $testname
    verbose "output is [file_contents "dump.out"]" 2
    return
  }
  pass $testname
}

if {[istarget d30v-*-*]} {
  run_dump_test "inst"
  run_dump_test "align"
  run_dump_test "guard"
  run_dump_test "guard-debug"
  run_dump_test "reloc"
  run_dump_test "opt"
  run_dump_test "array"
  run_dump_test "label"
  run_list_test "warn_oddreg" "-al"
  run_list_test "bittest" "-al"
  run_dump_test "bittest"
  run_list_test "serial" "-al"
  run_list_test "serial2" "-al"
  run_list_test "serial2O" "-al -O"
  run_dump_test "mul"
}

