diff --git a/App/lib/core/Gen/Call/CallGenCBuiltin.vp b/App/lib/core/Gen/Call/CallGenCBuiltin.vp index c41c144..04476ad 100644 --- a/App/lib/core/Gen/Call/CallGenCBuiltin.vp +++ b/App/lib/core/Gen/Call/CallGenCBuiltin.vp @@ -670,6 +670,16 @@ novirtual class CallGenCBuiltin(CallGenBase.CallGenBase): if mod_nm2.id is not None and string.strcmp(mod_nm2.id, "ASM_DESCR") == 0: return self._resolve_register(at.attr) return "" + # 裸枚举名(不带 ASM_DESCR. / t. 前缀):`op=[CLOBBER_MEMORY, CLOBBER_RAX]`。 + # 只有确实解析成 ASM_DESCR 成员时才接受(_resolve_register 对未知名给不出非空串), + # 否则返回空串交由调用方按"未知约束"处理,避免把普通变量名误当约束串。 + if k == ast.ASTKind.Name: + nm_b: ast.Name* = ast.Name*(node) + if nm_b.id is not None: + rs_b: str = self._resolve_register(nm_b.id) + if rs_b is not None and rs_b[0] != '\0': return rs_b + return "" + # Constant: string constant if k == ast.ASTKind.Constant: cn: ast.Constant* = ast.Constant*(node)