OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4622 __ nop(); | 4622 __ nop(); |
4623 | 4623 |
4624 CodeDesc desc; | 4624 CodeDesc desc; |
4625 assm.GetCode(&desc); | 4625 assm.GetCode(&desc); |
4626 Handle<Code> code = isolate->factory()->NewCode( | 4626 Handle<Code> code = isolate->factory()->NewCode( |
4627 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 4627 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
4628 | 4628 |
4629 F2 f = FUNCTION_CAST<F2>(code->entry()); | 4629 F2 f = FUNCTION_CAST<F2>(code->entry()); |
4630 | 4630 |
4631 uint64_t res = reinterpret_cast<uint64_t>( | 4631 uint64_t res = reinterpret_cast<uint64_t>( |
4632 CALL_GENERATED_CODE(isolate, f, rs_value, rt_value, 0, 0, 0)); | 4632 CALL_GENERATED_CODE(isolate, f, static_cast<int>(rs_value), |
4633 static_cast<int>(rt_value), 0, 0, 0)); | |
balazs.kilvady
2015/12/02 18:49:07
If F2 function type (with int params) is used abov
ivica.bogosavljevic
2015/12/03 10:36:24
Acknowledged.
| |
4633 | 4634 |
4634 return res; | 4635 return res; |
4635 } | 4636 } |
4636 | 4637 |
4637 | 4638 |
4638 TEST(r6_align) { | 4639 TEST(r6_align) { |
4639 if (kArchVariant == kMips64r6) { | 4640 if (kArchVariant == kMips64r6) { |
4640 CcTest::InitializeVM(); | 4641 CcTest::InitializeVM(); |
4641 | 4642 |
4642 struct TestCaseAlign { | 4643 struct TestCaseAlign { |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5713 __ nop(); | 5714 __ nop(); |
5714 | 5715 |
5715 CodeDesc desc; | 5716 CodeDesc desc; |
5716 assm.GetCode(&desc); | 5717 assm.GetCode(&desc); |
5717 Handle<Code> code = isolate->factory()->NewCode( | 5718 Handle<Code> code = isolate->factory()->NewCode( |
5718 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 5719 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
5719 | 5720 |
5720 F2 f = FUNCTION_CAST<F2>(code->entry()); | 5721 F2 f = FUNCTION_CAST<F2>(code->entry()); |
5721 | 5722 |
5722 uint64_t res = reinterpret_cast<uint64_t>( | 5723 uint64_t res = reinterpret_cast<uint64_t>( |
5723 CALL_GENERATED_CODE(isolate, f, rt_value, 0, 0, 0, 0)); | 5724 CALL_GENERATED_CODE(isolate, f, static_cast<int>(rt_value), 0, 0, 0, 0)); |
5724 | 5725 |
5725 return res; | 5726 return res; |
5726 } | 5727 } |
5727 | 5728 |
5728 | 5729 |
5729 TEST(dsll) { | 5730 TEST(dsll) { |
5730 CcTest::InitializeVM(); | 5731 CcTest::InitializeVM(); |
5731 | 5732 |
5732 struct TestCaseDsll { | 5733 struct TestCaseDsll { |
5733 uint64_t rt_value; | 5734 uint64_t rt_value; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5828 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 5829 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
5829 F2 f = FUNCTION_CAST<F2>(code->entry()); | 5830 F2 f = FUNCTION_CAST<F2>(code->entry()); |
5830 | 5831 |
5831 int64_t res = reinterpret_cast<int64_t>( | 5832 int64_t res = reinterpret_cast<int64_t>( |
5832 CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0)); | 5833 CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0)); |
5833 CHECK_EQ(res, 0); | 5834 CHECK_EQ(res, 0); |
5834 } | 5835 } |
5835 | 5836 |
5836 | 5837 |
5837 #undef __ | 5838 #undef __ |
OLD | NEW |