mirror of https://gitee.com/openkylin/qemu.git
target/i386: Clarify the padding requirements of X86XSaveArea
Replace the hard-coded size of offsets or structure elements with defined constants or sizeof(). Signed-off-by: David Edmondson <david.edmondson@oracle.com> Message-Id: <20210705104632.2902400-4-david.edmondson@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
436463b84b
commit
fde7482100
|
@ -1329,7 +1329,13 @@ typedef struct X86XSaveArea {
|
|||
|
||||
/* AVX State: */
|
||||
XSaveAVX avx_state;
|
||||
uint8_t padding[960 - 576 - sizeof(XSaveAVX)];
|
||||
|
||||
/* Ensure that XSaveBNDREG is properly aligned. */
|
||||
uint8_t padding[XSAVE_BNDREG_OFFSET
|
||||
- sizeof(X86LegacyXSaveArea)
|
||||
- sizeof(X86XSaveHeader)
|
||||
- sizeof(XSaveAVX)];
|
||||
|
||||
/* MPX State: */
|
||||
XSaveBNDREG bndreg_state;
|
||||
XSaveBNDCSR bndcsr_state;
|
||||
|
|
Loading…
Reference in New Issue