summary refs log tree commit diff
path: root/src/test/fpcnv.ssa
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-27 15:00:45 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-27 15:00:45 -0400
commit36635660b40573f6a0c19d50dfdd9277589030de (patch)
treea1b4463f7260462c314bd8d7cb35b3d199143f33 /src/test/fpcnv.ssa
parentaad52241c88ad5327a8488c66dc906c8393c9c92 (diff)
downloadroux-36635660b40573f6a0c19d50dfdd9277589030de.tar.gz
extract tests out of src
Diffstat (limited to 'src/test/fpcnv.ssa')
-rw-r--r--src/test/fpcnv.ssa27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/fpcnv.ssa b/src/test/fpcnv.ssa
deleted file mode 100644
index 5fd3be9..0000000
--- a/src/test/fpcnv.ssa
+++ /dev/null
@@ -1,27 +0,0 @@
-# floating point casts and conversions
-
-function s $fneg(s %f) {
-@fneg
-	%b0 =w cast %f
-	%b1 =w xor 2147483648, %b0
-	%rs =s cast %b1
-	ret %rs
-}
-
-function d $ftrunc(d %f) {
-@ftrunc
-	%l0 =l ftosi %f
-	%rt =d sitof %l0
-	ret %rt
-}
-
-# >>> driver
-# extern float fneg(float);
-# extern double ftrunc(double);
-# int main() {
-# 	if (fneg(1.23f) != -1.23f)  return 1;
-# 	if (ftrunc(3.1415) != 3.0)  return 2;
-# 	if (ftrunc(-1.234) != -1.0) return 3;
-# 	return 0;
-# }
-# <<<