# just checks that exit status is zero
#
-set testdir $srcdir/gas
-
-#
-# Test empty file, and version number
-#
-#gas_test_stdout "" "GNU assembler version .* (.*)"
+gas_init
#
# Target-independent tests
#
# Some m68k-coff tests
#
-if [istarget m68k-*-coff] then {
- #
- # Local branch in non-text section
- #
+if [istarget m68*-*-coff] then {
gas_test "$testdir/p2430.s" "local branch not in text section"
+ gas_test "$testdir/t1.s" "multiple .file directives"
+
+ gas_test "$testdir/p2389.s" "bss fill"
+}
+
+#
+# Some generic m68k tests
+#
+if [string match m68* $target_cpu] then {
#
- # Multiple (implicit) .file directives
+ # Operand size dependent on offset computed using operand size
#
- gas_test "$testdir/t1.s" "multiple .file directives"
+ if [file exists "$testdir/p2425a.s"] then {
+ gas_test "$testdir/p2425a.s" "PR 2425"
+ }
+}
+
+#
+# Solaris-2 on SPARC tests
+#
+# The two compilers, cc and gcc, generate quite different debugging
+# records. Verify that we can accept both.
+#
+if [istarget sparc-*-solaris2*] then {
+ gas_test "sol-cc.s" "SPARC Solaris cc -g"
+ gas_test "sol-gcc.s" "SPARC Solaris gcc -g"
}
--- /dev/null
+ .section ".text" ! [internal]
+ .proc 4
+ .global main
+ .align 4
+ .global main
+main:
+!#PROLOGUE# 0
+!#PROLOGUE# 1
+ save %sp,-96,%sp
+ sethi %hi(.L18),%o0
+ sethi %hi(msg),%o1
+ or %o1,%lo(msg),%o1 ! [internal]
+ call printf,2
+ or %o0,%lo(.L18),%o0 ! [internal]
+ ret
+ restore %g0,0,%o0
+ .type main,#function
+ .size main,(.-main)
+ .section ".data" ! [internal]
+ .align 4
+Ddata.data:
+ .section ".bss" ! [internal]
+Bbss.bss:
+ .section ".rodata" ! [internal]
+Drodata.rodata:
+ .file "hi-sol.c"
+ .global msg
+ .global msg
+msg:
+ .ascii "hello, world!\0"
+ .type msg,#object
+ .size msg,14
+ .section ".data1", #write, #alloc ! [internal]
+ .align 4
+.L18:
+ .ascii "%s\n\0"
+ .ident "acomp: (CDS) SPARCompilers 2.0.1 03 Sep 1992"
+ .section "text" ! [internal]
+ .stabs "/cygint/s1/users/raeburn/",100,0,0,0
+ .stabs "hi-sol.c",100,0,3,0
+ .stabs "",56,0,0,0
+ .stabs "",56,0,0,0
+ .stabs "Xt ; g ; O ; V=2.0",60,0,0,0x2bb773ba
+ .stabs "char:t(0,1)=bsc1;0;8;",128,0,0,0
+ .stabs "short:t(0,2)=bs2;0;16;",128,0,0,0
+ .stabs "int:t(0,3)=bs4;0;32;",128,0,0,0
+ .stabs "long:t(0,4)=bs4;0;32;",128,0,0,0
+ .stabs "long long:t(0,5)=bs8;0;64;",128,0,0,0
+ .stabs "signed char:t(0,6)=bsc1;0;8;",128,0,0,0
+ .stabs "signed short:t(0,7)=bs2;0;16;",128,0,0,0
+ .stabs "signed int:t(0,8)=bs4;0;32;",128,0,0,0
+ .stabs "signed long:t(0,9)=bs4;0;32;",128,0,0,0
+ .stabs "signed long long:t(0,10)=bs8;0;64;",128,0,0,0
+ .stabs "unsigned char:t(0,11)=buc1;0;8;",128,0,0,0
+ .stabs "unsigned short:t(0,12)=bu2;0;16;",128,0,0,0
+ .stabs "unsigned int:t(0,13)=bu4;0;32;",128,0,0,0
+ .stabs "unsigned long:t(0,14)=bu4;0;32;",128,0,0,0
+ .stabs "unsigned long long:t(0,15)=bu8;0;64;",128,0,0,0
+ .stabs "float:t(0,16)=R1;4;",128,0,0,0
+ .stabs "double:t(0,17)=R2;8;",128,0,0,0
+ .stabs "long double:t(0,18)=R6;16;",128,0,0,0
+ .stabs "void:t(0,19)=bs0;0;0",128,0,0,0
+ .stabs "msg:G(0,20)=ar(0,3);0;13;(0,1)",32,0,14,0
+ .stabs "main:F(0,3);(0,3);(0,21)=*(0,22)=*(0,1)",36,0,0,main
+ .stabs "main",42,0,0,0
+ .stabn 192,0,1,0
+ .stabn 68,0,4,0
+ .stabs "argc:p(0,3)",160,0,4,68
+ .stabs "argv:p(0,21)",160,0,4,72
+ .stabs "printf:P(0,3)",36,0,0,0
+ .stabn 224,0,1,0
+ .stabs "",98,0,0,0
+ .section "text" ! [internal]
+ .xstabs ".stab.index","/cygint/s1/users/raeburn/",100,0,0,0
+ .xstabs ".stab.index","hi-sol.c",100,0,3,0
+ .xstabs ".stab.index","",56,0,0,0
+ .xstabs ".stab.index","",56,0,0,0
+ .xstabs ".stab.index","Xt ; g ; O ; V=2.0",60,0,0,0x2bb773ba
+ .xstabs ".stab.index","msg",32,0,0,0
+ .xstabs ".stab.index","main",42,0,0,0
+ .xstabs ".stab.index","main",36,0,0,0
--- /dev/null
+ .file "hi-sol.c"
+.stabs "/1h/devo/src/gas/testsuite/gas/",100,0,0,.LLtext0
+.stabs "hi-sol.c",100,0,0,.LLtext0
+.section ".text"
+.LLtext0:
+ .stabs "gcc2_compiled.", 0x3c, 0, 0, 0
+.stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0
+.stabs "char:t2=r2;0;127;",128,0,0,0
+.stabs "long int:t3=r1;-2147483648;2147483647;",128,0,0,0
+.stabs "unsigned int:t4=r1;0;-1;",128,0,0,0
+.stabs "long unsigned int:t5=r1;0;-1;",128,0,0,0
+.stabs "short int:t6=r1;-32768;32767;",128,0,0,0
+.stabs "long long int:t7=r1;0;-1;",128,0,0,0
+.stabs "short unsigned int:t8=r1;0;65535;",128,0,0,0
+.stabs "long long unsigned int:t9=r1;0;-1;",128,0,0,0
+.stabs "signed char:t10=r1;-128;127;",128,0,0,0
+.stabs "unsigned char:t11=r1;0;255;",128,0,0,0
+.stabs "float:t12=r1;4;0;",128,0,0,0
+.stabs "double:t13=r1;8;0;",128,0,0,0
+.stabs "long double:t14=r1;8;0;",128,0,0,0
+.stabs "void:t15=15",128,0,0,0
+.stabs "msg:G16=ar1;0;13;2",32,0,0,0
+ .global msg
+.section ".rodata"
+ .align 8
+ .type msg,#object
+ .size msg,14
+msg:
+ .asciz "hello, world!"
+ .align 8
+.LLC0:
+ .asciz "%s\n"
+.section ".text"
+ .align 4
+.stabs "main:F1",36,0,0,main
+.stabs "argc:P1",64,0,0,24
+.stabs "argv:P17=*18=*2",64,0,0,25
+ .global main
+ .type main,#function
+ .proc 04
+main:
+.stabn 68,0,4,.LM1-main
+.LM1:
+ !#PROLOGUE# 0
+ save %sp,-112,%sp
+ !#PROLOGUE# 1
+.stabn 68,0,5,.LM2-main
+.LM2:
+.LLBB2:
+ sethi %hi(.LLC0),%o0
+ or %o0,%lo(.LLC0),%o0
+ sethi %hi(msg),%o1
+ call printf,0
+ or %o1,%lo(msg),%o1
+.stabn 68,0,6,.LM3-main
+.LM3:
+.stabn 68,0,7,.LM4-main
+.LM4:
+.LLBE2:
+ ret
+ restore %g0,0,%o0
+.LLfe1:
+ .size main,.LLfe1-main
+.stabn 192,0,0,.LLBB2-main
+.stabn 224,0,0,.LLBE2-main
+ .ident "GCC: (GNU) cygnus-2.3.3"