From 49b9b92790ba6541776720a70a3f6bf2a67955b5 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Fri, 22 Aug 2025 15:01:59 +0800 Subject: [PATCH] ci/instr:fix asmFull return type to match function signature when no output --- cl/instr.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cl/instr.go b/cl/instr.go index 34e9c65a..9a39b7e4 100644 --- a/cl/instr.go +++ b/cl/instr.go @@ -151,14 +151,13 @@ func (p *context) asm(b llssa.Builder, args []ssa.Value) (ret llssa.Expr) { log.Printf("asm: %q -> %q, constraints: %q", asmString, finalAsm, constraintStr) } - var retType llssa.Type - if hasOutput { - retType = b.Prog.Uintptr() - } else { - retType = b.Prog.Void() + if !hasOutput { + // Make sure we return something valid + b.InlineAsmFull(finalAsm, constraintStr, b.Prog.Void(), inputValues) + return b.Prog.Val((uintptr(0))) } - return b.InlineAsmFull(finalAsm, constraintStr, retType, inputValues) + return b.InlineAsmFull(finalAsm, constraintStr, b.Prog.Uintptr(), inputValues) } // -----------------------------------------------------------------------------