mirror of https://github.com/proxmox/mirror_qemu
softmmu: Make qtest.c target independent
The code in this file is not performance critical, so we can use the target independent endianess functions to only compile this file once for all targets. Message-Id: <20230411183418.1640500-4-thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Thomas Huth <thuth@redhat.com>master
parent
24be3369ad
commit
09637edb84
|
@ -3,7 +3,6 @@ specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files(
|
||||||
'ioport.c',
|
'ioport.c',
|
||||||
'memory.c',
|
'memory.c',
|
||||||
'physmem.c',
|
'physmem.c',
|
||||||
'qtest.c',
|
|
||||||
'dirtylimit.c',
|
'dirtylimit.c',
|
||||||
'watchpoint.c',
|
'watchpoint.c',
|
||||||
)])
|
)])
|
||||||
|
@ -23,6 +22,7 @@ softmmu_ss.add(files(
|
||||||
'globals.c',
|
'globals.c',
|
||||||
'memory_mapping.c',
|
'memory_mapping.c',
|
||||||
'qdev-monitor.c',
|
'qdev-monitor.c',
|
||||||
|
'qtest.c',
|
||||||
'rtc.c',
|
'rtc.c',
|
||||||
'runstate-action.c',
|
'runstate-action.c',
|
||||||
'runstate-hmp-cmds.c',
|
'runstate-hmp-cmds.c',
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "cpu.h"
|
|
||||||
#include "sysemu/qtest.h"
|
#include "sysemu/qtest.h"
|
||||||
#include "sysemu/runstate.h"
|
#include "sysemu/runstate.h"
|
||||||
#include "chardev/char-fe.h"
|
#include "chardev/char-fe.h"
|
||||||
#include "exec/ioport.h"
|
#include "exec/ioport.h"
|
||||||
#include "exec/memory.h"
|
#include "exec/memory.h"
|
||||||
|
#include "exec/tswap.h"
|
||||||
#include "hw/qdev-core.h"
|
#include "hw/qdev-core.h"
|
||||||
#include "hw/irq.h"
|
#include "hw/irq.h"
|
||||||
#include "qemu/accel.h"
|
#include "qemu/accel.h"
|
||||||
|
@ -717,11 +717,11 @@ static void qtest_process_command(CharBackend *chr, gchar **words)
|
||||||
qtest_send(chr, "OK\n");
|
qtest_send(chr, "OK\n");
|
||||||
} else if (strcmp(words[0], "endianness") == 0) {
|
} else if (strcmp(words[0], "endianness") == 0) {
|
||||||
qtest_send_prefix(chr);
|
qtest_send_prefix(chr);
|
||||||
#if TARGET_BIG_ENDIAN
|
if (target_words_bigendian()) {
|
||||||
qtest_sendf(chr, "OK big\n");
|
qtest_sendf(chr, "OK big\n");
|
||||||
#else
|
} else {
|
||||||
qtest_sendf(chr, "OK little\n");
|
qtest_sendf(chr, "OK little\n");
|
||||||
#endif
|
}
|
||||||
} else if (qtest_enabled() && strcmp(words[0], "clock_step") == 0) {
|
} else if (qtest_enabled() && strcmp(words[0], "clock_step") == 0) {
|
||||||
int64_t ns;
|
int64_t ns;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue