re: assembly was RE: [ILUG] Membership

From: Dave Airlie (airlied at domain csn.ul.ie)
Date: Wed 15 Aug 2001 - 15:34:34 IST


On Wed, 15 Aug 2001, jac1 wrote:

> On the subject of assembly code, why is linux's inline asm code so goddamn
> cryptic to follow? Is there an advantage to it? Microsoft's inline __asm {} is
> soooooo much easier to read + use.

What do you mean Linux users asm {} as well it's just in the kernel that
MACROs and "\n\t " stuff is in there... the \n\t stuff is useful if you
are actually using inline assembly and reading listing files.. it makes
stuff come out on different line numbers ... it's a bitch for reading
however..

Dave.

>
> James
>
>
> >===== Original Message From Padraig Brady <Padraig at domain AnteFacto.com> =====
> >Dave Airlie wrote:
> >> I've only one thing to say...
> >>
> >> branch delay slots ... *shudder*....
> >>
> >> in pseudo dave-assembly (a combination of C, VAX/MIPS/x86/ARM asms)
> >>
> >> mov 56, r1 # put 56 into r1
> >> br label # branch to label
> >> inc r1
> >> label: printf r1
> >>
> >> guess what r1 is at this stage? 56 taking bets? no it's 57... the increase
> >> instruction gets executed... it still makes my brain violently ill even 2
> >> or 3 years later (and I'm no longer active on Linux/MIPS)...
> >>
> >> Dave.
> >
> >?? So how do you program this ? Does this only happen with certain
> >registers?
> >
> >Padraig.
> >
> >
> >--
> >Irish Linux Users' Group: ilug at domain linux.ie
> >http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> >List maintainer: listmaster at domain linux.ie
>
>
>
>

-- 
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at domain skynet.ie
pam_smb / Linux DecStation / Linux VAX / ILUG person


This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:11:40 GMT