ART: Make assembler_test less chatty
Do not save temporaries in case we use a different encoding than
the host assembler.
Bug: 16505797
(cherry picked from commit 54e15de4a3ea869488d50694fa01138901e70c4e)
Change-Id: I9508d9b09d930db70587a69c04bb3c8950339d79
diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h
index 754496b..723d4c5 100644
--- a/compiler/utils/assembler_test.h
+++ b/compiler/utils/assembler_test.h
@@ -356,12 +356,15 @@
} else {
if (DisassembleBinaries(*data, *res.code, test_name)) {
if (data->size() > res.code->size()) {
- LOG(WARNING) << "Assembly code is not identical, but disassembly of machine code is "
- "equal: this implies sub-optimal encoding! Our code size=" << data->size() <<
+ // Fail this test with a fancy colored warning being printed.
+ EXPECT_TRUE(false) << "Assembly code is not identical, but disassembly of machine code "
+ "is equal: this implies sub-optimal encoding! Our code size=" << data->size() <<
", gcc size=" << res.code->size();
} else {
+ // Otherwise just print an info message and clean up.
LOG(INFO) << "GCC chose a different encoding than ours, but the overall length is the "
"same.";
+ Clean(&res);
}
} else {
// This will output the assembly.