From 90c93ec3cf18b96a9e70464f2b549c9bace1bbe4 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 16 Jan 2024 22:11:05 +0300 Subject: [PATCH] liboppc: introduce oppc.h header --- src/liboppc/oppc.h | 1131 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1131 insertions(+) create mode 100644 src/liboppc/oppc.h diff --git a/src/liboppc/oppc.h b/src/liboppc/oppc.h new file mode 100644 index 00000000..d19b3aed --- /dev/null +++ b/src/liboppc/oppc.h @@ -0,0 +1,1131 @@ +#pragma once + +#include +#include +#include + +struct oppc_value { + uint32_t flags; + uint32_t size; + uint64_t data[2]; +}; + +enum oppc_attr_tag { + OPPC_ATTR_FPSCR_RN, + OPPC_ATTR_FPSCR_XX, + OPPC_ATTR_FPSCR_FPRF, + OPPC_ATTR_FPSCR_FR, + OPPC_ATTR_FPSCR_FI, + OPPC_ATTR_FPSCR_VE, + OPPC_ATTR_FPSCR_VXSNAN, + OPPC_ATTR_FPSCR_VXCVI, +}; + +/* Casts */ +bool +oppc_cast_bool(struct oppc_value const *value); + +int64_t +oppc_cast_int64(struct oppc_value const *value); + +uint64_t +oppc_cast_uint64(struct oppc_value const *value); + +/* Assignments */ +struct oppc_value * +oppc_transient(struct oppc_value *ret, + uint64_t value, uint8_t bits); + +struct oppc_value * +oppc_assign(struct oppc_value *dst, + struct oppc_value const *src); + +/* Subscripts */ +struct oppc_value * +oppc_subscript_assign(struct oppc_value *ret, + struct oppc_value const *value, + struct oppc_value const *index); + +struct oppc_value * +oppc_range_subscript_assign(struct oppc_value *ret, + struct oppc_value const *value, + struct oppc_value const *start, + struct oppc_value const *end); + +struct oppc_value * +oppc_subscript(struct oppc_value *ret, + struct oppc_value const *value, + struct oppc_value const *index); + +struct oppc_value * +oppc_range_subscript(struct oppc_value *ret, + struct oppc_value const *value, + struct oppc_value const *start, + struct oppc_value const *end); + +/* Attributes */ +struct oppc_value * +oppc_attr_assign(struct oppc_value *ref, + enum oppc_attr_tag tag, + struct oppc_value const *value); + +struct oppc_value * +oppc_attr(struct oppc_value *ret, + struct oppc_value const *ref, + enum oppc_attr_tag tag); + +/* Arithmetical */ +struct oppc_value * +oppc_plus(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +oppc_minus(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +oppc_add(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_sub(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_mul(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_div(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_mod(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +/* Comparisons */ +struct oppc_value * +oppc_le(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_lt(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_ltu(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_eq(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_ne(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_ge(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_gt(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_gtu(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +/* Logical */ +struct oppc_value * +oppc_not(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +oppc_and(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_or(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_xor(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +/* Helpers */ +struct oppc_value * +oppc_concat(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +oppc_repeat(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +/* Calls */ +void +OPPC_CALL_TRAP0(void); + +struct oppc_value * +OPPC_CALL_TRAP(struct oppc_value *ret, + struct oppc_value const *addr, + struct oppc_value const *bit); + +struct oppc_value * +OPPC_CALL_EXTS(struct oppc_value *ret, + struct oppc_value *value); + +struct oppc_value * +OPPC_CALL_EXTS64(struct oppc_value *ret, + struct oppc_value *value); + +struct oppc_value * +OPPC_CALL_EXTS128(struct oppc_value *ret, + struct oppc_value *value); + +struct oppc_value * +OPPC_CALL_EXTSXL(struct oppc_value *ret, + struct oppc_value *value, + struct oppc_value *bits); + +struct oppc_value * +OPPC_CALL_EXTZ(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_EXTZ64(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_DPD_TO_BCD(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_BCD_TO_DPD(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_MULS(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_DIVS(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_MODS(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_ROTL64(struct oppc_value *ret, + struct oppc_value const *value, + struct oppc_value const *count); + +struct oppc_value * +OPPC_CALL_ROTL32(struct oppc_value *ret, + struct oppc_value const *value, + struct oppc_value const *count); + +struct oppc_value * +OPPC_CALL_MASK(struct oppc_value *ret, + struct oppc_value const *value, + struct oppc_value const *mask); + +struct oppc_value * +OPPC_CALL_MASK32(struct oppc_value *ret, + struct oppc_value const *value, + struct oppc_value const *mask); + +struct oppc_value * +OPPC_CALL_SINGLE(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_DOUBLE(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_GPR(struct oppc_value *ret, + struct oppc_value const *id); + +struct oppc_value * +OPPC_CALL_FPR(struct oppc_value *ret, + struct oppc_value const *id); + +struct oppc_value * +OPPC_CALL_SPR(struct oppc_value *ret, + struct oppc_value const *id); + +struct oppc_value * +OPPC_CALL_MEM(struct oppc_value *ret, + struct oppc_value const *addr, + struct oppc_value const *off); + +struct oppc_value * +OPPC_CALL_INT2FP(struct oppc_value *ret, + struct oppc_value const *value, + char const *string); + +void +OPPC_CALL_reset_xflags(void); + +void +OPPC_CALL_SetFX(struct oppc_value *ret, + enum oppc_attr_tag tag); + +struct oppc_value * +OPPC_CALL_real_addr(struct oppc_value *ret, + struct oppc_value const *id); + +struct oppc_value * +OPPC_CALL_length(struct oppc_value *ret, + struct oppc_value *value); + +struct oppc_value * +OPPC_CALL_random(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_IsInf(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_IsNaN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_IsNeg(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_IsSNaN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_IsZero(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_COMPARE_EQ(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp_COMPARE_GT(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp_COMPARE_LT(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_FPMULADD32(struct oppc_value *ret, + struct oppc_value const *FRA, + struct oppc_value const *FRC, + struct oppc_value const *FRB, + struct oppc_value const *mulsign, + struct oppc_value const *addsign); + +struct oppc_value * +OPPC_CALL_FPADD32(struct oppc_value *ret, + struct oppc_value const *FRA, + struct oppc_value const *FRB); + +struct oppc_value * +OPPC_CALL_FPSUB32(struct oppc_value *ret, + struct oppc_value const *FRA, + struct oppc_value const *FRB); + +struct oppc_value * +OPPC_CALL_FPMUL32(struct oppc_value *ret, + struct oppc_value const *FRA, + struct oppc_value const *FRB); + +struct oppc_value * +OPPC_CALL_FPDIV32(struct oppc_value *ret, + struct oppc_value const *FRA, + struct oppc_value const *FRB); + +struct oppc_value * +OPPC_CALL_FPADD64(struct oppc_value *ret, + struct oppc_value const *FRA, + struct oppc_value const *FRB); + +struct oppc_value * +OPPC_CALL_FPSUB64(struct oppc_value *ret, + struct oppc_value const *FRA, + struct oppc_value const *FRB); + +struct oppc_value * +OPPC_CALL_FPMUL64(struct oppc_value *ret, + struct oppc_value const *FRA, + struct oppc_value const *FRB); + +struct oppc_value * +OPPC_CALL_FPDIV64(struct oppc_value *ret, + struct oppc_value const *FRA, + struct oppc_value const *FRB); + +struct oppc_value * +OPPC_CALL_bfp64_ATAN2PI(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_ATAN2PI(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_ATAN2(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_ATAN2(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_HYPOT(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_HYPOT(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MINNUM08(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MINNUM08(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MIN19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MIN19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MINNUM19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MINNUM19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MINC(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MINC(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MAXNUM08(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MAXNUM08(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MAX19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MAX19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MAXNUM19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MAXNUM19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MAXC(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MAXC(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MINMAGNUM08(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MINMAGNUM08(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MAXMAGNUM08(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MAXMAGNUM08(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MOD(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MOD(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MINMAG19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MINMAG19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MAXMAG19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MAXMAG19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MINMAGNUM19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MINMAGNUM19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MAXMAGNUM19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MAXMAGNUM19(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_REMAINDER(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_REMAINDER(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_POWR(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_POWR(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_POW(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_POW(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MINMAGC(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MINMAGC(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_MAXMAGC(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_MAXMAGC(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_POWN(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_POWN(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_ROOTN(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp32_ROOTN(struct oppc_value *ret, + struct oppc_value const *lhs, + struct oppc_value const *rhs); + +struct oppc_value * +OPPC_CALL_bfp64_CBRT(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_CBRT(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_SINPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_SINPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_ASINPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_ASINPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_COSPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_COSPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_TANPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_TANPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_ACOSPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_ACOSPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_ATANPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_ATANPI(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_RSQRT(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_RSQRT(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_SIN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_SIN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_ASIN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_ASIN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_COS(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_COS(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_TAN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_TAN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_ACOS(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_ACOS(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_ATAN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_ATAN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_RECIP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_RECIP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_SINH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_SINH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_ASINH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_ASINH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_COSH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_COSH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_TANH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_TANH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_ACOSH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_ACOSH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_ATANH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_ATANH(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_EXP2M1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_EXP2M1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_LOG2P1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_LOG2P1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_EXPM1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_EXPM1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_LOGP1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_LOGP1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_EXP10M1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_EXP10M1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_LOG10P1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_LOG10P1(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_EXP2(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_EXP2(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_LOG2(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_LOG2(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_EXP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_EXP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_LOG(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_LOG(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_EXP10(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_EXP10(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_LOG10(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_LOG10(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_BFP64(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_BFP32(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_SI32(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_SI64(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_SI128(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_UI32(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_UI64(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_UI128(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_INTEGER_NEAR_EVEN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_INTEGER_TRUNC(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_INTEGER_CEIL(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_INTEGER_FLOOR(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_INTEGER_NEAR_AWAY(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ABSOLUTE(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_BFP32(struct oppc_value *ret, + struct oppc_value const *rmode, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_BFP64(struct oppc_value *ret, + struct oppc_value const *ro, + struct oppc_value const *rmode, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_BFP64(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_BFP32(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_SI32(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_SI64(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_SI128(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_UI32(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_UI64(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_CONVERT_FROM_UI128(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_INTEGER_NEAR_EVEN(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_INTEGER_TRUNC(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_INTEGER_CEIL(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_INTEGER_FLOOR(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ROUND_TO_INTEGER_NEAR_AWAY(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp_ABSOLUTE(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_si32_CONVERT_FROM_BFP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_si64_CONVERT_FROM_BFP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_si128_CONVERT_FROM_BFP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_ui32_CONVERT_FROM_BFP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_ui64_CONVERT_FROM_BFP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_ui128_CONVERT_FROM_BFP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp64_CONVERT_FROM_BFP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_bfp32_CONVERT_FROM_BFP(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_fprf_CLASS_BFP64(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_fprf_CLASS_BFP32(struct oppc_value *ret, + struct oppc_value const *value); + +struct oppc_value * +OPPC_CALL_SVSTATE_NEXT(struct oppc_value *ret, + struct oppc_value const *SVi, + struct oppc_value const *vf); + +struct oppc_value * +OPPC_CALL_see(struct oppc_value *ret, + struct oppc_value *value); + +struct oppc_value * +OPPC_CALL_undefined(struct oppc_value *ret, + struct oppc_value *value); + +/* Variables */ +#define OPPC_XLEN UINT64_C(64) +#define OPPC_GPR_RA NULL +#define OPPC_GPR_RB NULL +#define OPPC_GPR_RC NULL +#define OPPC_GPR_RS NULL +#define OPPC_GPR_RSp NULL +#define OPPC_GPR_RT NULL +#define OPPC_GPR_RTp NULL +#define OPPC_FPR_FPR NULL +#define OPPC_FPR_FRA NULL +#define OPPC_FPR_FRAp NULL +#define OPPC_FPR_FRB NULL +#define OPPC_FPR_FRBp NULL +#define OPPC_FPR_FRC NULL +#define OPPC_FPR_FRS NULL +#define OPPC_FPR_FRSp NULL +#define OPPC_FPR_FRT NULL +#define OPPC_FPR_FRTp NULL +#define OPPC_OVERFLOW NULL +#define OPPC_BF NULL +#define OPPC_BFA NULL +#define OPPC_BA NULL +#define OPPC_BB NULL +#define OPPC_BC NULL +#define OPPC_BI NULL +#define OPPC_BT NULL +#define OPPC_OV NULL +#define OPPC_OV32 NULL +#define OPPC_CA NULL +#define OPPC_CA32 NULL +#define OPPC_SO NULL +#define OPPC_RESERVE NULL +#define OPPC_RESERVE_LENGTH NULL +#define OPPC_RESERVE_ADDR NULL +#define OPPC_REAL_PAGE_SIZE NULL +#define OPPC_CR NULL +#define OPPC_LR NULL +#define OPPC_CTR NULL +#define OPPC_TAR NULL +#define OPPC_FPSCR NULL +#define OPPC_MSR NULL +#define OPPC_SVSTATE NULL +#define OPPC_SVREMAP NULL +#define OPPC_SRR0 NULL +#define OPPC_SRR1 NULL +#define OPPC_SVSHAPE0 NULL +#define OPPC_SVSHAPE1 NULL +#define OPPC_SVSHAPE2 NULL +#define OPPC_SVSHAPE3 NULL -- 2.30.2