diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-09-05 22:05:37 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-09-05 22:08:53 -0400 |
commit | 1f4a34212b8ae6410c0af541e28fa99f151658df (patch) | |
tree | 1422e5ccc0b640cc5af3593138a7b53c0c87b858 | |
parent | efbf570de9ea983229b943b1732d74e90ddf00c1 (diff) |
reggroups
-rw-r--r-- | reggroups.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/reggroups.c b/reggroups.c index 5e5479a..9e4592a 100644 --- a/reggroups.c +++ b/reggroups.c @@ -129,7 +129,7 @@ reg_alloc_alloc (reg_alloc_t *ra) * - an internal error in the register allocator has * produced a situation where a register is in used * but no group claims it is loaded. - * - all registers have been allocated in the current group + * - all registers in the current group have been allocated */ for (i = 0; i < MAX_REGISTERS; ++i) { @@ -151,7 +151,17 @@ reg_alloc_alloc (reg_alloc_t *ra) * may be moved to another register */ op_t -reg_alloc_preserve (reg_alloc_t *ra, op_t reg); +reg_alloc_preserve (reg_alloc_t *ra, reg_t reg) +{ + int idx = reg_to_index (ra, reg); + + if (ra->active->allocated[idx]) + { + /* Already allocated in this group, so + * we have to move it somewhere else + */ + } +} void reg_alloc_free (reg_alloc_t *ra, op_t reg); |