xo-expression: + operator >=

This commit is contained in:
Roland Conybeare 2025-07-27 18:57:48 -04:00
commit 7d220ede27
5 changed files with 43 additions and 3 deletions

View file

@ -37,6 +37,11 @@ extern "C" {
return x > y;
}
bool
cmp_ge2_i64(std::int64_t x, std::int64_t y) {
return x >= y;
}
std::int64_t
add2_i64(std::int64_t x, std::int64_t y) {
return x + y;
@ -150,6 +155,20 @@ namespace xo {
return s_retval;
}
auto
Primitive_cmp_i64::make_cmp_ge2_i64() -> rp<PrimitiveType>
{
static rp<PrimitiveType> s_retval;
if (!s_retval)
s_retval = Primitive::make("cmp_ge2_i64",
&cmp_ge2_i64,
true /*explicit_symbol_def*/,
llvmintrinsic::i_sge);
return s_retval;
}
/* TODO: remaining integer arithmetic */
auto