From 8d4d1785291394436e461ebe73c1b0e424811a31 Mon Sep 17 00:00:00 2001 From: Diogo Behrens Date: Fri, 25 Aug 2023 11:23:31 +0200 Subject: [PATCH] fix return type of cmpxchg to be I1 instead of I8 Resolves #230. Signed-off-by: Diogo Behrens --- asm/inst_memory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asm/inst_memory.go b/asm/inst_memory.go index 431e4103..1fcc2eed 100644 --- a/asm/inst_memory.go +++ b/asm/inst_memory.go @@ -44,7 +44,7 @@ func (fgen *funcGen) newCmpXchgInst(ident ir.LocalIdent, old *ast.CmpXchgInst) ( if err != nil { return nil, errors.WithStack(err) } - typ := types.NewStruct(oldType, types.I8) + typ := types.NewStruct(oldType, types.I1) return &ir.InstCmpXchg{LocalIdent: ident, Typ: typ}, nil }