diff options
author | Serguei Katkov <serguei.i.katkov@intel.com> | 2014-11-13 17:19:42 +0600 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2014-12-08 11:33:54 +0000 |
commit | 717a3e447c6f7a922cf9c3efe522747a187a045d (patch) | |
tree | 736fca26f68838c71942f206917e5fe320a6ada9 /test/800-smali | |
parent | 90fe256384b5fcd955018888977df07a5c0d85f4 (diff) | |
download | art-717a3e447c6f7a922cf9c3efe522747a187a045d.zip art-717a3e447c6f7a922cf9c3efe522747a187a045d.tar.gz art-717a3e447c6f7a922cf9c3efe522747a187a045d.tar.bz2 |
Re-factor Quick ABI support
Now every architecture must provide a mapper between
VRs parameters and physical registers. Additionally as
a helper function architecture can provide a bulk copy
helper for GenDalvikArgs utility.
All other things becomes a common code stuff:
GetArgMappingToPhysicalReg, GenDalvikArgsNoRange,
GenDalvikArgsRange, FlushIns.
Mapper now uses shorty representation of input
parameters. This is required due to location are not
enough to detect the type of parameter (fp or core).
For the details
see https://android-review.googlesource.com/#/c/113936/.
Change-Id: Ie762b921e0acaa936518ee6b63c9a9d25f83e434
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Diffstat (limited to 'test/800-smali')
-rw-r--r-- | test/800-smali/expected.txt | 1 | ||||
-rw-r--r-- | test/800-smali/smali/FloatIntConstPassing.smali | 29 | ||||
-rw-r--r-- | test/800-smali/src/Main.java | 1 |
3 files changed, 31 insertions, 0 deletions
diff --git a/test/800-smali/expected.txt b/test/800-smali/expected.txt index 0f7001f..5f86f1e 100644 --- a/test/800-smali/expected.txt +++ b/test/800-smali/expected.txt @@ -8,4 +8,5 @@ b/18380491 invoke-super abstract BadCaseInOpRegRegReg CmpLong +FloatIntConstPassing Done! 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 diff --git a/test/800-smali/src/Main.java b/test/800-smali/src/Main.java index f2c1ab5..a2db051 100644 --- a/test/800-smali/src/Main.java +++ b/test/800-smali/src/Main.java @@ -64,6 +64,7 @@ public class Main { new Object[]{0}, new AbstractMethodError(), null)); testCases.add(new TestCase("BadCaseInOpRegRegReg", "BadCaseInOpRegRegReg", "getInt", null, null, 2)); testCases.add(new TestCase("CmpLong", "CmpLong", "run", null, null, 0)); + testCases.add(new TestCase("FloatIntConstPassing", "FloatIntConstPassing", "run", null, null, 2)); } public void runTests() { |