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

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

Issue 66553004: Revert "Add signed/unsigned 8-bit and 16-bit Representations to Crankshaft" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « test/cctest/cctest.gyp ('k') | test/cctest/test-macro-assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-macro-assembler-arm.cc
diff --git a/test/cctest/test-macro-assembler-arm.cc b/test/cctest/test-macro-assembler-arm.cc
index 3583945e561bd1a63980d9ee00c01fc3622d8010..77f7abbd44356c7684e90c99cd12d77247a60cba 100644
--- a/test/cctest/test-macro-assembler-arm.cc
+++ b/test/cctest/test-macro-assembler-arm.cc
@@ -132,100 +132,5 @@ TEST(CopyBytes) {
}
-typedef int (*F0)();
-
-
-TEST(LoadAndStoreWithRepresentation) {
- v8::internal::V8::Initialize(NULL);
-
- // Allocate an executable page of memory.
- size_t actual_size;
- byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize,
- &actual_size,
- true));
- CHECK(buffer);
- Isolate* isolate = CcTest::i_isolate();
- HandleScope handles(isolate);
- MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
- MacroAssembler* masm = &assembler; // Create a pointer for the __ macro.
- masm->set_allow_stub_calls(false);
- __ sub(sp, sp, Operand(1 * kPointerSize));
- Label exit;
-
- // Test 1.
- __ mov(r0, Operand(1)); // Test number.
- __ mov(r1, Operand(0));
- __ str(r1, MemOperand(sp, 0 * kPointerSize));
- __ mov(r2, Operand(-1));
- __ Store(r2, MemOperand(sp, 0 * kPointerSize), Representation::UInteger8());
- __ ldr(r3, MemOperand(sp, 0 * kPointerSize));
- __ mov(r2, Operand(255));
- __ cmp(r3, r2);
- __ b(ne, &exit);
- __ mov(r2, Operand(255));
- __ Load(r3, MemOperand(sp, 0 * kPointerSize), Representation::UInteger8());
- __ cmp(r3, r2);
- __ b(ne, &exit);
-
- // Test 2.
- __ mov(r0, Operand(2)); // Test number.
- __ mov(r1, Operand(0));
- __ str(r1, MemOperand(sp, 0 * kPointerSize));
- __ mov(r2, Operand(-1));
- __ Store(r2, MemOperand(sp, 0 * kPointerSize), Representation::Integer8());
- __ ldr(r3, MemOperand(sp, 0 * kPointerSize));
- __ mov(r2, Operand(255));
- __ cmp(r3, r2);
- __ b(ne, &exit);
- __ mov(r2, Operand(-1));
- __ Load(r3, MemOperand(sp, 0 * kPointerSize), Representation::Integer8());
- __ cmp(r3, r2);
- __ b(ne, &exit);
-
- // Test 3.
- __ mov(r0, Operand(3)); // Test number.
- __ mov(r1, Operand(0));
- __ str(r1, MemOperand(sp, 0 * kPointerSize));
- __ mov(r2, Operand(-1));
- __ Store(r2, MemOperand(sp, 0 * kPointerSize), Representation::UInteger16());
- __ ldr(r3, MemOperand(sp, 0 * kPointerSize));
- __ mov(r2, Operand(65535));
- __ cmp(r3, r2);
- __ b(ne, &exit);
- __ mov(r2, Operand(65535));
- __ Load(r3, MemOperand(sp, 0 * kPointerSize), Representation::UInteger16());
- __ cmp(r3, r2);
- __ b(ne, &exit);
-
- // Test 4.
- __ mov(r0, Operand(4)); // Test number.
- __ mov(r1, Operand(0));
- __ str(r1, MemOperand(sp, 0 * kPointerSize));
- __ mov(r2, Operand(-1));
- __ Store(r2, MemOperand(sp, 0 * kPointerSize), Representation::Integer16());
- __ ldr(r3, MemOperand(sp, 0 * kPointerSize));
- __ mov(r2, Operand(65535));
- __ cmp(r3, r2);
- __ b(ne, &exit);
- __ mov(r2, Operand(-1));
- __ Load(r3, MemOperand(sp, 0 * kPointerSize), Representation::Integer16());
- __ cmp(r3, r2);
- __ b(ne, &exit);
-
- __ mov(r0, Operand(0)); // Success.
- __ bind(&exit);
- __ add(sp, sp, Operand(1 * kPointerSize));
- __ bx(lr);
-
- CodeDesc desc;
- masm->GetCode(&desc);
- // Call the function from C++.
-
- F0 f = FUNCTION_CAST<F0>(buffer);
- intptr_t result = reinterpret_cast<intptr_t>(
- CALL_GENERATED_CODE(f, 4, 0, 0, 0, 0));
-
- CHECK_EQ(0, result);
-}
#undef __
« no previous file with comments | « test/cctest/cctest.gyp ('k') | test/cctest/test-macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698