From 397f8745cecf85eb149f7676e28b5b5aa9038b16 Mon Sep 17 00:00:00 2001 From: dzaima Date: Mon, 27 Feb 2023 23:51:35 +0200 Subject: [PATCH] go back to regular completions if no system commands match --- src/main.c | 4 ++++ src/singeli/src/transpose.singeli | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index e99e5a5d..07e08da8 100644 --- a/src/main.c +++ b/src/main.c @@ -258,6 +258,7 @@ static bool isCmd(char* s, char** e, const char* cmd) { we = chars+IA(inpB); mode = 3; } else { + not_cmd:; we = chars+IA(inpB); ws = rskip_name(chars, we); u32 last = ws>chars? *(ws-1) : 0; @@ -270,6 +271,7 @@ static bool isCmd(char* s, char** e, const char* cmd) { } usz wl = *dist = we-ws; + bool failedCmd = mode==3; if (wl>0) { usz wo = ws-chars; bool doUpper = false; @@ -308,6 +310,7 @@ static bool isCmd(char* s, char** e, const char* cmd) { } if (matchState) { + failedCmd = false; usz ext = matchLen-skip; assert(ext<100); u32* rp; B r = m_c32arrv(&rp, wl + ext); @@ -333,6 +336,7 @@ static bool isCmd(char* s, char** e, const char* cmd) { } decG(norm); if (mode==1) decG(reg); + if (failedCmd) goto not_cmd; } dec(inpB); diff --git a/src/singeli/src/transpose.singeli b/src/singeli/src/transpose.singeli index 6df2ce26..1511fe85 100644 --- a/src/singeli/src/transpose.singeli +++ b/src/singeli/src/transpose.singeli @@ -56,8 +56,8 @@ transpose{T}(r0:*void, x0:*void, w:u64, h:u64) : void = { # hm:= h/8 # transpose_rec{T}(rp, xp, w, h, i64~~wm, i64~~hm, tern{wm>hm, wm, hm}) - if (w%8) emit{void, 'base_transpose_u32', rp+h*(w-w%8), xp+(w-w%8), w%8, h, w, h} - if (h%8) emit{void, 'base_transpose_u32', rp+(h-h%8), xp+w*(h-h%8), w-w%8, h%8, w, h} + if (w%8) emit{void, 'base_transpose_u32', rp+h*(w-w%8), xp+ (w-w%8), w%8, h, w, h} + if (h%8) emit{void, 'base_transpose_u32', rp+ (h-h%8), xp+w*(h-h%8), w-w%8, h%8, w, h} } 'simd_transpose_i32' = transpose{u32} \ No newline at end of file