| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 | 478 |
| 479 F0 f = FUNCTION_CAST<F0>(code->entry()); | 479 F0 f = FUNCTION_CAST<F0>(code->entry()); |
| 480 int res = f(); | 480 int res = f(); |
| 481 args.GetReturnValue().Set(v8::Integer::New(res)); | 481 args.GetReturnValue().Set(v8::Integer::New(res)); |
| 482 } | 482 } |
| 483 | 483 |
| 484 | 484 |
| 485 TEST(StackAlignmentForSSE2) { | 485 TEST(StackAlignmentForSSE2) { |
| 486 CHECK_EQ(0, OS::ActivationFrameAlignment() % 16); | 486 CHECK_EQ(0, OS::ActivationFrameAlignment() % 16); |
| 487 | 487 |
| 488 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 488 v8::Isolate* isolate = CcTest::isolate(); |
| 489 v8::HandleScope handle_scope(isolate); | 489 v8::HandleScope handle_scope(isolate); |
| 490 v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New(); | 490 v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New(); |
| 491 global_template->Set(v8_str("do_sse2"), v8::FunctionTemplate::New(DoSSE2)); | 491 global_template->Set(v8_str("do_sse2"), v8::FunctionTemplate::New(DoSSE2)); |
| 492 | 492 |
| 493 LocalContext env(NULL, global_template); | 493 LocalContext env(NULL, global_template); |
| 494 CompileRun( | 494 CompileRun( |
| 495 "function foo(vec) {" | 495 "function foo(vec) {" |
| 496 " return do_sse2(vec);" | 496 " return do_sse2(vec);" |
| 497 "}"); | 497 "}"); |
| 498 | 498 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 511 | 511 |
| 512 // The mask should be 0b1000. | 512 // The mask should be 0b1000. |
| 513 CHECK_EQ(8, result->Int32Value()); | 513 CHECK_EQ(8, result->Int32Value()); |
| 514 } | 514 } |
| 515 | 515 |
| 516 #undef ELEMENT_COUNT | 516 #undef ELEMENT_COUNT |
| 517 #endif // __GNUC__ | 517 #endif // __GNUC__ |
| 518 | 518 |
| 519 | 519 |
| 520 #undef __ | 520 #undef __ |
| OLD | NEW |