src/share/vm/adlc/formssel.cpp
Print this page
rev 2647 : 7077312: Provide a CALL effect for instruct declaration in the ad file
Summary: abstracted way to declare that the MachNode has the effect of a call (kills caller save registers, preserves callee save registers)
Reviewed-by:
@@ -29,11 +29,12 @@
//------------------------------InstructForm-----------------------------------
InstructForm::InstructForm(const char *id, bool ideal_only)
: _ident(id), _ideal_only(ideal_only),
_localNames(cmpstr, hashstr, Form::arena),
_effects(cmpstr, hashstr, Form::arena),
- _is_mach_constant(false)
+ _is_mach_constant(false),
+ _has_call(false)
{
_ftype = Form::INS;
_matrule = NULL;
_insencode = NULL;
@@ -60,11 +61,12 @@
InstructForm::InstructForm(const char *id, InstructForm *instr, MatchRule *rule)
: _ident(id), _ideal_only(false),
_localNames(instr->_localNames),
_effects(instr->_effects),
- _is_mach_constant(false)
+ _is_mach_constant(false),
+ _has_call(false)
{
_ftype = Form::INS;
_matrule = rule;
_insencode = instr->_insencode;
@@ -1752,10 +1754,11 @@
if(!strcmp(name, "USE_DEF")) return Component::USE_DEF;
if(!strcmp(name, "KILL")) return Component::KILL;
if(!strcmp(name, "USE_KILL")) return Component::USE_KILL;
if(!strcmp(name, "TEMP")) return Component::TEMP;
if(!strcmp(name, "INVALID")) return Component::INVALID;
+ if(!strcmp(name, "CALL")) return Component::CALL;
assert( false,"Invalid effect name specified\n");
return Component::INVALID;
}
Effect::Effect(const char *name) : _name(name), _use_def(effect_lookup(name)) {