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

Unified Diff: test/cctest/test-assembler-arm.cc

Issue 1974903002: [arm] Clean up handling of usat. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-assembler-arm.cc
diff --git a/test/cctest/test-assembler-arm.cc b/test/cctest/test-assembler-arm.cc
index 78cba516ee6448b452bf8ee3b04c66921051903c..cf404b0ebd3550342d4c7c30d17b6d16c9c2e89f 100644
--- a/test/cctest/test-assembler-arm.cc
+++ b/test/cctest/test-assembler-arm.cc
@@ -412,29 +412,26 @@ TEST(6) {
Assembler assm(isolate, NULL, 0);
- if (CpuFeatures::IsSupported(ARMv7)) {
- CpuFeatureScope scope(&assm, ARMv7);
- __ usat(r1, 8, Operand(r0)); // Sat 0xFFFF to 0-255 = 0xFF.
- __ usat(r2, 12, Operand(r0, ASR, 9)); // Sat (0xFFFF>>9) to 0-4095 = 0x7F.
- __ usat(r3, 1, Operand(r0, LSL, 16)); // Sat (0xFFFF<<16) to 0-1 = 0x0.
- __ add(r0, r1, Operand(r2));
- __ add(r0, r0, Operand(r3));
- __ mov(pc, Operand(lr));
+ __ usat(r1, 8, Operand(r0)); // Sat 0xFFFF to 0-255 = 0xFF.
+ __ usat(r2, 12, Operand(r0, ASR, 9)); // Sat (0xFFFF>>9) to 0-4095 = 0x7F.
+ __ usat(r3, 1, Operand(r0, LSL, 16)); // Sat (0xFFFF<<16) to 0-1 = 0x0.
+ __ add(r0, r1, Operand(r2));
+ __ add(r0, r0, Operand(r3));
+ __ mov(pc, Operand(lr));
- CodeDesc desc;
- assm.GetCode(&desc);
- Handle<Code> code = isolate->factory()->NewCode(
- desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
#ifdef DEBUG
- OFStream os(stdout);
- code->Print(os);
+ OFStream os(stdout);
+ code->Print(os);
#endif
- F1 f = FUNCTION_CAST<F1>(code->entry());
- int res = reinterpret_cast<int>(
- CALL_GENERATED_CODE(isolate, f, 0xFFFF, 0, 0, 0, 0));
- ::printf("f() = %d\n", res);
- CHECK_EQ(382, res);
- }
+ F1 f = FUNCTION_CAST<F1>(code->entry());
+ int res = reinterpret_cast<int>(
+ CALL_GENERATED_CODE(isolate, f, 0xFFFF, 0, 0, 0, 0));
+ ::printf("f() = %d\n", res);
+ CHECK_EQ(382, res);
}
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698