This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[testsuite] Test case to check "#pragma interrupt" compiler directive for SH and H8/300 targets
- From: "Nitin Yewale" <NitinY at KPITCummins dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 Jul 2004 19:16:47 +0530
- Subject: [testsuite] Test case to check "#pragma interrupt" compiler directive for SH and H8/300 targets
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~