Mercurial > hg > truffle
comparison src/cpu/x86/vm/x86_64.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 |
---|---|
841 __ nop(); // (target for branch to avoid branch to branch) | 841 __ nop(); // (target for branch to avoid branch to branch) |
842 } | 842 } |
843 | 843 |
844 | 844 |
845 //============================================================================= | 845 //============================================================================= |
846 const bool Matcher::constant_table_absolute_addressing = true; | |
847 const RegMask& MachConstantBaseNode::_out_RegMask = RegMask::Empty; | 846 const RegMask& MachConstantBaseNode::_out_RegMask = RegMask::Empty; |
847 | |
848 int Compile::ConstantTable::calculate_table_base_offset() const { | |
849 return 0; // absolute addressing, no offset | |
850 } | |
848 | 851 |
849 void MachConstantBaseNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const { | 852 void MachConstantBaseNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const { |
850 // Empty encoding | 853 // Empty encoding |
851 } | 854 } |
852 | 855 |
975 masm.jcc(Assembler::equal, L); | 978 masm.jcc(Assembler::equal, L); |
976 masm.stop("Stack is not properly aligned!"); | 979 masm.stop("Stack is not properly aligned!"); |
977 masm.bind(L); | 980 masm.bind(L); |
978 } | 981 } |
979 #endif | 982 #endif |
983 | |
984 if (C->has_mach_constant_base_node()) { | |
985 // NOTE: We set the table base offset here because users might be | |
986 // emitted before MachConstantBaseNode. | |
987 Compile::ConstantTable& constant_table = C->constant_table(); | |
988 constant_table.set_table_base_offset(constant_table.calculate_table_base_offset()); | |
989 } | |
980 } | 990 } |
981 | 991 |
982 uint MachPrologNode::size(PhaseRegAlloc* ra_) const | 992 uint MachPrologNode::size(PhaseRegAlloc* ra_) const |
983 { | 993 { |
984 return MachNode::size(ra_); // too many variables; just compute it | 994 return MachNode::size(ra_); // too many variables; just compute it |