This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: replacing assembly for C code
- To: sanjivg at noida dot hcltech dot com (Sanjiv Kumar Gupta)
- Subject: Re: replacing assembly for C code
- From: Joern Rennecke <amylaar at onetel dot net dot uk>
- Date: Tue, 23 Oct 2001 20:38:08 +0100 (BST)
- Cc: gcc at gcc dot gnu dot org ('gcc at gcc dot gnu dot org')
> compile. My code does not work. Which is
> /* file .c */
>
> /*
> Sp -- ;
> sp[0].t.vaddr = 0;
> */
>
> __asm__ volatile (" mov.w .L4222,r7
> add r14,r7
> mov.l @(36,r7),r0
> add #-8,r0
> mov.l r0,@(36,r7)
> mov #0,r1
> mov.w .L4223,r2
> add r14,r2
> mov.l @r2,r2
> mov.l r1,@r2"
> );
Of course that doesn't work. Please read the manual section on extended asm,
in particular about operands and clobber descriptions.
--
Joern Rennecke | gcc expert for hire
amylaar@onetel.net.uk | send enquiries to: jwr_jobs@onetel.net.uk