Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: runtime/vm/assembler_mips_test.cc

Issue 1425143003: VM: Improve and fix double negation on MIPS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_mips_test.cc
diff --git a/runtime/vm/assembler_mips_test.cc b/runtime/vm/assembler_mips_test.cc
index 552aa601f4d2a41129c4d4663d5188d44819cf35..f23fe934b18be4775e93f875d0cf481f75ec0af6 100644
--- a/runtime/vm/assembler_mips_test.cc
+++ b/runtime/vm/assembler_mips_test.cc
@@ -1639,6 +1639,21 @@ ASSEMBLER_TEST_RUN(Movd, test) {
}
+ASSEMBLER_TEST_GENERATE(Negd, assembler) {
+ __ LoadImmediate(D1, 1.0);
+ __ negd(D0, D1);
+ __ Ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Negd, test) {
+ typedef double (*SimpleCode)() DART_UNUSED;
+ EXPECT(test != NULL);
+ double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry());
+ EXPECT_FLOAT_EQ(-1.0, res, 0.001);
+}
+
+
ASSEMBLER_TEST_GENERATE(Sdc1Ldc1, assembler) {
__ mov(T0, SP);
__ AddImmediate(SP, -3 * kWordSize);

Powered by Google App Engine
This is Rietveld 408576698