From: Michael Tokarev <mjt@tls.msk.ru>
To: qemu-devel <qemu-devel@nongnu.org>,
Claudio Fontana <claudio.fontana@linaro.org>,
Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] qemu git does not build on 32bits anymore (incl mingw32)
Date: Sat, 15 Feb 2014 21:34:19 +0400 [thread overview]
Message-ID: <52FFA51B.9070108@msgid.tls.msk.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 2065 bytes --]
Since this commit:
commit 999b53ec8794f203964db3ecf939a3da5c4bc843
Author: Claudio Fontana <claudio.fontana@linaro.org>
Date: Wed Feb 5 17:27:28 2014 +0000
disas: Implement disassembly output for A64
Use libvixl to implement disassembly output in debug
logs for A64, for use with both AArch64 hosts and targets.
Signed-off-by: Claudio Fontana <claudio.fontana@linaro.org>
[PMM:
* added support for target disassembly
* switched to custom QEMUDisassembler so the output format
matches what QEMU expects
* make sure we correctly fall back to "just print hex"
if we didn't build the AArch64 disassembler because of
lack of a C++ compiler
* rename from 'aarch64' to 'arm-a64' because this is a
disassembler for the A64 instruction set
* merge aarch64.c and aarch64-cxx.cc into one C++ file
* simplify the aarch64.c<->aarch64-cxx.cc interface]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Qemu does not build on mingw32 anymore, with the following error
messages:
CXX disas/libvixl/utils.o
disas/libvixl/utils.cc:98: error: integer constant is too large for 'unsigned long' type
disas/libvixl/utils.cc:111: error: integer constant is too large for 'long' type
disas/libvixl/utils.cc:111: error: integer constant is too large for 'long' type
disas/libvixl/utils.cc:112: error: integer constant is too large for 'long' type
disas/libvixl/utils.cc:112: error: integer constant is too large for 'long' type
disas/libvixl/utils.cc:113: error: integer constant is too large for 'long' type
disas/libvixl/utils.cc:113: error: integer constant is too large for 'long' type
disas/libvixl/utils.cc:114: error: integer constant is too large for 'long' type
disas/libvixl/utils.cc:114: error: integer constant is too large for 'long' type
disas/libvixl/utils.cc:115: error: integer constant is too large for 'long' type
disas/libvixl/utils.cc:115: error: integer constant is too large for 'long' type
make: *** [disas/libvixl/utils.o] Error 1
Attached patch fixes this.
/mjt
[-- Attachment #2: libvixl-fix-64bit-constants.diff --]
[-- Type: text/x-patch, Size: 4188 bytes --]
From: Michael Tokarev <mjt@tls.msk.ru>
Subject: libvixl: fix 64bit constants usage
Since commit 999b53ec8794f203964db3ecf939a3da5c4bc843:
Author: Claudio Fontana <claudio.fontana@linaro.org>
Date: Wed Feb 5 17:27:28 2014 +0000
disas: Implement disassembly output for A64
Use libvixl to implement disassembly output in debug
logs for A64, for use with both AArch64 hosts and targets.
disas/libvixl/ contains functions which uses 64bit constants
without using appropriate suffixes, which fails on 32bits.
Fix this by using ULL suffix.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/disas/libvixl/a64/disasm-a64.cc b/disas/libvixl/a64/disasm-a64.cc
index 4a49748..5c6b898 100644
--- a/disas/libvixl/a64/disasm-a64.cc
+++ b/disas/libvixl/a64/disasm-a64.cc
@@ -269,19 +269,19 @@ bool Disassembler::IsMovzMovnImm(unsigned reg_size, uint64_t value) {
((reg_size == kWRegSize) && (value <= 0xffffffff)));
// Test for movz: 16 bits set at positions 0, 16, 32 or 48.
- if (((value & 0xffffffffffff0000UL) == 0UL) ||
- ((value & 0xffffffff0000ffffUL) == 0UL) ||
- ((value & 0xffff0000ffffffffUL) == 0UL) ||
- ((value & 0x0000ffffffffffffUL) == 0UL)) {
+ if (((value & 0xffffffffffff0000ULL) == 0ULL) ||
+ ((value & 0xffffffff0000ffffULL) == 0ULL) ||
+ ((value & 0xffff0000ffffffffULL) == 0ULL) ||
+ ((value & 0x0000ffffffffffffULL) == 0ULL)) {
return true;
}
// Test for movn: NOT(16 bits set at positions 0, 16, 32 or 48).
if ((reg_size == kXRegSize) &&
- (((value & 0xffffffffffff0000UL) == 0xffffffffffff0000UL) ||
- ((value & 0xffffffff0000ffffUL) == 0xffffffff0000ffffUL) ||
- ((value & 0xffff0000ffffffffUL) == 0xffff0000ffffffffUL) ||
- ((value & 0x0000ffffffffffffUL) == 0x0000ffffffffffffUL))) {
+ (((value & 0xffffffffffff0000ULL) == 0xffffffffffff0000ULL) ||
+ ((value & 0xffffffff0000ffffULL) == 0xffffffff0000ffffULL) ||
+ ((value & 0xffff0000ffffffffULL) == 0xffff0000ffffffffULL) ||
+ ((value & 0x0000ffffffffffffULL) == 0x0000ffffffffffffULL))) {
return true;
}
if ((reg_size == kWRegSize) &&
diff --git a/disas/libvixl/utils.cc b/disas/libvixl/utils.cc
index 6f85e61..a45fb95 100644
--- a/disas/libvixl/utils.cc
+++ b/disas/libvixl/utils.cc
@@ -95,7 +95,7 @@ int CountSetBits(uint64_t value, int width) {
ASSERT((width == 32) || (width == 64));
// Mask out unused bits to ensure that they are not counted.
- value &= (0xffffffffffffffffUL >> (64-width));
+ value &= (0xffffffffffffffffULL >> (64-width));
// Add up the set bits.
// The algorithm works by adding pairs of bit fields together iteratively,
@@ -108,12 +108,18 @@ int CountSetBits(uint64_t value, int width) {
// value = h+g+f+e d+c+b+a
// \ |
// value = h+g+f+e+d+c+b+a
- value = ((value >> 1) & 0x5555555555555555) + (value & 0x5555555555555555);
- value = ((value >> 2) & 0x3333333333333333) + (value & 0x3333333333333333);
- value = ((value >> 4) & 0x0f0f0f0f0f0f0f0f) + (value & 0x0f0f0f0f0f0f0f0f);
- value = ((value >> 8) & 0x00ff00ff00ff00ff) + (value & 0x00ff00ff00ff00ff);
- value = ((value >> 16) & 0x0000ffff0000ffff) + (value & 0x0000ffff0000ffff);
- value = ((value >> 32) & 0x00000000ffffffff) + (value & 0x00000000ffffffff);
+ value = ((value >> 1) & 0x5555555555555555ULL) +
+ (value & 0x5555555555555555ULL);
+ value = ((value >> 2) & 0x3333333333333333ULL) +
+ (value & 0x3333333333333333ULL);
+ value = ((value >> 4) & 0x0f0f0f0f0f0f0f0fULL) +
+ (value & 0x0f0f0f0f0f0f0f0fULL);
+ value = ((value >> 8) & 0x00ff00ff00ff00ffULL) +
+ (value & 0x00ff00ff00ff00ffULL);
+ value = ((value >> 16) & 0x0000ffff0000ffffULL) +
+ (value & 0x0000ffff0000ffffULL);
+ value = ((value >> 32) & 0x00000000ffffffffULL) +
+ (value & 0x00000000ffffffffULL);
return value;
}
diff --git a/roms/seabios b/roms/seabios
index 96917a8..31b8b4e 160000
--- a/roms/seabios
+++ b/roms/seabios
@@ -1 +1 @@
-Subproject commit 96917a8ed761f017fc8c72ba3b9181fbac03ac59
+Subproject commit 31b8b4eea9d9ad58a73b22a6060d3ac1c419c26d
next reply other threads:[~2014-02-15 17:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-15 17:34 Michael Tokarev [this message]
2014-02-15 18:12 ` [Qemu-devel] qemu git does not build on 32bits anymore (incl mingw32) Peter Maydell
2014-02-15 18:53 ` Peter Maydell
2014-02-15 19:01 ` Michael Tokarev
2014-02-15 19:05 ` Peter Maydell
2014-02-15 19:08 ` Michael Tokarev
2014-02-15 21:01 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52FFA51B.9070108@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=claudio.fontana@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.