aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/mppa_k1c/vararg.S
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-05-16 14:27:06 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-05-16 14:27:06 +0200
commitca92d5ab93f2ee63ff416a096fdbfa569a64c717 (patch)
tree8f0663009230cf504daee7a9dc8c9fa83e886842 /runtime/mppa_k1c/vararg.S
parent2981acd39bb23b783339fa6848aa284bfae938c0 (diff)
downloadcompcert-kvx-ca92d5ab93f2ee63ff416a096fdbfa569a64c717.tar.gz
compcert-kvx-ca92d5ab93f2ee63ff416a096fdbfa569a64c717.zip
sdiv seems to work, udiv/umod/smod BOGUS
Diffstat (limited to 'runtime/mppa_k1c/vararg.S')
-rw-r--r--runtime/mppa_k1c/vararg.S51
1 files changed, 51 insertions, 0 deletions
diff --git a/runtime/mppa_k1c/vararg.S b/runtime/mppa_k1c/vararg.S
index 9e23e0b3..2050c9aa 100644
--- a/runtime/mppa_k1c/vararg.S
+++ b/runtime/mppa_k1c/vararg.S
@@ -52,3 +52,54 @@ __compcert_acswapw:
sq 0[$r0] = $r2r3
ret
;;
+
+ .globl __compcert_i32_sdiv
+ .globl __compcert_i32_smod
+ .globl __compcert_i32_udiv
+ .globl __compcert_i32_umod
+__compcert_i32_sdiv:
+__compcert_i32_smod:
+__compcert_i32_udiv:
+__compcert_i32_umod:
+ sxwd $r0 = $r0
+ ;; /* Can't issue next in the same bundle */
+ sxwd $r1 = $r1
+ ;; /* Can't issue next in the same bundle */
+ make $r2 = 0x3ff0000000000000
+ addd $r12 = $r12, -16
+ ;;
+ floatd.rn.s $r0 = $r0, 0
+ ;;
+ floatd.rn.s $r3 = $r1, 0
+ ;;
+ floatw.rn.s $r1 = $r1, 0
+ ;;
+ ;;
+#APP
+# 16 "clock_int_div2.c" 1
+ finvw $r1=$r1
+# 0 "" 2
+ ;;
+
+ ;;
+#NO_APP
+ fwidenlwd $r1 = $r1
+ ;;
+ fmuld $r0 = $r0, $r1
+ ;;
+ ffmsd $r2 = $r1, $r3
+ ;;
+ sd 8[$r12] = $r0
+ ;;
+ ld $r1 = 8[$r12]
+ ;;
+ ffmad $r1 = $r2, $r0
+ ;;
+ ffmad $r0 = $r2, $r1
+ ;;
+ sd 8[$r12] = $r1
+ addd $r12 = $r12, 16
+ ;;
+ fixedd.rz $r0 = $r0, 0
+ ret
+ ;;