diff --git a/examples/short-circuit.psl b/examples/short-circuit.psl index bad56ff..cd2176f 100644 --- a/examples/short-circuit.psl +++ b/examples/short-circuit.psl @@ -1,9 +1,9 @@ -func g() -> u32: +func g() -> u16: return g() func h() -> bool: return h() -func test() -> u32: - return (!1u) || g() +func test() -> u16: + return 65535us || g() diff --git a/libs/jit/source/arch/aarch64/compiler.cpp b/libs/jit/source/arch/aarch64/compiler.cpp index 8165df4..3ce274a 100644 --- a/libs/jit/source/arch/aarch64/compiler.cpp +++ b/libs/jit/source/arch/aarch64/compiler.cpp @@ -480,7 +480,9 @@ namespace pslang::jit::aarch64 break; case ast::binary_operation_type::logical_or: { - builder.or_not_reg(31, 0, 1); + set_m1(1); + extend(1, arg1_type); + builder.xor_reg(0, 1, 1); std::int32_t start = pcontext.code.size(); builder.cbz(1, 0); push(0);