summaryrefslogtreecommitdiffstats
path: root/test/416-optimizing-arith-not
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2014-11-11 12:26:26 +0000
committerRoland Levillain <rpl@google.com>2014-11-11 12:26:26 +0000
commit647b96f29cb81832e698f863884fdba06674c9de (patch)
tree1a4b5d9c2dc0cec47387838eb33b55b01838b615 /test/416-optimizing-arith-not
parent666c732cfa211abf44ed90120a87bf8c18138e55 (diff)
downloadart-647b96f29cb81832e698f863884fdba06674c9de.zip
art-647b96f29cb81832e698f863884fdba06674c9de.tar.gz
art-647b96f29cb81832e698f863884fdba06674c9de.tar.bz2
Add support for long-to-int in the optimizing compiler.
- Add support for the long-to-int Dex instruction in the optimizing compiler. - Generate x86, x86-64 and ARM (but not ARM64) code for long-to-int HTypeConversion nodes. - Add related tests to test/422-type-conversion. - Also fix comments in test/415-optimizing-arith-neg and in test/416-optimizing-arith-not. Change-Id: I3084af30f2a495d178362ae1154dc7ceb7bf3a58
Diffstat (limited to 'test/416-optimizing-arith-not')
-rw-r--r--test/416-optimizing-arith-not/src/Main.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/416-optimizing-arith-not/src/Main.java b/test/416-optimizing-arith-not/src/Main.java
index 26e206c..44c7d3c 100644
--- a/test/416-optimizing-arith-not/src/Main.java
+++ b/test/416-optimizing-arith-not/src/Main.java
@@ -40,10 +40,10 @@ public class Main {
expectEquals(0, smaliNotInt(-1));
expectEquals(-1, smaliNotInt(0));
expectEquals(-2, smaliNotInt(1));
- expectEquals(2147483647, smaliNotInt(-2147483648)); // (2^31) - 1
- expectEquals(2147483646, smaliNotInt(-2147483647)); // (2^31) - 2
- expectEquals(-2147483647, smaliNotInt(2147483646)); // -(2^31) - 1
- expectEquals(-2147483648, smaliNotInt(2147483647)); // -(2^31)
+ expectEquals(2147483647, smaliNotInt(-2147483648)); // -(2^31)
+ expectEquals(2147483646, smaliNotInt(-2147483647)); // -(2^31 - 1)
+ expectEquals(-2147483647, smaliNotInt(2147483646)); // 2^31 - 2
+ expectEquals(-2147483648, smaliNotInt(2147483647)); // 2^31 - 1
}
private static void notLong() throws Exception {
@@ -51,14 +51,14 @@ public class Main {
expectEquals(0L, smaliNotLong(-1L));
expectEquals(-1L, smaliNotLong(0L));
expectEquals(-2L, smaliNotLong(1L));
- expectEquals(2147483647L, smaliNotLong(-2147483648L)); // (2^31) - 1
- expectEquals(2147483646L, smaliNotLong(-2147483647L)); // (2^31) - 2
- expectEquals(-2147483647L, smaliNotLong(2147483646L)); // -(2^31) - 1
- expectEquals(-2147483648L, smaliNotLong(2147483647L)); // -(2^31)
- expectEquals(9223372036854775807L, smaliNotLong(-9223372036854775808L)); // (2^63) - 1
- expectEquals(9223372036854775806L, smaliNotLong(-9223372036854775807L)); // (2^63) - 2
- expectEquals(-9223372036854775807L, smaliNotLong(9223372036854775806L)); // -(2^63) - 1
- expectEquals(-9223372036854775808L, smaliNotLong(9223372036854775807L)); // -(2^63)
+ expectEquals(2147483647L, smaliNotLong(-2147483648L)); // -(2^31)
+ expectEquals(2147483646L, smaliNotLong(-2147483647L)); // -(2^31 - 1)
+ expectEquals(-2147483647L, smaliNotLong(2147483646L)); // 2^31 - 2
+ expectEquals(-2147483648L, smaliNotLong(2147483647L)); // 2^31 - 1
+ expectEquals(9223372036854775807L, smaliNotLong(-9223372036854775808L)); // -(2^63)
+ expectEquals(9223372036854775806L, smaliNotLong(-9223372036854775807L)); // -(2^63 - 1)
+ expectEquals(-9223372036854775807L, smaliNotLong(9223372036854775806L)); // 2^63 - 2
+ expectEquals(-9223372036854775808L, smaliNotLong(9223372036854775807L)); // 2^63 - 1
}
// Wrappers around methods located in file not.smali.