Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: src/arm/codegen-arm.cc

Issue 354028: Fix xssue 492: ARM debug crash: mozilla/ecma/FunctionObjects/15.3.1.1-3... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | test/mjsunit/regress/regress-492.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // Add a label for checking the size of the code used for returning. 324 // Add a label for checking the size of the code used for returning.
325 Label check_exit_codesize; 325 Label check_exit_codesize;
326 masm_->bind(&check_exit_codesize); 326 masm_->bind(&check_exit_codesize);
327 327
328 // Tear down the frame which will restore the caller's frame pointer and 328 // Tear down the frame which will restore the caller's frame pointer and
329 // the link register. 329 // the link register.
330 frame_->Exit(); 330 frame_->Exit();
331 331
332 // Here we use masm_-> instead of the __ macro to avoid the code coverage 332 // Here we use masm_-> instead of the __ macro to avoid the code coverage
333 // tool from instrumenting as we rely on the code size here. 333 // tool from instrumenting as we rely on the code size here.
334 masm_->add(sp, sp, Operand((scope_->num_parameters() + 1) * kPointerSize)); 334 int32_t sp_delta = (scope_->num_parameters() + 1) * kPointerSize;
335 masm_->add(sp, sp, Operand(sp_delta));
335 masm_->Jump(lr); 336 masm_->Jump(lr);
336 337
337 // Check that the size of the code used for returning matches what is 338 // Check that the size of the code used for returning matches what is
338 // expected by the debugger. 339 // expected by the debugger. The add instruction above is an addressing
339 ASSERT_EQ(kJSReturnSequenceLength, 340 // mode 1 instruction where there are restrictions on which immediate values
341 // can be encoded in the instruction and which immediate values requires
342 // use of an additional instruction for moving the immediate to a temporary
343 // register.
344 #ifdef DEBUG
345 int expected_return_sequence_length = kJSReturnSequenceLength;
346 if (!masm_->ImmediateFitsAddrMode1Instruction(sp_delta)) {
347 // Additional mov instruction generated.
348 expected_return_sequence_length++;
349 }
350 ASSERT_EQ(expected_return_sequence_length,
340 masm_->InstructionsGeneratedSince(&check_exit_codesize)); 351 masm_->InstructionsGeneratedSince(&check_exit_codesize));
352 #endif
341 } 353 }
342 354
343 // Code generation state must be reset. 355 // Code generation state must be reset.
344 ASSERT(!has_cc()); 356 ASSERT(!has_cc());
345 ASSERT(state_ == NULL); 357 ASSERT(state_ == NULL);
346 ASSERT(!function_return_is_shadowed_); 358 ASSERT(!function_return_is_shadowed_);
347 function_return_.Unuse(); 359 function_return_.Unuse();
348 DeleteFrame(); 360 DeleteFrame();
349 361
350 // Process any deferred code using the register allocator. 362 // Process any deferred code using the register allocator.
(...skipping 5892 matching lines...) Expand 10 before | Expand all | Expand 10 after
6243 int CompareStub::MinorKey() { 6255 int CompareStub::MinorKey() {
6244 // Encode the two parameters in a unique 16 bit value. 6256 // Encode the two parameters in a unique 16 bit value.
6245 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); 6257 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15));
6246 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); 6258 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0);
6247 } 6259 }
6248 6260
6249 6261
6250 #undef __ 6262 #undef __
6251 6263
6252 } } // namespace v8::internal 6264 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | test/mjsunit/regress/regress-492.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698