comparison src/share/vm/c1/c1_LIR.hpp @ 1816:87b64980e2f1

6972540: sun/nio/ch/SocketChannelImpl compilation crashed when executing CompileTheWorld Reviewed-by: kvn
author never
date Wed, 22 Sep 2010 21:10:46 -0700
parents 3a294e483abc
children f95d63e2154a
comparison
equal deleted inserted replaced
1815:5867d89c129b 1816:87b64980e2f1
278 enum OprType { 278 enum OprType {
279 unknown_type = 0 << type_shift // means: not set (catch uninitialized types) 279 unknown_type = 0 << type_shift // means: not set (catch uninitialized types)
280 , int_type = 1 << type_shift 280 , int_type = 1 << type_shift
281 , long_type = 2 << type_shift 281 , long_type = 2 << type_shift
282 , object_type = 3 << type_shift 282 , object_type = 3 << type_shift
283 , pointer_type = 4 << type_shift 283 , address_type = 4 << type_shift
284 , float_type = 5 << type_shift 284 , float_type = 5 << type_shift
285 , double_type = 6 << type_shift 285 , double_type = 6 << type_shift
286 }; 286 };
287 friend OprType as_OprType(BasicType t); 287 friend OprType as_OprType(BasicType t);
288 friend BasicType as_BasicType(OprType t); 288 friend BasicType as_BasicType(OprType t);
301 case T_BOOLEAN: 301 case T_BOOLEAN:
302 case T_CHAR: 302 case T_CHAR:
303 case T_BYTE: 303 case T_BYTE:
304 case T_SHORT: 304 case T_SHORT:
305 case T_INT: 305 case T_INT:
306 case T_ADDRESS:
306 case T_OBJECT: 307 case T_OBJECT:
307 case T_ARRAY: 308 case T_ARRAY:
308 return single_size; 309 return single_size;
309 break; 310 break;
310 311
454 case T_LONG: return LIR_OprDesc::long_type; 455 case T_LONG: return LIR_OprDesc::long_type;
455 case T_FLOAT: return LIR_OprDesc::float_type; 456 case T_FLOAT: return LIR_OprDesc::float_type;
456 case T_DOUBLE: return LIR_OprDesc::double_type; 457 case T_DOUBLE: return LIR_OprDesc::double_type;
457 case T_OBJECT: 458 case T_OBJECT:
458 case T_ARRAY: return LIR_OprDesc::object_type; 459 case T_ARRAY: return LIR_OprDesc::object_type;
460 case T_ADDRESS: return LIR_OprDesc::address_type;
459 case T_ILLEGAL: // fall through 461 case T_ILLEGAL: // fall through
460 default: ShouldNotReachHere(); return LIR_OprDesc::unknown_type; 462 default: ShouldNotReachHere(); return LIR_OprDesc::unknown_type;
461 } 463 }
462 } 464 }
463 465
466 case LIR_OprDesc::int_type: return T_INT; 468 case LIR_OprDesc::int_type: return T_INT;
467 case LIR_OprDesc::long_type: return T_LONG; 469 case LIR_OprDesc::long_type: return T_LONG;
468 case LIR_OprDesc::float_type: return T_FLOAT; 470 case LIR_OprDesc::float_type: return T_FLOAT;
469 case LIR_OprDesc::double_type: return T_DOUBLE; 471 case LIR_OprDesc::double_type: return T_DOUBLE;
470 case LIR_OprDesc::object_type: return T_OBJECT; 472 case LIR_OprDesc::object_type: return T_OBJECT;
473 case LIR_OprDesc::address_type: return T_ADDRESS;
471 case LIR_OprDesc::unknown_type: // fall through 474 case LIR_OprDesc::unknown_type: // fall through
472 default: ShouldNotReachHere(); return T_ILLEGAL; 475 default: ShouldNotReachHere(); return T_ILLEGAL;
473 } 476 }
474 } 477 }
475 478
548 class LIR_OprFact: public AllStatic { 551 class LIR_OprFact: public AllStatic {
549 public: 552 public:
550 553
551 static LIR_Opr illegalOpr; 554 static LIR_Opr illegalOpr;
552 555
553 static LIR_Opr single_cpu(int reg) { return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) | LIR_OprDesc::int_type | LIR_OprDesc::cpu_register | LIR_OprDesc::single_size); } 556 static LIR_Opr single_cpu(int reg) {
554 static LIR_Opr single_cpu_oop(int reg) { return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) | LIR_OprDesc::object_type | LIR_OprDesc::cpu_register | LIR_OprDesc::single_size); } 557 return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) |
558 LIR_OprDesc::int_type |
559 LIR_OprDesc::cpu_register |
560 LIR_OprDesc::single_size);
561 }
562 static LIR_Opr single_cpu_oop(int reg) {
563 return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) |
564 LIR_OprDesc::object_type |
565 LIR_OprDesc::cpu_register |
566 LIR_OprDesc::single_size);
567 }
568 static LIR_Opr single_cpu_address(int reg) {
569 return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) |
570 LIR_OprDesc::address_type |
571 LIR_OprDesc::cpu_register |
572 LIR_OprDesc::single_size);
573 }
555 static LIR_Opr double_cpu(int reg1, int reg2) { 574 static LIR_Opr double_cpu(int reg1, int reg2) {
556 LP64_ONLY(assert(reg1 == reg2, "must be identical")); 575 LP64_ONLY(assert(reg1 == reg2, "must be identical"));
557 return (LIR_Opr)(intptr_t)((reg1 << LIR_OprDesc::reg1_shift) | 576 return (LIR_Opr)(intptr_t)((reg1 << LIR_OprDesc::reg1_shift) |
558 (reg2 << LIR_OprDesc::reg2_shift) | 577 (reg2 << LIR_OprDesc::reg2_shift) |
559 LIR_OprDesc::long_type | 578 LIR_OprDesc::long_type |
631 LIR_OprDesc::cpu_register | 650 LIR_OprDesc::cpu_register |
632 LIR_OprDesc::single_size | 651 LIR_OprDesc::single_size |
633 LIR_OprDesc::virtual_mask); 652 LIR_OprDesc::virtual_mask);
634 break; 653 break;
635 654
655 case T_ADDRESS:
656 res = (LIR_Opr)(intptr_t)((index << LIR_OprDesc::data_shift) |
657 LIR_OprDesc::address_type |
658 LIR_OprDesc::cpu_register |
659 LIR_OprDesc::single_size |
660 LIR_OprDesc::virtual_mask);
661 break;
662
636 case T_LONG: 663 case T_LONG:
637 res = (LIR_Opr)(intptr_t)((index << LIR_OprDesc::data_shift) | 664 res = (LIR_Opr)(intptr_t)((index << LIR_OprDesc::data_shift) |
638 LIR_OprDesc::long_type | 665 LIR_OprDesc::long_type |
639 LIR_OprDesc::cpu_register | 666 LIR_OprDesc::cpu_register |
640 LIR_OprDesc::double_size | 667 LIR_OprDesc::double_size |
715 break; 742 break;
716 743
717 case T_INT: 744 case T_INT:
718 res = (LIR_Opr)(intptr_t)((index << LIR_OprDesc::data_shift) | 745 res = (LIR_Opr)(intptr_t)((index << LIR_OprDesc::data_shift) |
719 LIR_OprDesc::int_type | 746 LIR_OprDesc::int_type |
747 LIR_OprDesc::stack_value |
748 LIR_OprDesc::single_size);
749 break;
750
751 case T_ADDRESS:
752 res = (LIR_Opr)(intptr_t)((index << LIR_OprDesc::data_shift) |
753 LIR_OprDesc::address_type |
720 LIR_OprDesc::stack_value | 754 LIR_OprDesc::stack_value |
721 LIR_OprDesc::single_size); 755 LIR_OprDesc::single_size);
722 break; 756 break;
723 757
724 case T_LONG: 758 case T_LONG: