aboutsummaryrefslogtreecommitdiffstats
path: root/creole.c
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2023-02-11 20:51:03 +0000
committerGravatar Peter McGoron 2023-02-11 20:51:03 +0000
commit70720b8a1610a9e8dc43a9735af43b4a481153e9 (patch)
tree28475d2edcce9214a9e8e2e2714f7bd1215735e4 /creole.c
parentadd signed division IDIV (diff)
rename idiv to sdiv
Diffstat (limited to 'creole.c')
-rw-r--r--creole.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/creole.c b/creole.c
index 8865939..135576f 100644
--- a/creole.c
+++ b/creole.c
@@ -35,7 +35,7 @@ static const struct {
defop(ADD, 3, TYPE_REG, TYPE_VAL, TYPE_VAL),
defop(MUL, 3, TYPE_REG, TYPE_VAL, TYPE_VAL),
defop(DIV, 3, TYPE_REG, TYPE_VAL, TYPE_VAL),
- defop(IDIV, 3, TYPE_REG, TYPE_VAL, TYPE_VAL),
+ defop(SDIV, 3, TYPE_REG, TYPE_VAL, TYPE_VAL),
defop(JL, 3, TYPE_LAB, TYPE_VAL, TYPE_VAL),
defop(CLB, 1, TYPE_LAB, TYPE_NONE, TYPE_NONE),
defop(SYS, 1, TYPE_VAL, TYPE_NONE, TYPE_NONE)
@@ -548,7 +548,7 @@ enum creole_run_ret creole_step(struct creole_env *env, creole_word *sc)
return CREOLE_DIV_BY_ZERO;
check(creole_reg_write(env, ins->w[0], a1 / a2));
break;
- case CREOLE_IDIV:
+ case CREOLE_SDIV:
check(read_val(env, ins, 1, &a1));
check(read_val(env, ins, 2, &a2));
if (a2 == 0)