diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/my_cpuid.c | 11 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibc.c | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/tools/my_cpuid.c b/src/tools/my_cpuid.c index 9bf8cd82..6039f135 100644 --- a/src/tools/my_cpuid.c +++ b/src/tools/my_cpuid.c @@ -159,10 +159,6 @@ const char* getBoxCpuName() snprintf(branding, sizeof(branding), "Box64 on %.*s @%04d MHz", 28, name, MHz); } } - while(strlen(branding)<3*4*4) { - memmove(branding+1, branding, strlen(branding)); - branding[0] = ' '; - } } return branding; } @@ -173,7 +169,12 @@ void my_cpuid(x64emu_t* emu, uint32_t tmp32u) int ncpu = getNCpu(); if(ncpu>255) ncpu = 255; if(!ncpu) ncpu = 1; - const char* branding = getBoxCpuName(); + static char branding[3*4*4+1] = ""; + strcpy(branding, getBoxCpuName()); + while(strlen(branding)<3*4*4) { + memmove(branding+1, branding, strlen(branding)); + branding[0] = ' '; + } switch(tmp32u) { case 0x0: // emulate a P4. TODO: Emulate a Core2? diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index ce414a37..fbbbef76 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -1562,7 +1562,7 @@ void CreateCPUInfoFile(int fd) P; sprintf(buff, "bogomips\t: %g\n", getBogoMips()); P; - sprintf(buff, "flags\t\t: fpu cx8 sep cmov clflush mmx sse sse2 syscall tsc lahf_lm ssse3 ht tm lm fma fxsr cpuid pclmulqdq cx16 aes movbe pni sse4_1 lzcnt popcnt\n"); + sprintf(buff, "flags\t\t: fpu cx8 sep ht cmov clflush mmx sse sse2 syscall tsc lahf_lm ssse3 ht tm lm fma fxsr cpuid pclmulqdq cx16 aes movbe pni sse4_1 lzcnt popcnt\n"); P; sprintf(buff, "address sizes\t: 48 bits physical, 48 bits virtual\n"); P; |