comparison src/cpu/x86/vm/x86_32.ad @ 4114:6729bbc1fcd6

7003454: order constants in constant table by number of references in code Reviewed-by: kvn, never, bdelsart
author twisti
date Wed, 16 Nov 2011 01:39:50 -0800
parents d8cb48376797
children db2e64ca2d5a
comparison
equal deleted inserted replaced
4113:8c57262447d3 4114:6729bbc1fcd6
505 } 505 }
506 } 506 }
507 507
508 508
509 //============================================================================= 509 //=============================================================================
510 const bool Matcher::constant_table_absolute_addressing = true;
511 const RegMask& MachConstantBaseNode::_out_RegMask = RegMask::Empty; 510 const RegMask& MachConstantBaseNode::_out_RegMask = RegMask::Empty;
511
512 int Compile::ConstantTable::calculate_table_base_offset() const {
513 return 0; // absolute addressing, no offset
514 }
512 515
513 void MachConstantBaseNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const { 516 void MachConstantBaseNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const {
514 // Empty encoding 517 // Empty encoding
515 } 518 }
516 519
637 masm.stop("Stack is not properly aligned!"); 640 masm.stop("Stack is not properly aligned!");
638 masm.bind(L); 641 masm.bind(L);
639 } 642 }
640 #endif 643 #endif
641 644
645 if (C->has_mach_constant_base_node()) {
646 // NOTE: We set the table base offset here because users might be
647 // emitted before MachConstantBaseNode.
648 Compile::ConstantTable& constant_table = C->constant_table();
649 constant_table.set_table_base_offset(constant_table.calculate_table_base_offset());
650 }
642 } 651 }
643 652
644 uint MachPrologNode::size(PhaseRegAlloc *ra_) const { 653 uint MachPrologNode::size(PhaseRegAlloc *ra_) const {
645 return MachNode::size(ra_); // too many variables; just compute it the hard way 654 return MachNode::size(ra_); // too many variables; just compute it the hard way
646 } 655 }