[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] add canonical address checks to HVM
>> Is there any guarantee that right-shift is signed when using gcc? > > I suppose so, I believe this is assumed to be that way in various other > places. > However, I'm not sure I have an idea where I could look up implementation > defined behavior for gcc. Looking into it a bit I think a compiler has to be consistent (i.e., it is implementation *defined*) and gcc makes reasonable effort to do signed shifts on architectures that have ISA support for it. I may add a boot-time BUG_ON() just as a sanity check. :-) > Sure, should work too, but would incur more overhead. I was actually trying > to even avoid the two shifts, but I wasn't able to find something that would > use just one *and* would be faster than the version I submitted. I don't think it's possible. Two shifts and a compare is pretty tight. -- Keir > > Jan > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxxxxxxxx > http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |