2010-03-25 14:06:36     how ashift with gcc inline assembly ?

Document created by Aaronwu Employee on Sep 26, 2013
Version 1Show Document
  • View in full screen mode

2010-03-25 14:06:36     how ashift with gcc inline assembly ?

Julien Vermillard (FRANCE)

Message: 87697   

 

Look like gas dislike usage of "ashift .. by .."

 

 

 

I tried :

 

static inline celt_int32 VSHR32(celt_int32 a, celt_int32 b) {

   int res;

   __asm__  (

       "%0 = ashift %1 by %2 ;\n\t"

   : "=d" (res)

   : "d" (a), "d" (b)

   : "A1");

   return res;

}

 

 

It's producing

 

/tmp/ccg5ttqp.s:344: ERREUR: syntax error. Input text was R1.

/tmp/ccg5ttqp.s:344: ERREUR:

 

 

Any idea ?

QuoteReplyEditDelete

 

 

2010-03-25 14:13:44     Re: how ashift with gcc inline assembly ?

Mike Frysinger (UNITED STATES)

Message: 87698   

 

please read the PRM.  ashift with all 32bit dregs is not a valid instruction.

QuoteReplyEditDelete

 

 

2010-03-26 05:22:38     Re: how ashift with gcc inline assembly ?

Julien Vermillard (FRANCE)

Message: 87734   

 

Thanks I fixed it.

Attachments

    Outcomes