summaryrefslogtreecommitdiffstats
path: root/test/800-smali/smali/FloatIntConstPassing.smali
diff options
context:
space:
mode:
Diffstat (limited to 'test/800-smali/smali/FloatIntConstPassing.smali')
-rw-r--r--test/800-smali/smali/FloatIntConstPassing.smali29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/800-smali/smali/FloatIntConstPassing.smali b/test/800-smali/smali/FloatIntConstPassing.smali
new file mode 100644
index 0000000..a2916c5
--- /dev/null
+++ b/test/800-smali/smali/FloatIntConstPassing.smali
@@ -0,0 +1,29 @@
+.class public LFloatIntConstPassing;
+
+.super Ljava/lang/Object;
+
+.method public static getInt(I)I
+ .registers 2
+ const/4 v0, 1
+ add-int/2addr v0, p0
+ return v0
+.end method
+
+.method public static getFloat(F)F
+ .registers 2
+ const/4 v0, 0
+ mul-float/2addr v0, p0
+ return v0
+.end method
+
+.method public static run()I
+ .registers 3
+ const/4 v0, 1
+ invoke-static {v0}, LFloatIntConstPassing;->getInt(I)I
+ move-result v1
+ invoke-static {v0}, LFloatIntConstPassing;->getFloat(F)F
+ move-result v2
+ float-to-int v2, v2
+ add-int/2addr v1, v2
+ return v1
+.end method