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

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

Issue 2313803003: [turbofan] ARM: Implement vswp and use in gap resolver (Closed)
Patch Set: Fix git's broken rebase Created 4 years, 3 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/compiler/arm/code-generator-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 383cc138e30544c653b6cceafb237edc59a5dece..6f4124e4c5dde589871dc892593a39ff74daf669 100644
--- a/test/cctest/test-assembler-arm.cc
+++ b/test/cctest/test-assembler-arm.cc
@@ -2889,6 +2889,55 @@ TEST(unaligned_stores) {
}
}
+TEST(vswp) {
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+ Assembler assm(isolate, NULL, 0);
+
+ typedef struct {
+ double result0;
+ double result1;
+ double result2;
+ double result3;
+ } T;
+ T t;
+
+ __ vmov(d0, 1.0);
+ __ vmov(d1, -1.0);
+ __ vswp(d0, d1);
+ __ vstr(d0, r0, offsetof(T, result0));
+ __ vstr(d1, r0, offsetof(T, result1));
+
+ if (CpuFeatures::IsSupported(VFP32DREGS)) {
+ __ vmov(d30, 1.0);
+ __ vmov(d31, -1.0);
+ __ vswp(d30, d31);
+ __ vstr(d30, r0, offsetof(T, result2));
+ __ vstr(d31, r0, offsetof(T, result3));
+ }
+
+ __ bx(lr);
+
+ 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);
+#endif
+ F3 f = FUNCTION_CAST<F3>(code->entry());
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
+ USE(dummy);
+ CHECK_EQ(-1.0, t.result0);
+ CHECK_EQ(1.0, t.result1);
+ if (CpuFeatures::IsSupported(VFP32DREGS)) {
+ CHECK_EQ(-1.0, t.result2);
+ CHECK_EQ(1.0, t.result3);
+ }
+}
+
TEST(regress4292_b) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698