aboutsummaryrefslogtreecommitdiff
path: root/py/asmarm.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-09-15 16:39:24 +0100
committerDamien George <damien.p.george@gmail.com>2014-09-15 16:39:24 +0100
commitd4a799f152a4823fe15003f2db908801fb84533c (patch)
tree754515e452e9c215dc6de5718be78eafe7ed209c /py/asmarm.c
parentb92cbe612913a7c9d066c34912a3f77fe6392b2b (diff)
py: Make asm_arm_less_op take destination register as first arg.
This gets ARM native emitter working againg and addresses issue #858.
Diffstat (limited to 'py/asmarm.c')
-rw-r--r--py/asmarm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/py/asmarm.c b/py/asmarm.c
index da9f40920..e1d4d84d9 100644
--- a/py/asmarm.c
+++ b/py/asmarm.c
@@ -287,10 +287,10 @@ void asm_arm_cmp_reg_reg(asm_arm_t *as, uint rd, uint rn) {
emit_al(as, 0x1500000 | (rd << 16) | rn);
}
-void asm_arm_less_op(asm_arm_t *as, uint rd, uint rn) {
- asm_arm_cmp_reg_reg(as, rd, rn); // cmp rd, rn
- emit(as, asm_arm_op_mov_imm(REG_RET, 1) | ARM_CC_LT); // movlt REG_RET, #1
- emit(as, asm_arm_op_mov_imm(REG_RET, 0) | ARM_CC_GE); // movge REG_RET, #0
+void asm_arm_less_op(asm_arm_t *as, uint rd, uint rn, uint rm) {
+ asm_arm_cmp_reg_reg(as, rn, rm); // cmp rn, rm
+ emit(as, asm_arm_op_mov_imm(rd, 1) | ARM_CC_LT); // movlt rd, #1
+ emit(as, asm_arm_op_mov_imm(rd, 0) | ARM_CC_GE); // movge rd, #0
}
void asm_arm_add_reg(asm_arm_t *as, uint rd, uint rn, uint rm) {