[ASM] [PowerPC] floating-point registers mnemonics

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

 



Good afternoon,
This is my first post here, so feel free to make any kind of remarks :)
I've been trying to use a temporary floating-point register in inline asm,
but nothing seems to work.
On the code below, I'm storing the result of the product in a temporary
variable (fra).

inline void MTH_Vec3Scale(register MTH_tt_Vector3 *D,register const
MTH_tt_Vector3 *A, register f32 f)
{
    register       f32  fra;
    asm     (       "lfs   %3,   0(%0)              \n"        // FRA <- *A
                    "\t    fmul   %3,   %3,     %2  \n"       // FRT <- FRA
* FRC
                    "\t    stfs   %3,   0(%1)       \n"         // *dest =
FRT

                    "\t    lfs    %3,   4(%0)       \n"      
                    "\t    fmul   %3,   %3,     %2  \n"        
                    "\t    stfs   %3,   4(%1)       \n"        

                    "\t    lfs    %3,   8(%0)       \n"       
                    "\t    fmul   %3,   %3,     %2  \n"        
                    "\t    stfs   %3,   8(%1)       \n"        
        /* outputs: */ :
        /* inputs : */ :"b"(A),"b"(D),"f"(f),"f"(fra)
        /* clobbers:*/ :"memory");
}

What I would like to do is to use a floating-point register directly, f11
for instance, to store the results:
lfs   %3,   0(%0)        
would be come
lfs    f11,  0(%0)
for instance.
I would add "f11" to the list of clobber registers.  But it won't let me,
complaining that "f11" is unknown register. "fr11" doesn't work either. I
have given it many tries ...

If anyone had some more documentation about PowerPC 's asm with gcc I'd love
to hear about it.

Thanks!

But every time I do that, I end up with the error : "unknown register f11"
-- 
View this message in context: http://old.nabble.com/-ASM---PowerPC--floating-point-registers-mnemonics-tp30671952p30671952.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux