[Gloucs] Fw:[Taclug-General] Linux Inline Assembly in C and C++
Paul Robertson
gloucs at mailman.lug.org.uk
Sat Nov 2 18:15:00 2002
If you email me the original C code and the C code which contains the inline
asm I can probably help.
--
Paul
----- Original Message -----
From: <james.smith31@juno.com>
To: <gloucs@mailman.lug.org.uk>
Sent: Saturday, November 02, 2002 5:06 PM
Subject: [Gloucs] Fw:[Taclug-General] Linux Inline Assembly in C and C++
> ---------- Forwarded Message ----------
>
> From: james.smith31@juno.com
> To: taclug-general@taclug.org
> Subject: [Taclug-General] Inline Assembly in C and C++
> Date: Fri, 1 Nov 2002 19:48:48 GMT
>
> Hello,
>
> I'm trying to use inline assembly to speed up a routine in a program it
looks something like this:
>
> This inline assembly is inside a C loop:
> asm (
> "cmpb %1, %0 \n\t"
> "jl LOOPEND \n\t" /* defined somewhere else */
> "cmpb %2, %0 \n\t"
> "je LOOPEND \n\t"
> : :"g"(sbuff[dex]),
> "r"(buff[dex2]-range),
> "r"(buff[dex2]+range)
> );
>
> This does not give me the same results as the C code even when I change
aroud the conditions. Can someone tell whats is wrong? I think it is
something with the constraints.
>
>
> Thanks,
> James E. Smith
> E-mail: james.smith31@juno.com
> E-mail: code11smith007@aol.com
>
>
>
>
> ________________________________________________________________
> Sign Up for Juno Platinum Internet Access Today
> Only $9.95 per month!
> Visit www.juno.com
> _______________________________________________
> Taclug-General mailing list
> Taclug-General@taclug.org
> http://www.taclug.org/mailman/listinfo/taclug-general
>
>
>
>
>
> ________________________________________________________________
> Sign Up for Juno Platinum Internet Access Today
> Only $9.95 per month!
> Visit www.juno.com
>
> _______________________________________________
> gloucs mailing list
> gloucs@mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/gloucs