public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite] help req for scanning assembly output
@ 2004-07-05 13:13 Nitin Yewale
  0 siblings, 0 replies; only message in thread
From: Nitin Yewale @ 2004-07-05 13:13 UTC (permalink / raw)
  To: gcc-help

Hi,

	I am writing a dejagnu test case for following program.

***************************** test.c ***************************
/* { dg-do compile { target h8300-*-* } } */
/* { dg-options "-O3 -mh -mn " } */
int a;
__attribute__ ((interrupt_handler,saveall)) void foo()
{
	int b;
	a = 1 ;
	b = a++;
}
/* { dg-final { scan-assembler "er0\,\@-er7" } } */
****************************************************************

************************ASSEMBLY OUTPUT test.c*******************
	.h8300hn
	.section .text
	.align 1
	.global _foo
_foo:
	mov.l	er6,@-er7
	mov.w	r7,r6
	mov.l	er0,@-er7
	mov.l	er1,@-er7
	mov.l	er2,@-er7
	mov.l	er3,@-er7
	mov.l	er4,@-er7
	mov.l	er5,@-er7
	mov.w	#1,r2
	mov.w	r2,@_a
	mov.w	#_a,r3
	adds	#1,er2
	mov.w	r2,@er3
	subs	#1,er2
	mov.w	r2,r5
	mov.l	@er7+,er5
	mov.l	@er7+,er4
	mov.l	@er7+,er3
	mov.l	@er7+,er2
	mov.l	@er7+,er1
	mov.l	@er7+,er0
	mov.l	@er7+,er6
	rte
	.size	_foo, .-_foo
	.comm	_a,2,2
	.ident	"GCC: (GNU) 3.4-GNUH8_v0402"
	.end
****************************************************************
	I want to check whether generated assembly code contains pushes and pops all registers or not for interrupt service routine using Dejagnu framework. For e.g. "mov.l	er0,@-er7"
	
	To do so I am using "{dg-final {scan-assembler}}" TCL macro but not able to figure out the format for the same.

	Any help in these regards is appreciated.
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-05 13:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-05 13:13 [testsuite] help req for scanning assembly output Nitin Yewale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).