[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Should we revert "mm: New XENMEM space, XENMAPSPACE_gmfn_range"?
On 02/08/12 11:35, Attilio Rao wrote: On 02/08/12 11:22, Jan Beulich wrote:On 02.08.12 at 11:45, Attilio Rao<attilio.rao@xxxxxxxxxx> wrote:On 02/08/12 10:23, Jan Beulich wrote:On 01.08.12 at 19:55, Stefano Stabellini<stefano.stabellini@xxxxxxxxxxxxx>wrote:I was reading more about this commit because this patch breaks the ABI on ARM, when I realized that on x86 there is no standard that specifies the alignment of fields in a struct.There is - the psABI supplements to the SVR4 ABI.This is a completely different issue. The problem here gcc/whatever compiler padding added to the struct in order to have alignment of the members to the word boundry. The difference is that this is not enforced in the ARM case (apparently, from Stefano's report) while it happens in the x86 case. This is why it is a good rule to organize member of a struct from the bigger to the smaller when compiling with gcc and this is not the case of the struct in question. In the end it is a compiler decisional thing, not something decided by the ABI.No, definitely not. Otherwise inter-operation between code compiled with different compilers would be impossible. To allow this is what the various ABI specifications exist for (and their absence had, e.g. on DOS, lead to a complete mess).Look, I'm speaking about the problem Stefano is trying to crunch which has nothing to do with your discussion on ABI.As to the ARM issue - mind pointing out where mis-aligned structure fields are specified as being the standard?I think that alignment is important, infact I'm more surprised to the ARM side than the x86. Of course, because this is a compiler-dependent behaviour (the fact that not only gcc does that doesn't mean it is "standardized", just like it is not standardized anywhere that stack on x86 must be word aligned, even if it is so common that it is taken for granted now). It seems that I was missing something -- the x86 psABI explicitly mention about the structures padding for the internal members of structures and unions (Chapter 3, Paragraph 3.1.2, subsection "Aggregates and Unions"), so this behaviour really cames from the SVR4, as Jan pointed out. Attilio _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |