This code should now build the x86_x64-softmmu part 2.
This commit is contained in:
@ -122,11 +122,11 @@ int64_t strtosz_suffix_unit(const char *nptr, char **end,
|
||||
mul_required = 1;
|
||||
}
|
||||
c = *endptr;
|
||||
mul = suffix_mul(c, unit);
|
||||
mul = (double)suffix_mul(c, unit);
|
||||
if (mul >= 0) {
|
||||
endptr++;
|
||||
} else {
|
||||
mul = suffix_mul(default_suffix, unit);
|
||||
mul = (double)suffix_mul(default_suffix, unit);
|
||||
assert(mul >= 0);
|
||||
}
|
||||
if (mul == 1 && mul_required) {
|
||||
@ -136,7 +136,7 @@ int64_t strtosz_suffix_unit(const char *nptr, char **end,
|
||||
retval = -ERANGE;
|
||||
goto fail;
|
||||
}
|
||||
retval = val * mul;
|
||||
retval = (int64_t)(val * mul);
|
||||
|
||||
fail:
|
||||
if (end) {
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "platform.h"
|
||||
#include "qemu/host-utils.h"
|
||||
|
||||
#ifndef CONFIG_INT128
|
||||
@ -54,10 +54,10 @@ static inline void mul64(uint64_t *plow, uint64_t *phigh,
|
||||
rh.ll = (uint64_t)a0.l.high * b0.l.high;
|
||||
|
||||
c = (uint64_t)rl.l.high + rm.l.low + rn.l.low;
|
||||
rl.l.high = c;
|
||||
rl.l.high = (uint32_t)c;
|
||||
c >>= 32;
|
||||
c = c + rm.l.high + rn.l.high + rh.l.low;
|
||||
rh.l.low = c;
|
||||
rh.l.low = (uint32_t)c;
|
||||
rh.l.high += (uint32_t)(c >> 32);
|
||||
|
||||
*plow = rl.ll;
|
||||
|
@ -39,8 +39,7 @@
|
||||
#endif
|
||||
#define HUGETLBFS_MAGIC 0x958458f6
|
||||
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include "platform.h"
|
||||
|
||||
#include "config-host.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -11,6 +11,8 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
static const char *progname;
|
||||
|
||||
@ -42,6 +44,14 @@ static void error_print_loc(void)
|
||||
* Prepend the current location and append a newline.
|
||||
* It's wrong to call this in a QMP monitor. Use qerror_report() there.
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
void error_vreport(const char *fmt, va_list ap)
|
||||
{
|
||||
error_print_loc();
|
||||
vfprintf(stderr, fmt, ap);
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
#else
|
||||
void error_vreport(const char *fmt, va_list ap)
|
||||
{
|
||||
GTimeVal tv;
|
||||
@ -51,6 +61,7 @@ void error_vreport(const char *fmt, va_list ap)
|
||||
error_vprintf(fmt, ap);
|
||||
error_printf("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Print an error message to current monitor if we have one, else to stderr.
|
||||
|
@ -15,11 +15,9 @@
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
#include "platform.h"
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#ifdef __linux__
|
||||
#include <sys/syscall.h>
|
||||
#include <linux/futex.h>
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
int64_t clock_freq;
|
||||
|
||||
static void __attribute__((constructor)) init_get_clock(void)
|
||||
INITIALIZER(init_get_clock)
|
||||
{
|
||||
LARGE_INTEGER freq;
|
||||
int ret;
|
||||
@ -46,7 +46,7 @@ static void __attribute__((constructor)) init_get_clock(void)
|
||||
|
||||
int use_rt_clock;
|
||||
|
||||
static void __attribute__((constructor)) init_get_clock(void)
|
||||
INITIALIZER(init_get_clock)
|
||||
{
|
||||
use_rt_clock = 0;
|
||||
#ifdef CLOCK_MONOTONIC
|
||||
|
Reference in New Issue
Block a user