bind/compiler/
test_lib.rs

1// Copyright 2024 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use crate::compiler::{Symbol, SymbolicInstruction, SymbolicInstructionInfo};
6
7pub fn make_abort_ne_symbinst<'a>(lhs: Symbol, rhs: Symbol) -> SymbolicInstructionInfo<'a> {
8    SymbolicInstructionInfo {
9        location: None,
10        instruction: SymbolicInstruction::AbortIfNotEqual { lhs: lhs, rhs: rhs },
11    }
12}
13
14pub fn make_abort_eq_symbinst<'a>(lhs: Symbol, rhs: Symbol) -> SymbolicInstructionInfo<'a> {
15    SymbolicInstructionInfo {
16        location: None,
17        instruction: SymbolicInstruction::AbortIfEqual { lhs: lhs, rhs: rhs },
18    }
19}