[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/emul: Fix clang build following BMI1/BMI2/TBM instruction support
commit 926c1e32b2351197cc19bc39f9047b703509372c Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Fri Jan 20 15:34:54 2017 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Fri Jan 20 15:56:49 2017 +0000 x86/emul: Fix clang build following BMI1/BMI2/TBM instruction support Travis reports that Clang objects to integer truncation during assignments to a bitfield: ./x86_emulate/x86_emulate.c:6150:19: error: implicit truncation from 'int' to bitfield changes value from -1 to 15 [-Werror,-Wbitfield-constant-conversion] pxop->reg = ~0; /* rAX */ ^ ~~ Use 0xf instead. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/x86_emulate/x86_emulate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 2810c73..bd48290 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -6015,7 +6015,7 @@ x86_emulate( *pvex = vex; pvex->b = 1; pvex->r = 1; - pvex->reg = ~0; /* rAX */ + pvex->reg = 0xf; /* rAX */ buf[3] = b; buf[4] = 0x09; /* reg=rCX r/m=(%rCX) */ buf[5] = 0xc3; @@ -6049,7 +6049,7 @@ x86_emulate( *pvex = vex; pvex->b = 1; pvex->r = 1; - pvex->reg = ~0; /* rAX */ + pvex->reg = 0xf; /* rAX */ buf[3] = b; buf[4] = (modrm & 0x38) | 0x01; /* r/m=(%rCX) */ buf[5] = 0xc3; @@ -6147,7 +6147,7 @@ x86_emulate( *pxop = vex; pxop->b = 1; pxop->r = 1; - pxop->reg = ~0; /* rAX */ + pxop->reg = 0xf; /* rAX */ buf[3] = b; buf[4] = (modrm & 0x38) | 0x01; /* r/m=(%rCX) */ buf[5] = 0xc3; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |