On 03/05/13 00:34, Jordan Justen wrote:
> On Mon, Mar 4, 2013 at 3:19 PM, Laszlo Ersek <[email protected]> wrote:

>> I think the current macros are suboptimal, but without reviewing each
>> use I wouldn't dare touch them. (And of course there are the proprietary
>> trees we can't even grep.)
> 
> But, for the same reason you are concerned with:
>   (UINT16) ~0x3c00
> You'd be concerned with:
>   (UINT16) ~(BIT13|BIT12|BIT11|BIT10)

Yes.

> But, it seems to me that this exactly the use case for the BIT*
> macros. 

Yes.

> So, are they broken?

As far as I've seen, they haven't caused problems in practice. The
expression

  (UINT16) ~(BIT13|BIT12|BIT11|BIT10)

is correct as well in practice, for our current purpose.

It's just that ~(BIT13|BIT12|BIT11|BIT10) being negative (even though
well-defined on our C platform) makes me frown, especially because it's
inconsistent with ~BIT31.

  INT64 x = ~BIT30;
  INT64 y = ~BIT31;

"x" is negative, "y" is positive.

Laszlo

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to