|
Lines 4978-4994
Link Here
|
| 4978 |
emit_stloc_ir (MonoCompile *cfg, MonoInst **sp, MonoMethodHeader *header, int n) |
4978 |
emit_stloc_ir (MonoCompile *cfg, MonoInst **sp, MonoMethodHeader *header, int n) |
| 4979 |
{ |
4979 |
{ |
| 4980 |
MonoInst *ins; |
4980 |
MonoInst *ins; |
| 4981 |
guint32 opcode = mono_type_to_regmove (cfg, header->locals [n]); |
4981 |
EMIT_NEW_LOCSTORE (cfg, ins, n, *sp); |
| 4982 |
if ((opcode == OP_MOVE) && ((sp [0]->opcode == OP_ICONST) || (sp [0]->opcode == OP_I8CONST))) { |
|
|
| 4983 |
/* Optimize reg-reg moves away */ |
| 4984 |
/* |
| 4985 |
* Can't optimize other opcodes, since sp[0] might point to |
| 4986 |
* the last ins of a decomposed opcode. |
| 4987 |
*/ |
| 4988 |
sp [0]->dreg = (cfg)->locals [n]->dreg; |
| 4989 |
} else { |
| 4990 |
EMIT_NEW_LOCSTORE (cfg, ins, n, *sp); |
| 4991 |
} |
| 4992 |
} |
4982 |
} |
| 4993 |
|
4983 |
|
| 4994 |
/* |
4984 |
/* |