My Project
Chargement...
Recherche...
Aucune correspondance
arith64.h
Aller à la documentation de ce fichier.
1/*----------------------------------------------------------------------------*/
2/*----------------------------------------------------------------------------*/
3#ifndef ARITH64_DEF
4#define ARITH64_DEF
5
6#define arith64_u64 unsigned long long int
7#define arith64_s64 signed long long int
8#define arith64_u32 unsigned int
9#define arith64_s32 int
10
11typedef union
12{
15 struct
16 {
17#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
19#else
21#endif
22 } u32;
23 struct
24 {
25#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
27#else
29#endif
30 } s32;
32
33// extract hi and lo 32-bit words from 64-bit value
34#define arith64_hi(n) (arith64_word){.u64=n}.u32.hi
35#define arith64_lo(n) (arith64_word){.u64=n}.u32.lo
36
37// Negate a if b is negative, via invert and increment.
38#define arith64_neg(a, b) (((a) ^ ((((arith64_s64)(b)) >= 0) - 1)) + (((arith64_s64)(b)) < 0))
39#define arith64_abs(a) arith64_neg(a, a)
40
41/*
42 */
44
45/*
46 */
48
49
50#endif
arith64_s64 __divdi3(arith64_s64 a, arith64_s64 b)
Definition arith64.c:159
#define arith64_u32
Definition arith64.h:8
arith64_s64 __moddi3(arith64_s64 a, arith64_s64 b)
Definition arith64.c:192
#define arith64_s64
Definition arith64.h:7
#define arith64_s32
Definition arith64.h:9
#define arith64_u64
Definition arith64.h:6
uint16_t b
uint16_t a
Exemple de fonction de mise-à-jour d'un paramètre dans un registre.
arith64_s32 hi
Definition arith64.h:26
arith64_u64 u64
Definition arith64.h:13
arith64_s64 s64
Definition arith64.h:14
arith64_u32 hi
Definition arith64.h:18