This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: replacing assembly for C code


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]