[coyotos-dev] l2g shift
Jonathan S. Shapiro
shap at eros-os.com
Sat Jul 21 23:26:08 EDT 2007
Actually, it turns out not to be true on many architectures.
In practice, our kernel does not use the C << or >> operators. We
introduced wrapper functions around them that test for this bounds
issue. Specifically, the wrapper function ensures (x << 64) => 0 for any
x.
On Fri, 2007-07-20 at 21:27 -0700, Charles Landau wrote:
> Footnote 2 of the Coyotos Microkernel Specification suggests you are assuming:
>
> ((uint64_t) 0 << 64) == 0
>
> That is true, as you say, "on most architectures", however the
> definition of C is that the result of the shift is simply undefined.
> _______________________________________________
> coyotos-dev mailing list
> coyotos-dev at smtp.coyotos.org
> http://www.coyotos.org/mailman/listinfo/coyotos-dev
More information about the coyotos-dev
mailing list