diff mbox

[v2,04/20] target-mips: add 16, 64 bit load and store

Message ID 1414546928-54642-5-git-send-email-yongbok.kim@imgtec.com
State New
Headers show

Commit Message

Yongbok Kim Oct. 29, 2014, 1:41 a.m. UTC
Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
---
 target-mips/op_helper.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

Comments

James Hogan Oct. 29, 2014, 10:21 a.m. UTC | #1
On Wed, Oct 29, 2014 at 01:41:52AM +0000, Yongbok Kim wrote:
> 
> Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>

You seem to have lost the commit message compared to v1.

Patch looks fine to me, but IMO it's worth squashing this into patch 18,
since that's the only place they're used.

Cheers
James

> ---
>  target-mips/op_helper.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
> index 7cbf4cf..e878442 100644
> --- a/target-mips/op_helper.c
> +++ b/target-mips/op_helper.c
> @@ -90,10 +90,10 @@ static inline type do_##name(CPUMIPSState *env, target_ulong addr,      \
>      }                                                                   \
>  }
>  #endif
> +HELPER_LD(lbu, ldub, uint8_t)
> +HELPER_LD(lhu, lduw, uint16_t)
>  HELPER_LD(lw, ldl, int32_t)
> -#ifdef TARGET_MIPS64
>  HELPER_LD(ld, ldq, int64_t)
> -#endif
>  #undef HELPER_LD
>  
>  #if defined(CONFIG_USER_ONLY)
> @@ -118,10 +118,9 @@ static inline void do_##name(CPUMIPSState *env, target_ulong addr,      \
>  }
>  #endif
>  HELPER_ST(sb, stb, uint8_t)
> +HELPER_ST(sh, stw, uint16_t)
>  HELPER_ST(sw, stl, uint32_t)
> -#ifdef TARGET_MIPS64
>  HELPER_ST(sd, stq, uint64_t)
> -#endif
>  #undef HELPER_ST
>  
>  target_ulong helper_clo (target_ulong arg1)
> -- 
> 1.7.4
> 
>
Leon Alrae Oct. 29, 2014, 10:56 p.m. UTC | #2
On 29/10/14 01:41, Yongbok Kim wrote:
> 
> Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
> ---
>  target-mips/op_helper.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
> index 7cbf4cf..e878442 100644
> --- a/target-mips/op_helper.c
> +++ b/target-mips/op_helper.c
> @@ -90,10 +90,10 @@ static inline type do_##name(CPUMIPSState *env, target_ulong addr,      \
>      }                                                                   \
>  }
>  #endif
> +HELPER_LD(lbu, ldub, uint8_t)
> +HELPER_LD(lhu, lduw, uint16_t)
>  HELPER_LD(lw, ldl, int32_t)
> -#ifdef TARGET_MIPS64
>  HELPER_LD(ld, ldq, int64_t)
> -#endif
>  #undef HELPER_LD
>  
>  #if defined(CONFIG_USER_ONLY)
> @@ -118,10 +118,9 @@ static inline void do_##name(CPUMIPSState *env, target_ulong addr,      \
>  }
>  #endif
>  HELPER_ST(sb, stb, uint8_t)
> +HELPER_ST(sh, stw, uint16_t)
>  HELPER_ST(sw, stl, uint32_t)
> -#ifdef TARGET_MIPS64
>  HELPER_ST(sd, stq, uint64_t)
> -#endif
>  #undef HELPER_ST
>  
>  target_ulong helper_clo (target_ulong arg1)

I agree with James, you could squash it into the patch which uses these
functions. Anyway,

Reviewed-by: Leon Alrae <leon.alrae@imgtec.com>
diff mbox

Patch

diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 7cbf4cf..e878442 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -90,10 +90,10 @@  static inline type do_##name(CPUMIPSState *env, target_ulong addr,      \
     }                                                                   \
 }
 #endif
+HELPER_LD(lbu, ldub, uint8_t)
+HELPER_LD(lhu, lduw, uint16_t)
 HELPER_LD(lw, ldl, int32_t)
-#ifdef TARGET_MIPS64
 HELPER_LD(ld, ldq, int64_t)
-#endif
 #undef HELPER_LD
 
 #if defined(CONFIG_USER_ONLY)
@@ -118,10 +118,9 @@  static inline void do_##name(CPUMIPSState *env, target_ulong addr,      \
 }
 #endif
 HELPER_ST(sb, stb, uint8_t)
+HELPER_ST(sh, stw, uint16_t)
 HELPER_ST(sw, stl, uint32_t)
-#ifdef TARGET_MIPS64
 HELPER_ST(sd, stq, uint64_t)
-#endif
 #undef HELPER_ST
 
 target_ulong helper_clo (target_ulong arg1)