diff options
-rw-r--r-- | linux-user/hexagon/target_elf.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/linux-user/hexagon/target_elf.h b/linux-user/hexagon/target_elf.h index a0271a0a2a..36056fc9f0 100644 --- a/linux-user/hexagon/target_elf.h +++ b/linux-user/hexagon/target_elf.h @@ -20,6 +20,9 @@ static inline const char *cpu_get_model(uint32_t eflags) { + static char buf[32]; + int err; + /* For now, treat anything newer than v5 as a v73 */ /* FIXME - Disable instructions that are newer than the specified arch */ if (eflags == 0x04 || /* v5 */ @@ -39,7 +42,9 @@ static inline const char *cpu_get_model(uint32_t eflags) ) { return "v73"; } - return "unknown"; + + err = snprintf(buf, sizeof(buf), "unknown (0x%x)", eflags); + return err >= 0 && err < sizeof(buf) ? buf : "unknown"; } #endif |