This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]