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 3913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3924 ExternalReference::handle_scope_limit_address(isolate()), | 3924 ExternalReference::handle_scope_limit_address(isolate()), |
3925 next_address); | 3925 next_address); |
3926 const int kLevelOffset = AddressOffset( | 3926 const int kLevelOffset = AddressOffset( |
3927 ExternalReference::handle_scope_level_address(isolate()), | 3927 ExternalReference::handle_scope_level_address(isolate()), |
3928 next_address); | 3928 next_address); |
3929 | 3929 |
3930 ASSERT(function_address.is(a1) || function_address.is(a2)); | 3930 ASSERT(function_address.is(a1) || function_address.is(a2)); |
3931 | 3931 |
3932 Label profiler_disabled; | 3932 Label profiler_disabled; |
3933 Label end_profiler_check; | 3933 Label end_profiler_check; |
3934 bool* is_profiling_flag = | 3934 li(t9, Operand(ExternalReference::is_profiling_address(isolate()))); |
3935 isolate()->cpu_profiler()->is_profiling_address(); | |
3936 STATIC_ASSERT(sizeof(*is_profiling_flag) == 1); | |
3937 li(t9, reinterpret_cast<int32_t>(is_profiling_flag)); | |
3938 lb(t9, MemOperand(t9, 0)); | 3935 lb(t9, MemOperand(t9, 0)); |
3939 Branch(&profiler_disabled, eq, t9, Operand(zero_reg)); | 3936 Branch(&profiler_disabled, eq, t9, Operand(zero_reg)); |
3940 | 3937 |
3941 // Additional parameter is the address of the actual callback. | 3938 // Additional parameter is the address of the actual callback. |
3942 li(t9, Operand(thunk_ref)); | 3939 li(t9, Operand(thunk_ref)); |
3943 jmp(&end_profiler_check); | 3940 jmp(&end_profiler_check); |
3944 | 3941 |
3945 bind(&profiler_disabled); | 3942 bind(&profiler_disabled); |
3946 mov(t9, function_address); | 3943 mov(t9, function_address); |
3947 bind(&end_profiler_check); | 3944 bind(&end_profiler_check); |
(...skipping 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5774 } | 5771 } |
5775 if (ms.shift() > 0) sra(result, result, ms.shift()); | 5772 if (ms.shift() > 0) sra(result, result, ms.shift()); |
5776 srl(at, dividend, 31); | 5773 srl(at, dividend, 31); |
5777 Addu(result, result, Operand(at)); | 5774 Addu(result, result, Operand(at)); |
5778 } | 5775 } |
5779 | 5776 |
5780 | 5777 |
5781 } } // namespace v8::internal | 5778 } } // namespace v8::internal |
5782 | 5779 |
5783 #endif // V8_TARGET_ARCH_MIPS | 5780 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |