Skip to contentSkip to conversation

alpha-linux-user stat64 issue

PATCH Applied Richard Henderson 2 participants 2 messages Jan 5, 2010 – Jan 14, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Richard Henderson

author Acked-by
#1 lore raw
Quoted 23 lines · Vince Weaver

Hello

The stat64/fstat64 syscalls are broken for alpha linux-user.

This is because Alpha, even though it is native 64-bits, has a stat64 syscall that is different than regular stat. This means that the "TARGET_LONG_BITS==64" check in syscall.c isn't enough. Below is a patch that fixes things for me, although it might not be the cleanest fix.

This issue keeps sixtrack and fma3d spec2k benchmarks from running.

Vince

linux-user/syscall.c +0 -0
index 1acf1f5..f2dd39e 100644

linux-user/syscall.c static inline abi_long host_to_target_stat64(void *cpu_env, · line 4010

Quoted 8 lines
linux-user/syscall.c +1 -1
@@ -4004,7 +4004,7 @@ static inline abi_long host_to_target_stat64(void *cpu_env,
      } else
  #endif
      {
-#if TARGET_LONG_BITS == 64
+#if (TARGET_LONG_BITS == 64)&&  (!defined(TARGET_ALPHA))
          struct target_stat *target_st;
  #else
          struct target_stat64 *target_st;

r~

#2 lore raw
In reply to a message not in the archive
Quoted 11 lines · Vince Weaver

Hello

The stat64/fstat64 syscalls are broken for alpha linux-user.

This is because Alpha, even though it is native 64-bits, has a stat64 syscall that is different than regular stat. This means that the "TARGET_LONG_BITS==64" check in syscall.c isn't enough. Below is a patch that fixes things for me, although it might not be the cleanest fix.

This issue keeps sixtrack and fma3d spec2k benchmarks from running.

Thanks, applied.

Quoted 20 lines

Vince

linux-user/syscall.c +1 -1
index 1acf1f5..f2dd39e 100644
@@ -4004,7 +4004,7 @@ static inline abi_long host_to_target_stat64(void *cpu_env,
     } else
 #endif
     {
-#if TARGET_LONG_BITS == 64
+#if (TARGET_LONG_BITS == 64) && (!defined(TARGET_ALPHA))
         struct target_stat *target_st;
 #else
         struct target_stat64 *target_st;
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net