From c0cdef2e447aa9acf7494d4968151aaebc601955 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Fri, 25 Feb 2022 11:09:04 +0100 Subject: rv64: cosmetics in isel --- rv64/isel.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/rv64/isel.c b/rv64/isel.c index bb6fb02..e441597 100644 --- a/rv64/isel.c +++ b/rv64/isel.c @@ -3,8 +3,11 @@ static int memarg(Ref *r, int op, Ins *i) { - return ((isload(op) || op == Ocall) && r == &i->arg[0]) - || (isstore(op) && r == &i->arg[1]); + if (isload(op) || op == Ocall) + return r == &i->arg[0]; + if (isstore(op)) + return r == &i->arg[1]; + return 0; } static int @@ -28,8 +31,8 @@ fixarg(Ref *r, int k, Ins *i, Fn *fn) c = &fn->con[r0.val]; if (c->type == CAddr && memarg(r, op, i)) break; - if (c->type == CBits && immarg(r, op, i) - && -2048 <= c->bits.i && c->bits.i < 2048) + if (c->type == CBits && immarg(r, op, i)) + if (-2048 <= c->bits.i && c->bits.i < 2048) break; r1 = newtmp("isel", k, fn); if (KBASE(k) == 1) { @@ -131,7 +134,7 @@ selcmp(Ins i, int k, int op, Fn *fn) break; case NCmpI+Cfuo: negate(&i.to, fn); - /* fallthrough */ + /* fall through */ case NCmpI+Cfo: r0 = newtmp("isel", i.cls, fn); r1 = newtmp("isel", i.cls, fn); -- cgit 1.4.1