| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 // Add a label for checking the size of the code used for returning. | 217 // Add a label for checking the size of the code used for returning. |
| 218 Label check_exit_codesize; | 218 Label check_exit_codesize; |
| 219 masm_->bind(&check_exit_codesize); | 219 masm_->bind(&check_exit_codesize); |
| 220 #endif | 220 #endif |
| 221 // Make sure that the constant pool is not emitted inside of the return | 221 // Make sure that the constant pool is not emitted inside of the return |
| 222 // sequence. | 222 // sequence. |
| 223 { Assembler::BlockConstPoolScope block_const_pool(masm_); | 223 { Assembler::BlockConstPoolScope block_const_pool(masm_); |
| 224 // Here we use masm_-> instead of the __ macro to avoid the code coverage | 224 // Here we use masm_-> instead of the __ macro to avoid the code coverage |
| 225 // tool from instrumenting as we rely on the code size here. | 225 // tool from instrumenting as we rely on the code size here. |
| 226 int32_t sp_delta = (scope()->num_parameters() + 1) * kPointerSize; | 226 int32_t sp_delta = (scope()->num_parameters() + 1) * kPointerSize; |
| 227 CodeGenerator::RecordPositions(masm_, function()->end_position()); | 227 CodeGenerator::RecordPositions(masm_, function()->end_position() - 1); |
| 228 __ RecordJSReturn(); | 228 __ RecordJSReturn(); |
| 229 masm_->mov(sp, fp); | 229 masm_->mov(sp, fp); |
| 230 masm_->ldm(ia_w, sp, fp.bit() | lr.bit()); | 230 masm_->ldm(ia_w, sp, fp.bit() | lr.bit()); |
| 231 masm_->add(sp, sp, Operand(sp_delta)); | 231 masm_->add(sp, sp, Operand(sp_delta)); |
| 232 masm_->Jump(lr); | 232 masm_->Jump(lr); |
| 233 } | 233 } |
| 234 | 234 |
| 235 #ifdef DEBUG | 235 #ifdef DEBUG |
| 236 // Check that the size of the code used for returning matches what is | 236 // Check that the size of the code used for returning matches what is |
| 237 // expected by the debugger. If the sp_delts above cannot be encoded in the | 237 // expected by the debugger. If the sp_delts above cannot be encoded in the |
| (...skipping 2931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3169 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 3169 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
| 3170 __ add(pc, r1, Operand(masm_->CodeObject())); | 3170 __ add(pc, r1, Operand(masm_->CodeObject())); |
| 3171 } | 3171 } |
| 3172 | 3172 |
| 3173 | 3173 |
| 3174 #undef __ | 3174 #undef __ |
| 3175 | 3175 |
| 3176 } } // namespace v8::internal | 3176 } } // namespace v8::internal |
| 3177 | 3177 |
| 3178 #endif // V8_TARGET_ARCH_ARM | 3178 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |