aboutsummaryrefslogtreecommitdiffstats
path: root/ref_vget_lane.c
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2013-02-05 16:02:00 +0100
committerChristophe Lyon <christophe.lyon@st.com>2013-02-05 16:02:00 +0100
commit9c0f082015c7eaaf97818050ec20122446869a09 (patch)
tree0802cb88ab1fc553901333531ebef17bae5afaa3 /ref_vget_lane.c
parent01af0a532c91523692d7b32ed08e0aace8123cba (diff)
downloadplatform_external_arm-neon-tests-9c0f082015c7eaaf97818050ec20122446869a09.tar.gz
platform_external_arm-neon-tests-9c0f082015c7eaaf97818050ec20122446869a09.tar.bz2
platform_external_arm-neon-tests-9c0f082015c7eaaf97818050ec20122446869a09.zip
Use union instead of cast to avoid GCC warning.
Diffstat (limited to 'ref_vget_lane.c')
-rw-r--r--ref_vget_lane.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ref_vget_lane.c b/ref_vget_lane.c
index ad3ae95..a1ab6a9 100644
--- a/ref_vget_lane.c
+++ b/ref_vget_lane.c
@@ -40,10 +40,16 @@ void exec_vget_lane (void)
fprintf(ref_file, "%" PRIx##W ", ", VAR(var, T1, W))
/* Special variant for floating-point */
+ union {
+ uint32_t var_int32;
+ float var_float32;
+ } var_int32_float32;
+
#define TEST_VGET_LANE_F(Q, T1, T2, W, N, L) \
VAR(var, T1, W) = vget##Q##_lane_##T2##W(VECT_VAR(vector, T1, W, N), L); \
vst1##Q##_##T2##W(VECT_VAR(result, T1, W, N), VECT_VAR(vector, T1, W, N)); \
- fprintf(ref_file, "%" PRIx##W ", ", *((uint##W##_t*)&VAR(var, T1, W)))
+ var_int##W##_float##W.var_float##W = VAR(var, T1, W); \
+ fprintf(ref_file, "%" PRIx##W ", ", var_int##W##_float##W.var_int##W)
/* With ARM RVCT, we need to declare variables before any executable
statement */