| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 __ Load(r3, MemOperand(sp, 0 * kPointerSize), Representation::Integer16()); | 117 __ Load(r3, MemOperand(sp, 0 * kPointerSize), Representation::Integer16()); |
| 118 __ cmp(r3, r2); | 118 __ cmp(r3, r2); |
| 119 __ b(ne, &exit); | 119 __ b(ne, &exit); |
| 120 | 120 |
| 121 __ mov(r0, Operand(0)); // Success. | 121 __ mov(r0, Operand(0)); // Success. |
| 122 __ bind(&exit); | 122 __ bind(&exit); |
| 123 __ add(sp, sp, Operand(1 * kPointerSize)); | 123 __ add(sp, sp, Operand(1 * kPointerSize)); |
| 124 __ bx(lr); | 124 __ bx(lr); |
| 125 | 125 |
| 126 CodeDesc desc; | 126 CodeDesc desc; |
| 127 masm->GetCode(&desc); | 127 masm->GetCode(isolate, &desc); |
| 128 Handle<Code> code = isolate->factory()->NewCode( | 128 Handle<Code> code = isolate->factory()->NewCode( |
| 129 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 129 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 130 | 130 |
| 131 // Call the function from C++. | 131 // Call the function from C++. |
| 132 F5 f = FUNCTION_CAST<F5>(code->entry()); | 132 F5 f = FUNCTION_CAST<F5>(code->entry()); |
| 133 CHECK(!CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); | 133 CHECK(!CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0)); |
| 134 } | 134 } |
| 135 | 135 |
| 136 TEST(ExtractLane) { | 136 TEST(ExtractLane) { |
| 137 if (!CpuFeatures::IsSupported(NEON)) return; | 137 if (!CpuFeatures::IsSupported(NEON)) return; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 __ ExtractLane(r5, d30, NeonS8, i); | 227 __ ExtractLane(r5, d30, NeonS8, i); |
| 228 __ str(r5, MemOperand(r0, offsetof(T, i8x16_high_d) + 4 * i)); | 228 __ str(r5, MemOperand(r0, offsetof(T, i8x16_high_d) + 4 * i)); |
| 229 __ ExtractLane(r5, d31, NeonS8, i); | 229 __ ExtractLane(r5, d31, NeonS8, i); |
| 230 __ str(r5, MemOperand(r0, offsetof(T, i8x16_high_d) + 4 * (i + 8))); | 230 __ str(r5, MemOperand(r0, offsetof(T, i8x16_high_d) + 4 * (i + 8))); |
| 231 } | 231 } |
| 232 } | 232 } |
| 233 | 233 |
| 234 __ ldm(ia_w, sp, r4.bit() | r5.bit() | pc.bit()); | 234 __ ldm(ia_w, sp, r4.bit() | r5.bit() | pc.bit()); |
| 235 | 235 |
| 236 CodeDesc desc; | 236 CodeDesc desc; |
| 237 masm->GetCode(&desc); | 237 masm->GetCode(isolate, &desc); |
| 238 Handle<Code> code = isolate->factory()->NewCode( | 238 Handle<Code> code = isolate->factory()->NewCode( |
| 239 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 239 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 240 #ifdef DEBUG | 240 #ifdef DEBUG |
| 241 OFStream os(stdout); | 241 OFStream os(stdout); |
| 242 code->Print(os); | 242 code->Print(os); |
| 243 #endif | 243 #endif |
| 244 F3 f = FUNCTION_CAST<F3>(code->entry()); | 244 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 245 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); | 245 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); |
| 246 USE(dummy); | 246 USE(dummy); |
| 247 for (int i = 0; i < 4; i++) { | 247 for (int i = 0; i < 4; i++) { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 __ mov(r4, Operand(-i)); | 362 __ mov(r4, Operand(-i)); |
| 363 __ ReplaceLane(q14, q14, r4, NeonS8, i); | 363 __ ReplaceLane(q14, q14, r4, NeonS8, i); |
| 364 } | 364 } |
| 365 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, i8x16_high)))); | 365 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, i8x16_high)))); |
| 366 __ vst1(Neon8, NeonListOperand(q14), NeonMemOperand(r4)); | 366 __ vst1(Neon8, NeonListOperand(q14), NeonMemOperand(r4)); |
| 367 } | 367 } |
| 368 | 368 |
| 369 __ ldm(ia_w, sp, r4.bit() | r5.bit() | r6.bit() | r7.bit() | pc.bit()); | 369 __ ldm(ia_w, sp, r4.bit() | r5.bit() | r6.bit() | r7.bit() | pc.bit()); |
| 370 | 370 |
| 371 CodeDesc desc; | 371 CodeDesc desc; |
| 372 masm->GetCode(&desc); | 372 masm->GetCode(isolate, &desc); |
| 373 Handle<Code> code = isolate->factory()->NewCode( | 373 Handle<Code> code = isolate->factory()->NewCode( |
| 374 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 374 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 375 #ifdef DEBUG | 375 #ifdef DEBUG |
| 376 OFStream os(stdout); | 376 OFStream os(stdout); |
| 377 code->Print(os); | 377 code->Print(os); |
| 378 #endif | 378 #endif |
| 379 F3 f = FUNCTION_CAST<F3>(code->entry()); | 379 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 380 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); | 380 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); |
| 381 USE(dummy); | 381 USE(dummy); |
| 382 for (int i = 0; i < 4; i++) { | 382 for (int i = 0; i < 4; i++) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 397 for (int i = 0; i < 8; i++) { | 397 for (int i = 0; i < 8; i++) { |
| 398 CHECK_EQ(-i, t.i16x8_high[i]); | 398 CHECK_EQ(-i, t.i16x8_high[i]); |
| 399 } | 399 } |
| 400 for (int i = 0; i < 16; i++) { | 400 for (int i = 0; i < 16; i++) { |
| 401 CHECK_EQ(-i, t.i8x16_high[i]); | 401 CHECK_EQ(-i, t.i8x16_high[i]); |
| 402 } | 402 } |
| 403 } | 403 } |
| 404 } | 404 } |
| 405 | 405 |
| 406 #undef __ | 406 #undef __ |
| OLD | NEW |