| 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 3942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3953 | 3953 |
| 3954 | 3954 |
| 3955 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { | 3955 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { |
| 3956 return ref0.address() - ref1.address(); | 3956 return ref0.address() - ref1.address(); |
| 3957 } | 3957 } |
| 3958 | 3958 |
| 3959 | 3959 |
| 3960 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, | 3960 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, |
| 3961 int stack_space) { | 3961 int stack_space) { |
| 3962 ExternalReference next_address = | 3962 ExternalReference next_address = |
| 3963 ExternalReference::handle_scope_next_address(); | 3963 ExternalReference::handle_scope_next_address(isolate()); |
| 3964 const int kNextOffset = 0; | 3964 const int kNextOffset = 0; |
| 3965 const int kLimitOffset = AddressOffset( | 3965 const int kLimitOffset = AddressOffset( |
| 3966 ExternalReference::handle_scope_limit_address(), | 3966 ExternalReference::handle_scope_limit_address(isolate()), |
| 3967 next_address); | 3967 next_address); |
| 3968 const int kLevelOffset = AddressOffset( | 3968 const int kLevelOffset = AddressOffset( |
| 3969 ExternalReference::handle_scope_level_address(), | 3969 ExternalReference::handle_scope_level_address(isolate()), |
| 3970 next_address); | 3970 next_address); |
| 3971 | 3971 |
| 3972 // Allocate HandleScope in callee-save registers. | 3972 // Allocate HandleScope in callee-save registers. |
| 3973 li(s3, Operand(next_address)); | 3973 li(s3, Operand(next_address)); |
| 3974 lw(s0, MemOperand(s3, kNextOffset)); | 3974 lw(s0, MemOperand(s3, kNextOffset)); |
| 3975 lw(s1, MemOperand(s3, kLimitOffset)); | 3975 lw(s1, MemOperand(s3, kLimitOffset)); |
| 3976 lw(s2, MemOperand(s3, kLevelOffset)); | 3976 lw(s2, MemOperand(s3, kLevelOffset)); |
| 3977 Addu(s2, s2, Operand(1)); | 3977 Addu(s2, s2, Operand(1)); |
| 3978 sw(s2, MemOperand(s3, kLevelOffset)); | 3978 sw(s2, MemOperand(s3, kLevelOffset)); |
| 3979 | 3979 |
| (...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5531 opcode == BGTZL); | 5531 opcode == BGTZL); |
| 5532 opcode = (cond == eq) ? BEQ : BNE; | 5532 opcode = (cond == eq) ? BEQ : BNE; |
| 5533 instr = (instr & ~kOpcodeMask) | opcode; | 5533 instr = (instr & ~kOpcodeMask) | opcode; |
| 5534 masm_.emit(instr); | 5534 masm_.emit(instr); |
| 5535 } | 5535 } |
| 5536 | 5536 |
| 5537 | 5537 |
| 5538 } } // namespace v8::internal | 5538 } } // namespace v8::internal |
| 5539 | 5539 |
| 5540 #endif // V8_TARGET_ARCH_MIPS | 5540 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |