| To: | Jan Beulich <jbeulich@xxxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [Xen-devel] [PATCH] add canonical address checks to HVM |
| From: | Keir Fraser <keir@xxxxxxxxxxxxx> |
| Date: | 2006年12月01日 11:26:07 +0000 |
| Cc: | xen-devel@xxxxxxxxxxxxxxxxxxx |
| Delivery-date: | 2006年12月01日 03:26:20 -0800 |
| Envelope-to: | www-data@xxxxxxxxxxxxxxxxxx |
| In-reply-to: | <45701B9C.76E4.0078.0@xxxxxxxxxx> |
| List-help: | <mailto:xen-devel-request@lists.xensource.com?subject=help> |
| List-id: | Xen developer discussion <xen-devel.lists.xensource.com> |
| List-post: | <mailto:xen-devel@lists.xensource.com> |
| List-subscribe: | <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
| List-unsubscribe: | <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
| Sender: | xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
| Thread-index: | AccVO35TvSLPtoEuEduAwAAX8io7RQ== |
| Thread-topic: | [Xen-devel] [PATCH] add canonical address checks to HVM |
| User-agent: | Microsoft-Entourage/11.2.5.060620 |
>> 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
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Xen-devel] [PATCH] add canonical address checks to HVM , Jan Beulich |
|---|---|
| Next by Date: | Re: [Xen-devel] [RFC][PATCH] 1/3] [XEN] Use explicit bit sized fields for exported xentrace data. , Jimi Xenidis |
| Previous by Thread: | Re: [Xen-devel] [PATCH] add canonical address checks to HVM , Jan Beulich |
| Next by Thread: | Re: [Xen-devel] [PATCH] make shared_info architecture independent , Keir Fraser |
| Indexes: | [Date] [Thread] [Top] [All Lists] |