This is the mail archive of the gcc-patches@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]

Re: [PATCH] Support signbit, signbitf and signbitl as GCC builtins


On Thu, Feb 05, 2004 at 03:13:23AM +0100, Ulrich Weigand wrote:
> The first alternative allows you to access any *low* part of a register
> (e.g. (subreg:QI (reg:SI) 3) or (subreg:HI (reg:SI) 2)), while the second
> alternative allows you to access any word of a multi-word value.

Quite right.  Using subreg is *not* a substitute for an extraction.

If imode <= word_mode, and the signbit in imode is outside rmode,
you should use extract_bit_field on the imode version.

Indeed, it might be cleaner to just use extract_bit_field all the
time.  It does force the result to 0/1 in the case we actually
store the value, but... that's ok too.


r~


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