SCP: Add compiled architecture and release/debug info to SHOW VERSION
This commit is contained in:
parent
9122a9f196
commit
d4f38d5358
2 changed files with 38 additions and 13 deletions
39
scp.c
39
scp.c
|
@ -4358,13 +4358,10 @@ return;
|
||||||
t_stat show_version (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, CONST char *cptr)
|
t_stat show_version (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, CONST char *cptr)
|
||||||
{
|
{
|
||||||
int32 vmaj = SIM_MAJOR, vmin = SIM_MINOR, vpat = SIM_PATCH, vdelt = SIM_DELTA;
|
int32 vmaj = SIM_MAJOR, vmin = SIM_MINOR, vpat = SIM_PATCH, vdelt = SIM_DELTA;
|
||||||
const char *cpp;
|
const char *cpp = "";
|
||||||
|
const char *build = "";
|
||||||
|
const char *arch = "";
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
cpp = "C++";
|
|
||||||
#else
|
|
||||||
cpp = "C";
|
|
||||||
#endif
|
|
||||||
if (cptr && (*cptr != 0))
|
if (cptr && (*cptr != 0))
|
||||||
return SCPE_2MARG;
|
return SCPE_2MARG;
|
||||||
fprintf (st, "%s simulator V%d.%d-%d", sim_name, vmaj, vmin, vpat);
|
fprintf (st, "%s simulator V%d.%d-%d", sim_name, vmaj, vmin, vpat);
|
||||||
|
@ -4406,6 +4403,11 @@ if (flag) {
|
||||||
fprintf (st, "\n\t\tCompiler: clang %s", __clang_version__);
|
fprintf (st, "\n\t\tCompiler: clang %s", __clang_version__);
|
||||||
#elif defined (_MSC_FULL_VER) && defined (_MSC_BUILD)
|
#elif defined (_MSC_FULL_VER) && defined (_MSC_BUILD)
|
||||||
fprintf (st, "\n\t\tCompiler: Microsoft Visual C++ %d.%02d.%05d.%02d", _MSC_FULL_VER/10000000, (_MSC_FULL_VER/100000)%100, _MSC_FULL_VER%100000, _MSC_BUILD);
|
fprintf (st, "\n\t\tCompiler: Microsoft Visual C++ %d.%02d.%05d.%02d", _MSC_FULL_VER/10000000, (_MSC_FULL_VER/100000)%100, _MSC_FULL_VER%100000, _MSC_BUILD);
|
||||||
|
#if defined(_DEBUG)
|
||||||
|
build = " (Debug Build)";
|
||||||
|
#else
|
||||||
|
build = " (Release Build)";
|
||||||
|
#endif
|
||||||
#elif defined (__DECC_VER)
|
#elif defined (__DECC_VER)
|
||||||
fprintf (st, "\n\t\tCompiler: DEC C %c%d.%d-%03d", ("T SV")[((__DECC_VER/10000)%10)-6], __DECC_VER/10000000, (__DECC_VER/100000)%100, __DECC_VER%10000);
|
fprintf (st, "\n\t\tCompiler: DEC C %c%d.%d-%03d", ("T SV")[((__DECC_VER/10000)%10)-6], __DECC_VER/10000000, (__DECC_VER/100000)%100, __DECC_VER%10000);
|
||||||
#elif defined (SIM_COMPILER)
|
#elif defined (SIM_COMPILER)
|
||||||
|
@ -4415,8 +4417,31 @@ if (flag) {
|
||||||
#undef S_str
|
#undef S_str
|
||||||
#undef S_xstr
|
#undef S_xstr
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#if defined(__OPTIMIZE__)
|
||||||
|
build = " (Release Build)";
|
||||||
|
#else
|
||||||
|
build = " (Debug Build)";
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if defined(_M_X64) || defined(_M_AMD64) || defined(__amd64__) || defined(__x86_64__)
|
||||||
|
arch = " arch: x64";
|
||||||
|
#elif defined(_M_IX86) || defined(__i386)
|
||||||
|
arch = " arch: x86";
|
||||||
|
#elif defined(_M_ARM64) || defined(__aarch64_)
|
||||||
|
arch = " arch: ARM64";
|
||||||
|
#elif defined(_M_ARM) || defined(__arm__)
|
||||||
|
arch = " arch: ARM";
|
||||||
|
#elif defined(__ia64__) || defined(_M_IA64) || defined(__itanium__)
|
||||||
|
arch = " arch: IA-64";
|
||||||
|
#endif
|
||||||
#if defined (__DATE__) && defined (__TIME__)
|
#if defined (__DATE__) && defined (__TIME__)
|
||||||
fprintf (st, "\n\t\tSimulator Compiled as %s: %s at %s", cpp, __DATE__, __TIME__);
|
#ifdef __cplusplus
|
||||||
|
cpp = "C++";
|
||||||
|
#else
|
||||||
|
cpp = "C";
|
||||||
|
#endif
|
||||||
|
fprintf (st, "\n\t\tSimulator Compiled as %s%s%s on %s at %s", cpp, arch, build, __DATE__, __TIME__);
|
||||||
#endif
|
#endif
|
||||||
fprintf (st, "\n\t\tMemory Access: %s Endian", sim_end ? "Little" : "Big");
|
fprintf (st, "\n\t\tMemory Access: %s Endian", sim_end ? "Little" : "Big");
|
||||||
fprintf (st, "\n\t\tMemory Pointer Size: %d bits", (int)sizeof(dptr)*8);
|
fprintf (st, "\n\t\tMemory Pointer Size: %d bits", (int)sizeof(dptr)*8);
|
||||||
|
|
|
@ -165,9 +165,9 @@ int socket_set_fast_reuse(int fd)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
int64_t qemu_clock_get_ns(int type)
|
int64_t qemu_clock_get_ns(int type)
|
||||||
|
@ -196,9 +196,9 @@ int64_t qemu_clock_get_ns(int type)
|
||||||
return tv.tv_sec * 1000000000LL + tv.tv_nsec;
|
return tv.tv_sec * 1000000000LL + tv.tv_nsec;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void monitor_printf(Monitor *mon, const char *fmt, ...)
|
void monitor_printf(Monitor *mon, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue