Mercurial > hg > graal-jvmci-8
comparison src/share/vm/adlc/formssel.cpp @ 4120:f03a3c8bd5e5
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: twisti, never
author | roland |
---|---|
date | Wed, 14 Sep 2011 09:22:51 +0200 |
parents | ae839d1e7d4c |
children | 1dc233a8c7fe |
comparison
equal
deleted
inserted
replaced
4119:7793051af7d6 | 4120:f03a3c8bd5e5 |
---|---|
29 //------------------------------InstructForm----------------------------------- | 29 //------------------------------InstructForm----------------------------------- |
30 InstructForm::InstructForm(const char *id, bool ideal_only) | 30 InstructForm::InstructForm(const char *id, bool ideal_only) |
31 : _ident(id), _ideal_only(ideal_only), | 31 : _ident(id), _ideal_only(ideal_only), |
32 _localNames(cmpstr, hashstr, Form::arena), | 32 _localNames(cmpstr, hashstr, Form::arena), |
33 _effects(cmpstr, hashstr, Form::arena), | 33 _effects(cmpstr, hashstr, Form::arena), |
34 _is_mach_constant(false) | 34 _is_mach_constant(false), |
35 _has_call(false) | |
35 { | 36 { |
36 _ftype = Form::INS; | 37 _ftype = Form::INS; |
37 | 38 |
38 _matrule = NULL; | 39 _matrule = NULL; |
39 _insencode = NULL; | 40 _insencode = NULL; |
60 | 61 |
61 InstructForm::InstructForm(const char *id, InstructForm *instr, MatchRule *rule) | 62 InstructForm::InstructForm(const char *id, InstructForm *instr, MatchRule *rule) |
62 : _ident(id), _ideal_only(false), | 63 : _ident(id), _ideal_only(false), |
63 _localNames(instr->_localNames), | 64 _localNames(instr->_localNames), |
64 _effects(instr->_effects), | 65 _effects(instr->_effects), |
65 _is_mach_constant(false) | 66 _is_mach_constant(false), |
67 _has_call(false) | |
66 { | 68 { |
67 _ftype = Form::INS; | 69 _ftype = Form::INS; |
68 | 70 |
69 _matrule = rule; | 71 _matrule = rule; |
70 _insencode = instr->_insencode; | 72 _insencode = instr->_insencode; |
1752 if(!strcmp(name, "USE_DEF")) return Component::USE_DEF; | 1754 if(!strcmp(name, "USE_DEF")) return Component::USE_DEF; |
1753 if(!strcmp(name, "KILL")) return Component::KILL; | 1755 if(!strcmp(name, "KILL")) return Component::KILL; |
1754 if(!strcmp(name, "USE_KILL")) return Component::USE_KILL; | 1756 if(!strcmp(name, "USE_KILL")) return Component::USE_KILL; |
1755 if(!strcmp(name, "TEMP")) return Component::TEMP; | 1757 if(!strcmp(name, "TEMP")) return Component::TEMP; |
1756 if(!strcmp(name, "INVALID")) return Component::INVALID; | 1758 if(!strcmp(name, "INVALID")) return Component::INVALID; |
1759 if(!strcmp(name, "CALL")) return Component::CALL; | |
1757 assert( false,"Invalid effect name specified\n"); | 1760 assert( false,"Invalid effect name specified\n"); |
1758 return Component::INVALID; | 1761 return Component::INVALID; |
1759 } | 1762 } |
1760 | 1763 |
1761 Effect::Effect(const char *name) : _name(name), _use_def(effect_lookup(name)) { | 1764 Effect::Effect(const char *name) : _name(name), _use_def(effect_lookup(name)) { |