Mercurial > hg > truffle
comparison src/cpu/sparc/vm/templateInterpreter_sparc.cpp @ 10393:603ca7e51354
8010460: Interpreter on some platforms loads ConstMethod::_max_stack and misses extra stack slots for JSR 292
Summary: ConstMethod::max_stack() doesn't account for JSR 292 appendix.
Reviewed-by: kvn
author | roland |
---|---|
date | Wed, 24 Apr 2013 11:49:38 +0200 |
parents | aeaca88565e6 |
children | 836a62f43af9 46c544b8fbfc |
comparison
equal
deleted
inserted
replaced
10392:c07dd9be16e8 | 10393:603ca7e51354 |
---|---|
505 | 505 |
506 int rounded_vm_local_words = round_to( frame::interpreter_frame_vm_local_words, WordsPerLong ); | 506 int rounded_vm_local_words = round_to( frame::interpreter_frame_vm_local_words, WordsPerLong ); |
507 | 507 |
508 const int extra_space = | 508 const int extra_space = |
509 rounded_vm_local_words + // frame local scratch space | 509 rounded_vm_local_words + // frame local scratch space |
510 //6815692//Method::extra_stack_words() + // extra push slots for MH adapters | 510 Method::extra_stack_entries() + // extra stack for jsr 292 |
511 frame::memory_parameter_word_sp_offset + // register save area | 511 frame::memory_parameter_word_sp_offset + // register save area |
512 (native_call ? frame::interpreter_frame_extra_outgoing_argument_words : 0); | 512 (native_call ? frame::interpreter_frame_extra_outgoing_argument_words : 0); |
513 | 513 |
514 const Register Glocals_size = G3; | 514 const Register Glocals_size = G3; |
515 const Register RconstMethod = Glocals_size; | 515 const Register RconstMethod = Glocals_size; |
1556 // callee_locals and max_stack are counts, not the size in frame. | 1556 // callee_locals and max_stack are counts, not the size in frame. |
1557 const int locals_size = | 1557 const int locals_size = |
1558 round_to(callee_extra_locals * Interpreter::stackElementWords, WordsPerLong); | 1558 round_to(callee_extra_locals * Interpreter::stackElementWords, WordsPerLong); |
1559 const int max_stack_words = max_stack * Interpreter::stackElementWords; | 1559 const int max_stack_words = max_stack * Interpreter::stackElementWords; |
1560 return (round_to((max_stack_words | 1560 return (round_to((max_stack_words |
1561 //6815692//+ Method::extra_stack_words() | |
1562 + rounded_vm_local_words | 1561 + rounded_vm_local_words |
1563 + frame::memory_parameter_word_sp_offset), WordsPerLong) | 1562 + frame::memory_parameter_word_sp_offset), WordsPerLong) |
1564 // already rounded | 1563 // already rounded |
1565 + locals_size + monitor_size); | 1564 + locals_size + monitor_size); |
1566 } | 1565 } |