update targets

This commit is contained in:
2026-04-18 19:46:45 +02:00
parent 5dd763fd8a
commit 40d40bc57b
7 changed files with 269 additions and 36 deletions

View File

@ -1,6 +1,8 @@
#ifndef _include_fail_h
#define _include_fail_h
#include <stdint.h>
#define INLINE __attribute__((always_inline)) inline
#define NOINLINE __attribute__((noinline))
@ -44,6 +46,15 @@
#define RET(val) return val;
#endif
typedef uint16_t enc_t;
typedef uint8_t plain_t;
typedef int8_t sign_t;
#define check(vc, A, B) (((vc - B) % A) == 0)
#define encode(v, A, B) ((((plain_t)v) * ((sign_t)A)) + ((sign_t)B))
#define decode(vc, A, B) ((vc - B) / A)
#define equals(vc1, vc2, B1, B2) ((vc1 - vc2) == (B1 - B2))
#ifdef __cplusplus
extern "C" {
#endif