1 # Copyright (C) 2012-2016 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
18 # Test x930509a -- correct assembly of differences involving forward
21 proc do_930509a_tic4x {} {
22 set testname "difference between forward references (tic4x version)"
24 gas_start "../all/x930509.s" "-al"
26 # We need to accommodate both byte orders here.
27 # If ".long" means an 8-byte value on some target someday, this test will have
30 -re "^ +1 .... 00 ?00 ?00 ?00" { fail $testname; set x 1 }
31 -re "^ +1 .... 01 ?00 ?00 ?00" { pass $testname; set x 1 }
32 -re "^ +1 .... 00 ?00 ?00 ?01" { pass $testname; set x 1 }
34 timeout { perror "timeout\n"; break }
39 if !$x then { fail $testname }
46 if [istarget *c4x*-*-*] then {
49 # Test zero-based disassemble test
52 # Test the register names on the c3x and on the c4x
53 run_dump_test "registers_c3x"
54 run_dump_test "registers_c4x"
56 # Make sure the c4x registers don't work on c3x
57 gas_test_error "registers.s" "-m30 --defsym TEST_C4X=1" "c4x register usage in c3x"
65 # Test all addressing modes
66 run_dump_test "addressing_c3x"
67 run_dump_test "addressing_c4x"
69 # Make sure the c4x addressing don't work on c3x
70 gas_test_error "addressing.s" "-m30 --defsym TEST_C4X=1" "c4x addressing usage in c3x"
72 # Test float instructions
73 run_dump_test "opcodes_c3x"
74 run_dump_test "opcodes_c4x"
75 run_dump_test "opcodes_new"
77 # Make sure the c4x ops don't work on c3x
78 #gas_test_error "opcodes.s" "-m30 --defsym TEST_C4X=1" "c4x instruction usage in c3x"
79 # -- for some reason this test crashes dejagnu, hence disabled!