aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1995-04-08 23:09:56 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1995-04-08 23:09:56 +0000
commit04b8d170c197ab34052c2f47085e068a52a66478 (patch)
tree4712e5ad026779421f087f2ce0f753b02d20ffb4 /gas
parent32b1930be2f6854dad41c58d2d44939c6c26149b (diff)
downloadgdb-04b8d170c197ab34052c2f47085e068a52a66478.zip
gdb-04b8d170c197ab34052c2f47085e068a52a66478.tar.gz
gdb-04b8d170c197ab34052c2f47085e068a52a66478.tar.bz2
More tests.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/arc/arc.exp34
1 files changed, 21 insertions, 13 deletions
diff --git a/gas/testsuite/gas/arc/arc.exp b/gas/testsuite/gas/arc/arc.exp
index 8fcb87f..f8a5a5f 100644
--- a/gas/testsuite/gas/arc/arc.exp
+++ b/gas/testsuite/gas/arc/arc.exp
@@ -30,10 +30,17 @@ proc test_template_insn { tmpl opcode icode } {
#send_user "$line\n"
if [string match "*@IC+?@*" $line] {
# Insert the opcode. It occupies the top 5 bits.
- regexp "^(.*)@(IC\\+)(.)@(.*)$" $line junk leftpart icodepart n rightpart
+ regexp "^(.*)@IC\\+(.)@(.*)$" $line junk leftpart n rightpart
set n [expr ($icode << 3) + $n]
set n [format "%02x" $n]
puts $out_fd "$leftpart$n$rightpart"
+ } elseif [string match "*@I3+??@*" $line] {
+ # Insert insn 3 code (register C field)
+ # b15=8/0, b8=1/0 (their respective hex values in the objdump)
+ regexp "^(.*)@I3\\+(.)(.)@(.*)$" $line junk leftpart b15 b8 rightpart
+ set n [expr ($icode << 1) + ($b15 << 4) + ($b8 << 0)]
+ set n [format "%02x" $n]
+ puts $out_fd "$leftpart$n$rightpart"
} else {
puts $out_fd $line
}
@@ -60,25 +67,26 @@ if [istarget arc*-*-*] then {
test_template_insn math sub 10
test_template_insn math xor 15
-# test_shift "asl" 8
-# test_shift "asr" 3
-# test_shift "lsl" 8
-# test_shift "lsr" 3
-# test_shift "ror" 3
-# test_shift "rrc" 3
+ test_template_insn alias mov 12
+ test_template_insn alias rlc 9
+ test_template_insn alias asl 8
+# `lsl' gets dumped as `asl' so this must be tested elsewhere.
+# test_template_insn alias lsl 8
-# test_branch "b" 4
-# test_branch "bl" 5
-# test_branch "lp" 5
+ test_template_insn sshift asr 1
+ test_template_insn sshift lsr 2
+ test_template_insn sshift ror 3
+ test_template_insn sshift rrc 4
+
+ test_template_insn branch b 4
+ test_template_insn branch bl 5
+ test_template_insn branch lp 6
run_dump_test "j"
# test_special "ext" 3
# test_special "sex" 3
-# test_macro "mov" 12
-# test_macro "rlc" 9
-
run_dump_test "flag"
# run_dump_test "ld"
# run_dump_test "lr"