aboutsummaryrefslogtreecommitdiff
path: root/src/regalloc.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-04-09 20:32:48 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-04-09 20:32:48 +0300
commit9295e8f445dae6431f8e7c543eb8c374742b136d (patch)
treed85bbc15fb8d23089d4f5eeae44eececaaa9a2ee /src/regalloc.c
parent0f8532d4e7315b86e160abf4ced461e7678b5587 (diff)
downloadqbt-9295e8f445dae6431f8e7c543eb8c374742b136d.tar.gz
qbt-9295e8f445dae6431f8e7c543eb8c374742b136d.zip
add constant value to some instructions
Diffstat (limited to 'src/regalloc.c')
-rw-r--r--src/regalloc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/regalloc.c b/src/regalloc.c
index 9c4d87e..f5157fe 100644
--- a/src/regalloc.c
+++ b/src/regalloc.c
@@ -447,7 +447,9 @@ static size_t do_call_saves(struct blk *b, struct vec *lifetimes, struct vec *rm
continue;
struct insn save = insn_create(SAVE, NOTYPE,
- noclass(), r, imm_val(counter, I27));
+ noclass(), r,
+ imm_val(counter, I27), 0);
+
insn_insert_before_call(b, save, call_pos + offset - 1);
offset++;
counter++;
@@ -465,7 +467,9 @@ static size_t do_call_saves(struct blk *b, struct vec *lifetimes, struct vec *rm
/* hmm, restore should maybe put r as its output to be
* more consistent... */
struct insn restore = insn_create(RESTORE, NOTYPE,
- noclass(), r, imm_val(counter, I27));
+ noclass(), r,
+ imm_val(counter, I27), 0);
+
insn_insert_after_call(b, restore, call_pos - 1);
counter++;
offset++;