< prev index next >

src/share/vm/adlc/formssel.cpp

Print this page
rev 12113 : 8166561: [s390] Adaptions needed for s390 port in C1 and C2.


 705   assert(USE_of_memory >= DEF_of_memory, "unpaired memory DEF");
 706   USE_of_memory -= DEF_of_memory;   // treat paired DEF/USE as one occurrence
 707   if( (USE_of_memory + DEF_of_memory) > 0 ) {
 708     if( is_simple_chain_rule(globals) ) {
 709       //fprintf(stderr, "Warning: chain rule is not really a memory user.\n");
 710       //((InstructForm*)this)->dump();
 711       // Preceding code prints nothing on sparc and these insns on intel:
 712       // leaP8 leaP32 leaPIdxOff leaPIdxScale leaPIdxScaleOff leaP8 leaP32
 713       // leaPIdxOff leaPIdxScale leaPIdxScaleOff
 714       return NO_MEMORY_OPERAND;
 715     }
 716 
 717     if( DEF_of_memory == 1 ) {
 718       assert(unique != NULL, "");
 719       if( USE_of_memory == 0 ) {
 720         // unique def, no uses
 721       } else {
 722         // // unique def, some uses
 723         // // must return bottom unless all uses match def
 724         // unique = NULL;





 725       }
 726     } else if( DEF_of_memory > 0 ) {
 727       // multiple defs, don't care about uses
 728       unique = NULL;
 729     } else if( USE_of_memory == 1) {
 730       // unique use, no defs
 731       assert(unique != NULL, "");
 732     } else if( USE_of_memory > 0 ) {
 733       // multiple uses, no defs
 734       unique = NULL;
 735     } else {
 736       assert(false, "bad case analysis");
 737     }
 738     // process the unique DEF or USE, if there is one
 739     if( unique == NULL ) {
 740       return MANY_MEMORY_OPERANDS;
 741     } else {
 742       int pos = components.operand_position(unique->_name);
 743       if( unique->isa(Component::DEF) ) {
 744         pos += 1;                // get corresponding USE from DEF




 705   assert(USE_of_memory >= DEF_of_memory, "unpaired memory DEF");
 706   USE_of_memory -= DEF_of_memory;   // treat paired DEF/USE as one occurrence
 707   if( (USE_of_memory + DEF_of_memory) > 0 ) {
 708     if( is_simple_chain_rule(globals) ) {
 709       //fprintf(stderr, "Warning: chain rule is not really a memory user.\n");
 710       //((InstructForm*)this)->dump();
 711       // Preceding code prints nothing on sparc and these insns on intel:
 712       // leaP8 leaP32 leaPIdxOff leaPIdxScale leaPIdxScaleOff leaP8 leaP32
 713       // leaPIdxOff leaPIdxScale leaPIdxScaleOff
 714       return NO_MEMORY_OPERAND;
 715     }
 716 
 717     if( DEF_of_memory == 1 ) {
 718       assert(unique != NULL, "");
 719       if( USE_of_memory == 0 ) {
 720         // unique def, no uses
 721       } else {
 722         // // unique def, some uses
 723         // // must return bottom unless all uses match def
 724         // unique = NULL;
 725 #ifdef S390
 726         // This case is important for move instructions on s390x.
 727         // On other platforms (e.g. x86), all uses always match the def.
 728         unique = NULL;
 729 #endif
 730       }
 731     } else if( DEF_of_memory > 0 ) {
 732       // multiple defs, don't care about uses
 733       unique = NULL;
 734     } else if( USE_of_memory == 1) {
 735       // unique use, no defs
 736       assert(unique != NULL, "");
 737     } else if( USE_of_memory > 0 ) {
 738       // multiple uses, no defs
 739       unique = NULL;
 740     } else {
 741       assert(false, "bad case analysis");
 742     }
 743     // process the unique DEF or USE, if there is one
 744     if( unique == NULL ) {
 745       return MANY_MEMORY_OPERANDS;
 746     } else {
 747       int pos = components.operand_position(unique->_name);
 748       if( unique->isa(Component::DEF) ) {
 749         pos += 1;                // get corresponding USE from DEF


< prev index next >