919 // Add parameters that "do not appear in match rule". |
919 // Add parameters that "do not appear in match rule". |
920 bool has_temp = false; |
920 bool has_temp = false; |
921 const char *name; |
921 const char *name; |
922 const char *kill_name = NULL; |
922 const char *kill_name = NULL; |
923 for (_parameters.reset(); (name = _parameters.iter()) != NULL;) { |
923 for (_parameters.reset(); (name = _parameters.iter()) != NULL;) { |
924 OperandForm *opForm = (OperandForm*)_localNames[name]; |
924 OpClassForm *opForm = _localNames[name]->is_opclass(); |
|
925 assert(opForm != NULL, "sanity"); |
925 |
926 |
926 Effect* e = NULL; |
927 Effect* e = NULL; |
927 { |
928 { |
928 const Form* form = _effects[name]; |
929 const Form* form = _effects[name]; |
929 e = form ? form->is_effect() : NULL; |
930 e = form ? form->is_effect() : NULL; |
936 // uses so their operand numbering must directly follow the real |
937 // uses so their operand numbering must directly follow the real |
937 // inputs from the match rule. Fixing the numbering seems |
938 // inputs from the match rule. Fixing the numbering seems |
938 // complex so simply enforce the restriction during parse. |
939 // complex so simply enforce the restriction during parse. |
939 if (kill_name != NULL && |
940 if (kill_name != NULL && |
940 e->isa(Component::TEMP) && !e->isa(Component::DEF)) { |
941 e->isa(Component::TEMP) && !e->isa(Component::DEF)) { |
941 OperandForm* kill = (OperandForm*)_localNames[kill_name]; |
942 OpClassForm* kill = _localNames[kill_name]->is_opclass(); |
|
943 assert(kill != NULL, "sanity"); |
942 globalAD->syntax_err(_linenum, "%s: %s %s must be at the end of the argument list\n", |
944 globalAD->syntax_err(_linenum, "%s: %s %s must be at the end of the argument list\n", |
943 _ident, kill->_ident, kill_name); |
945 _ident, kill->_ident, kill_name); |
944 } else if (e->isa(Component::KILL) && !e->isa(Component::USE)) { |
946 } else if (e->isa(Component::KILL) && !e->isa(Component::USE)) { |
945 kill_name = name; |
947 kill_name = name; |
946 } |
948 } |
2337 if (_matrule) _matrule->append_components(_localNames, _components); |
2339 if (_matrule) _matrule->append_components(_localNames, _components); |
2338 |
2340 |
2339 // Add parameters that "do not appear in match rule". |
2341 // Add parameters that "do not appear in match rule". |
2340 const char *name; |
2342 const char *name; |
2341 for (_parameters.reset(); (name = _parameters.iter()) != NULL;) { |
2343 for (_parameters.reset(); (name = _parameters.iter()) != NULL;) { |
2342 OperandForm *opForm = (OperandForm*)_localNames[name]; |
2344 OpClassForm *opForm = _localNames[name]->is_opclass(); |
|
2345 assert(opForm != NULL, "sanity"); |
2343 |
2346 |
2344 if ( _components.operand_position(name) == -1 ) { |
2347 if ( _components.operand_position(name) == -1 ) { |
2345 _components.insert(name, opForm->_ident, Component::INVALID, false); |
2348 _components.insert(name, opForm->_ident, Component::INVALID, false); |
2346 } |
2349 } |
2347 } |
2350 } |