Re: inline asm in gcc 2.95.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 20 Jun 2002, mohan kumar wrote:

> hi,
> iam using some c++ code in kernel module and am using
> gcc 2.95.3. My code compiles under gcc 2.91.66 but
> complaines in the newer version. the code that poses
> the problem is
>
> #define __flush_tlb()
> do {
> unsigned int tmpreg; \
> __asm__ __volatile__( \
> "movl %%cr3, %0;  # flush TLB \n" \
> "movl %0, %%cr3;              \n" \
> : "=r" (tmpreg) \
> :: "memory"); \
> } while (0)
>
>
> The : and :: used in the inline assembly pose the
> problem. it also happens in couple of other places.
> how can i solve this problem. iam not versed in inline
> assembly and this problem frustates me. also can some
> one point me where to find some docs about inline
> assembly for gcc?

I don't know how to fix your code; it may be that you will need to compile
it in C rather than C++ to make it work.  But I can tell you where inline
assembly for gcc is documented: in the info files.  Try doing "info gcc",
and navigate through the C Extensions section to the Extended Asm node.

Alan Stern

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux