Skip to content

Commit

Permalink
target-arm: Use TCG operation for Neon 64 bit negation
Browse files Browse the repository at this point in the history
Use the TCG operation to do Neon 64 bit negations rather than calling
a helper routine for it.

Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
pm215 committed Oct 24, 2012
1 parent f296c0d commit ee6fa55
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion target-arm/helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ DEF_HELPER_2(neon_mull_s16, i64, i32, i32)

DEF_HELPER_1(neon_negl_u16, i64, i64)
DEF_HELPER_1(neon_negl_u32, i64, i64)
DEF_HELPER_1(neon_negl_u64, i64, i64)

DEF_HELPER_2(neon_qabs_s8, i32, env, i32)
DEF_HELPER_2(neon_qabs_s16, i32, env, i32)
Expand Down
6 changes: 0 additions & 6 deletions target-arm/neon_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1664,12 +1664,6 @@ uint64_t HELPER(neon_negl_u32)(uint64_t x)
return low | ((uint64_t)high << 32);
}

/* FIXME: There should be a native op for this. */
uint64_t HELPER(neon_negl_u64)(uint64_t x)
{
return -x;
}

/* Saturating sign manipulation. */
/* ??? Make these use NEON_VOP1 */
#define DO_QABS8(x) do { \
Expand Down
4 changes: 3 additions & 1 deletion target-arm/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -4184,7 +4184,9 @@ static inline void gen_neon_negl(TCGv_i64 var, int size)
switch (size) {
case 0: gen_helper_neon_negl_u16(var, var); break;
case 1: gen_helper_neon_negl_u32(var, var); break;
case 2: gen_helper_neon_negl_u64(var, var); break;
case 2:
tcg_gen_neg_i64(var, var);
break;
default: abort();
}
}
Expand Down

0 comments on commit ee6fa55

Please sign in to comment.