571 return tp->add_offset(Type::OffsetTop); |
571 return tp->add_offset(Type::OffsetTop); |
572 const TypeX *tx = t->is_intptr_t(); |
572 const TypeX *tx = t->is_intptr_t(); |
573 intptr_t txoffset = Type::OffsetBot; |
573 intptr_t txoffset = Type::OffsetBot; |
574 if (tx->is_con()) { // Left input is an add of a constant? |
574 if (tx->is_con()) { // Left input is an add of a constant? |
575 txoffset = tx->get_con(); |
575 txoffset = tx->get_con(); |
576 if (txoffset != (int)txoffset) |
|
577 txoffset = Type::OffsetBot; // oops: add_offset will choke on it |
|
578 } |
576 } |
579 return tp->add_offset(txoffset); |
577 return tp->add_offset(txoffset); |
580 } |
578 } |
581 |
579 |
582 //------------------------------Value------------------------------------------ |
580 //------------------------------Value------------------------------------------ |
593 const TypeX *p2 = t2->is_intptr_t(); |
591 const TypeX *p2 = t2->is_intptr_t(); |
594 // Add 'em |
592 // Add 'em |
595 intptr_t p2offset = Type::OffsetBot; |
593 intptr_t p2offset = Type::OffsetBot; |
596 if (p2->is_con()) { // Left input is an add of a constant? |
594 if (p2->is_con()) { // Left input is an add of a constant? |
597 p2offset = p2->get_con(); |
595 p2offset = p2->get_con(); |
598 if (p2offset != (int)p2offset) |
|
599 p2offset = Type::OffsetBot; // oops: add_offset will choke on it |
|
600 } |
596 } |
601 return p1->add_offset(p2offset); |
597 return p1->add_offset(p2offset); |
602 } |
598 } |
603 |
599 |
604 //------------------------Ideal_base_and_offset-------------------------------- |
600 //------------------------Ideal_base_and_offset-------------------------------- |
673 for ( uint i = 1; i < numopnds; i++ ) { |
669 for ( uint i = 1; i < numopnds; i++ ) { |
674 MachOper *opnd = n->_opnds[i]; |
670 MachOper *opnd = n->_opnds[i]; |
675 // Check for any interesting operand info. |
671 // Check for any interesting operand info. |
676 // In particular, check for both memory and non-memory operands. |
672 // In particular, check for both memory and non-memory operands. |
677 // %%%%% Clean this up: use xadd_offset |
673 // %%%%% Clean this up: use xadd_offset |
678 int con = opnd->constant(); |
674 intptr_t con = opnd->constant(); |
679 if ( con == TypePtr::OffsetBot ) goto bottom_out; |
675 if ( con == TypePtr::OffsetBot ) goto bottom_out; |
680 offset += con; |
676 offset += con; |
681 con = opnd->constant_disp(); |
677 con = opnd->constant_disp(); |
682 if ( con == TypePtr::OffsetBot ) goto bottom_out; |
678 if ( con == TypePtr::OffsetBot ) goto bottom_out; |
683 offset += con; |
679 offset += con; |