Testsuite fixes to enable coroutine linking.
This patch allows the remaining coroutine regression tests to link with the new dynamic module ctors and new scaffold mechanism. 2022-06-27 Gaius Mulley <gaius.mulley@southwales.ac.uk> gcc/testsuite/gm2/ChangeLog: * coroutines/pim/run/pass/coroutines-pim-run-pass.exp (gm2_link_with) Assigned to "-lm2cor -lm2pim -lm2iso". * iso/run/pass/iso-run-pass.exp: Avoid linking the library module. * isocoroutines/run/pass/coroutine.mod (main): Renamed mainc. * isocoroutines/run/pass/isocoroutines-run-pass.exp (gm2_init_pim): Configure with -fscaffold-main -fno-scaffold-dynamic. * link/externalscaffold/pass/scaffold.c (_M2_SYSTEM_finish): Renamed _M2_SYSTEM_fini. (_M2_M2RTS_finish) Renamed _M2_M2RTS_fini. (_M2_RTExceptions_finish) Renamed _M2_RTExceptions_fini. (_M2_hello_finish) Renamed _M2_hello_fini. * pim/options/optimize/run/pass/pim-options-optimize-run-pass.exp (gm2_link_with): Assigned to addition.o. * pim/run/pass/pim-run-pass.exp (gm2_link_with): Assigned to sys.o. Avoid linking sys.mod. * pimcoroutines/run/pass/pimcoroutines-run-pass.exp (gm2_link_with): Assigned to "-lm2cor -lm2pim -lm2iso". * switches/check-all/run/fail/switches-check-all-run-fail.exp (gm2_link_with): Assigned to rangesupport.o. Signed-off-by: Gaius Mulley <gaius.mulley@southwales.ac.uk>
This commit is contained in:
parent
41ba3226a8
commit
3a560fb4fa
@ -28,7 +28,7 @@ load_lib gm2-torture.exp
|
||||
set gm2src ${srcdir}/../gm2
|
||||
|
||||
gm2_init_cor
|
||||
gm2_link_with "-lm2cor"
|
||||
gm2_link_with "-lm2cor -lm2pim -lm2iso"
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
@ -33,6 +33,8 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
continue
|
||||
}
|
||||
|
||||
gm2_target_compile $srcdir/$subdir/fileio.mod fileio.o object "-g"
|
||||
gm2-torture-execute $testcase "" "pass"
|
||||
if { $testcase != "$srcdir/$subdir/fileio.mod" } {
|
||||
gm2_target_compile $srcdir/$subdir/fileio.mod fileio.o object "-g"
|
||||
gm2-torture-execute $testcase "" "pass"
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ BEGIN
|
||||
IF x=1000
|
||||
THEN
|
||||
printf ("finished!\n") ;
|
||||
TRANSFER (c1, main)
|
||||
TRANSFER (c1, mainc)
|
||||
ELSE
|
||||
TRANSFER (c1, c2)
|
||||
END ;
|
||||
@ -56,7 +56,7 @@ END second ;
|
||||
|
||||
|
||||
VAR
|
||||
main,
|
||||
mainc,
|
||||
c1, c2: COROUTINE ;
|
||||
w1, w2: ADDRESS ;
|
||||
BEGIN
|
||||
@ -65,6 +65,6 @@ BEGIN
|
||||
ALLOCATE (w2, Workspace) ;
|
||||
NEWCOROUTINE (second, w2, Workspace, c2) ;
|
||||
printf ("first context switch to c1\n") ;
|
||||
TRANSFER (main, c1) ;
|
||||
printf ("back to main and all done\n\n")
|
||||
TRANSFER (mainc, c1) ;
|
||||
printf ("back to mainc and all done\n\n")
|
||||
END coroutine.
|
||||
|
@ -27,7 +27,6 @@ load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_iso "${srcdir}/gm2/iso/run/pass"
|
||||
|
||||
gm2_link_with "-lpthread"
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
@ -25,7 +25,7 @@ if $tracelevel then {
|
||||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_pim "${srcdir}/gm2/pim/pass"
|
||||
gm2_init_pim "${srcdir}/gm2/pim/pass" -fscaffold-main -fno-scaffold-dynamic
|
||||
gm2_link_with scaffold.o
|
||||
set output [target_compile $srcdir/$subdir/scaffold.c scaffold.o object "-g"]
|
||||
|
||||
|
@ -1,37 +1,37 @@
|
||||
extern void exit (int);
|
||||
|
||||
extern void _M2_SYSTEM_init (int argc, char *argv[]);
|
||||
extern void _M2_SYSTEM_finish (void);
|
||||
extern void _M2_SYSTEM_fini (void);
|
||||
extern void _M2_M2RTS_init (int argc, char *argv[]);
|
||||
extern void _M2_M2RTS_finish (void);
|
||||
extern void _M2_M2RTS_fini (void);
|
||||
extern void _M2_RTExceptions_init (int argc, char *argv[]);
|
||||
extern void _M2_RTExceptions_finish (void);
|
||||
extern void _M2_RTExceptions_fini (void);
|
||||
extern void _M2_hello_init (int argc, char *argv[]);
|
||||
extern void _M2_hello_finish (void);
|
||||
extern void _M2_hello_fini (void);
|
||||
|
||||
extern void M2RTS_Terminate (void);
|
||||
|
||||
static void init (int argc, char *argv[])
|
||||
{
|
||||
_M2_SYSTEM_init (argc, argv);
|
||||
_M2_M2RTS_init (argc, argv);
|
||||
_M2_RTExceptions_init (argc, argv);
|
||||
_M2_hello_init (argc, argv);
|
||||
_M2_SYSTEM_init (argc, argv);
|
||||
_M2_M2RTS_init (argc, argv);
|
||||
_M2_RTExceptions_init (argc, argv);
|
||||
_M2_hello_init (argc, argv);
|
||||
}
|
||||
|
||||
static void finish (void)
|
||||
{
|
||||
M2RTS_Terminate ();
|
||||
_M2_hello_finish ();
|
||||
_M2_RTExceptions_finish ();
|
||||
_M2_M2RTS_finish ();
|
||||
_M2_SYSTEM_finish ();
|
||||
exit (0);
|
||||
M2RTS_Terminate ();
|
||||
_M2_hello_fini ();
|
||||
_M2_RTExceptions_fini ();
|
||||
_M2_M2RTS_fini ();
|
||||
_M2_SYSTEM_fini ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
init (argc, argv);
|
||||
finish ();
|
||||
return (0);
|
||||
init (argc, argv);
|
||||
finish ();
|
||||
return (0);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ proc gm2_target_compile_options_optimize { source dest type options } {
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_pim "${srcdir}/gm2/pim/options/optimize/run/pass"
|
||||
# gm2_link_with "-lm2pim -lm2iso -lpthread"
|
||||
gm2_link_with "addition.o"
|
||||
|
||||
#
|
||||
# compile library file
|
||||
|
@ -27,8 +27,7 @@ load_lib gm2-torture.exp
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_pim "${srcdir}/gm2/pim/run/pass"
|
||||
gm2_link_with "-lm2pim -lm2iso -lpthread"
|
||||
|
||||
gm2_link_with sys.o
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
set output [gm2_target_compile $srcdir/$subdir/sys.mod sys.o object "-g -I$srcdir/../m2/gm2-libs -I$srcdir/$subdir -I$srcdir/../m2/gm2-compiler -I../m2/gm2-libs -I../m2/gm2-compiler -fpim"]
|
||||
@ -38,5 +37,7 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
continue
|
||||
}
|
||||
|
||||
gm2-torture-execute $testcase "" "pass"
|
||||
if { $testcase != "$srcdir/$subdir/sys.mod" } {
|
||||
gm2-torture-execute $testcase "" "pass"
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,8 @@ load_lib gm2-torture.exp
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_cor "${srcdir}/gm2/pim/run/pass"
|
||||
gm2_link_with "-lm2cor"
|
||||
# gm2_link_with "-flibs=cor,pim,iso"
|
||||
gm2_link_with "-lm2cor -lm2pim -lm2iso"
|
||||
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
@ -38,5 +39,7 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
continue
|
||||
}
|
||||
|
||||
gm2-torture-execute $testcase "" "pass"
|
||||
if { $testcase != "$srcdir/$subdir/sys.mod" } {
|
||||
gm2-torture-execute $testcase "" "pass"
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ gm2_init_pim "${srcdir}/gm2/switches/check-all/run/fail" -fsoft-check-all -fno-m
|
||||
#
|
||||
|
||||
gm2_target_compile $srcdir/$subdir/rangesupport.mod rangesupport.o object "-g -I$srcdir/$subdir/"
|
||||
gm2_link_with rangesupport.o
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
Loading…
Reference in New Issue
Block a user