diff mbox

alpha-linux-user stat64 issue

Message ID 20091228235833.H44497@stanley.csl.cornell.edu
State New
Headers show

Commit Message

Vince Weaver Dec. 29, 2009, 5:01 a.m. UTC
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

Signed-off-by: Vince Weaver <vince@csl.cornell.edu>

Comments

Richard Henderson Jan. 4, 2010, 8:11 p.m. UTC | #1
On 12/28/2009 09:01 PM, Vince Weaver wrote:
> 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
>
> Signed-off-by: Vince Weaver<vince@csl.cornell.edu>
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 1acf1f5..f2dd39e 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -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;
>
>

Acked-by: Richard Henderson <rth@twiddle.net>


r~
Aurelien Jarno Jan. 14, 2010, 3 p.m. UTC | #2
On Tue, Dec 29, 2009 at 12:01:22AM -0500, Vince Weaver wrote:
> 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.

> Vince
> 
> Signed-off-by: Vince Weaver <vince@csl.cornell.edu>
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 1acf1f5..f2dd39e 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -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;
> 
> 
>
diff mbox

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 1acf1f5..f2dd39e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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;