Mercurial > hg > truffle
comparison src/share/vm/opto/chaitin.cpp @ 419:0bf25c4807f9
6761594: framesize rounding code rounds using wrong units leading to slightly oversized frames
Reviewed-by: rasbold, kvn
author | never |
---|---|
date | Thu, 06 Nov 2008 20:00:03 -0800 |
parents | ea18057223c4 |
children | 96964ebdb154 |
comparison
equal
deleted
inserted
replaced
418:72c5366e5d86 | 419:0bf25c4807f9 |
---|---|
438 _framesize = C->out_preserve_stack_slots(); | 438 _framesize = C->out_preserve_stack_slots(); |
439 else _framesize = _max_reg -_matcher._new_SP; | 439 else _framesize = _max_reg -_matcher._new_SP; |
440 assert((int)(_matcher._new_SP+_framesize) >= (int)_matcher._out_arg_limit, "framesize must be large enough"); | 440 assert((int)(_matcher._new_SP+_framesize) >= (int)_matcher._out_arg_limit, "framesize must be large enough"); |
441 | 441 |
442 // This frame must preserve the required fp alignment | 442 // This frame must preserve the required fp alignment |
443 const int stack_alignment_in_words = Matcher::stack_alignment_in_slots(); | 443 _framesize = round_to(_framesize, Matcher::stack_alignment_in_slots()); |
444 if (stack_alignment_in_words > 0) | |
445 _framesize = round_to(_framesize, Matcher::stack_alignment_in_bytes()); | |
446 assert( _framesize >= 0 && _framesize <= 1000000, "sanity check" ); | 444 assert( _framesize >= 0 && _framesize <= 1000000, "sanity check" ); |
447 #ifndef PRODUCT | 445 #ifndef PRODUCT |
448 _total_framesize += _framesize; | 446 _total_framesize += _framesize; |
449 if( (int)_framesize > _max_framesize ) | 447 if( (int)_framesize > _max_framesize ) |
450 _max_framesize = _framesize; | 448 _max_framesize = _framesize; |