[testsuite] Test case to check "#pragma interrupt" compiler directive for SH and H8/300 targets

Nitin Yewale NitinY@KPITCummins.com
Tue Jul 20 19:49:00 GMT 2004


Hi,
	Please find attached test case which will check "#pragma interrupt" compiler directive
i.e. code generation of multiple ISRs with optimization option "O3" for H8/300 and SH targets.

==========================================================================
testsuite/Changelog

2004-07-20  Nitin Yewale <nitiny@kpitcummins.com>

	  * gcc.dg/pragma-isr.c : New test source file
==========================================================================
--- /dev/null	2002-08-31 05:01:37.000000000 +0530
+++ gcc-3.5-20040627/gcc/testsuite/gcc.dg/pragma-isr.c	2004-07-20 16:09:00.000000000 +0530
@@ -0,0 +1,17 @@
+/* { dg-do compile { target h8300-*-* sh-*-*} } */
+/* { dg-options "-O3" } */
+/* Test case will check whether rte is generated for two ISRs*/
+extern void foo();
+#pragma interrupt
+void  isr1(void)
+{
+		foo();
+}
+
+#pragma interrupt
+void  isr2(void)
+{
+		foo();
+}
+
+/* { dg-final { scan-assembler-times "rte" 2} } */
==========================================================================
Regards,
Nitin Yewale,
KPIT Cummins InfoSystems Ltd.
Pune, India

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNU based tool-chains for Renesas' SH and H8 Series.
The following site also offers free technical support to its users. 
Visit http://www.kpitgnutools.com for details. 
Latest versions of KPIT GNU tools were released on June 1, 2004.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 



More information about the Gcc-patches mailing list