aboutsummaryrefslogtreecommitdiff
path: root/stm-arm-neon-ref.h
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2014-06-03 22:47:52 +0200
committerChristophe Lyon <christophe.lyon@linaro.org>2014-06-03 22:47:52 +0200
commit4a6e5cc95176769664bc9e56d4e7c92b7a2fc816 (patch)
tree614baf4a3939bd6a255da33aebf5cd12a43e8021 /stm-arm-neon-ref.h
parentfad316adcad1edd1cbb1e01769768abcffcb1070 (diff)
downloadarm-neon-tests-4a6e5cc95176769664bc9e56d4e7c92b7a2fc816.tar.gz
Renamed Neon overflow to Neon cumulative saturation, since it's the real name.
Diffstat (limited to 'stm-arm-neon-ref.h')
-rw-r--r--stm-arm-neon-ref.h41
1 files changed, 21 insertions, 20 deletions
diff --git a/stm-arm-neon-ref.h b/stm-arm-neon-ref.h
index ba29f10..43d2ce7 100644
--- a/stm-arm-neon-ref.h
+++ b/stm-arm-neon-ref.h
@@ -562,36 +562,37 @@ typedef union {
#ifdef __ARMCC_VERSION
register _ARM_FPSCR _afpscr_for_qc __asm("fpscr");
-#define Neon_Overflow _afpscr_for_qc.b.QC
-#define Set_Neon_Overflow(x) {Neon_Overflow = (x);}
+#define Neon_Cumulative_Sat _afpscr_for_qc.b.QC
+#define Set_Neon_Cumulative_Sat(x) {Neon_Cumulative_Sat = (x);}
#else
/* GCC/ARM does not know this register */
-#define Neon_Overflow __read_neon_overflow()
-static int __read_neon_overflow() {
- _ARM_FPSCR _afpscr_for_qc;
- asm("vmrs %0,fpscr" : "=r" (_afpscr_for_qc));
- return _afpscr_for_qc.b.QC;
+#define Neon_Cumulative_Sat __read_neon_cumulative_sat()
+static int __read_neon_cumulative_sat() {
+ _ARM_FPSCR _afpscr_for_qc;
+ asm("vmrs %0,fpscr" : "=r" (_afpscr_for_qc));
+ return _afpscr_for_qc.b.QC;
}
-#define Set_Neon_Overflow(x) __set_neon_overflow((x))
-static void __set_neon_overflow(int x) {
- _ARM_FPSCR _afpscr_for_qc;
- asm("vmrs %0,fpscr" : "=r" (_afpscr_for_qc));
- _afpscr_for_qc.b.QC = x;
- asm("vmsr fpscr,%0" : : "r" (_afpscr_for_qc));
- return;
+#define Set_Neon_Cumulative_Sat(x) __set_neon_cumulative_sat((x))
+static void __set_neon_cumulative_sat(int x) {
+ _ARM_FPSCR _afpscr_for_qc;
+ asm("vmrs %0,fpscr" : "=r" (_afpscr_for_qc));
+ _afpscr_for_qc.b.QC = x;
+ asm("vmsr fpscr,%0" : : "r" (_afpscr_for_qc));
+ return;
}
#endif
#endif /* STM_ARM_NEON_MODELS */
-static void dump_neon_overflow(const char* msg, const char *name,
- const char* t1, int w, int n)
+static void dump_neon_cumulative_sat(const char* msg, const char *name,
+ const char* t1, int w, int n)
{
- fprintf(ref_file, "%s:%d:%s Neon overflow %d\n", msg, result_idx++,
- name, Neon_Overflow);
- fprintf(gcc_tests_file, "int VECT_VAR(expected_overflow,%s,%d,%d) = %d;\n", \
- t1, w, n, Neon_Overflow);
+ fprintf(ref_file, "%s:%d:%s Neon cumulative saturation %d\n", msg, result_idx++,
+ name, Neon_Cumulative_Sat);
+ fprintf(gcc_tests_file,
+ "int VECT_VAR(expected_cumulative_sat,%s,%d,%d) = %d;\n",
+ t1, w, n, Neon_Cumulative_Sat);
}
/* Clean output buffers before execution */