[Bug c/15823] optimise >>> style calculation

ajrobb at bigfoot dot com gcc-bugzilla@gcc.gnu.org
Thu Jun 24 08:48:00 GMT 2004


------- Additional Comments From ajrobb at bigfoot dot com  2004-06-24 08:39 -------
Subject: Re:  optimise >>> style calculation

Thanks for getting back to me,
I am not looking for Java's i>>n rather i>>>n (e.g. x86 SAR assembler)
I want to duplicate the most significant bit into the next n most significant 
bits. However, I want to avoid assembler and use a C code fragment that 
compiles to a single SAR instruction on an x86.

Regards,
Andy Robb.

On Friday 04 June 2004 17:48, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-04
> 16:48 ------- i & ~3 still can be postive.  So you still have to do the
> sign check, if you want te equivalent of Java's i >> n the do ((unsigned
> int)i) >> n.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15823



More information about the Gcc-bugs mailing list