clang 20.0.0git
Macros | Functions
adcintrin.h File Reference

Go to the source code of this file.

Macros

#define __DEFAULT_FN_ATTRS   __attribute__((__always_inline__, __nodebug__))
 
#define __INLINE   static __inline
 

Functions

__INLINE unsigned char __DEFAULT_FN_ATTRS _addcarry_u32 (unsigned char __cf, unsigned int __x, unsigned int __y, unsigned int *__p)
 Adds unsigned 32-bit integers __x and __y, plus 0 or 1 as indicated by the carry flag __cf.
 
__INLINE unsigned char __DEFAULT_FN_ATTRS _subborrow_u32 (unsigned char __cf, unsigned int __x, unsigned int __y, unsigned int *__p)
 Adds unsigned 32-bit integer __y to 0 or 1 as indicated by the carry flag __cf, and subtracts the result from unsigned 32-bit integer __x.
 

Macro Definition Documentation

◆ __DEFAULT_FN_ATTRS

#define __DEFAULT_FN_ATTRS   __attribute__((__always_inline__, __nodebug__))

Definition at line 18 of file adcintrin.h.

◆ __INLINE

#define __INLINE   static __inline

Definition at line 24 of file adcintrin.h.

Function Documentation

◆ _addcarry_u32()

__INLINE unsigned char __DEFAULT_FN_ATTRS _addcarry_u32 ( unsigned char  __cf,
unsigned int  __x,
unsigned int  __y,
unsigned int __p 
)

Adds unsigned 32-bit integers __x and __y, plus 0 or 1 as indicated by the carry flag __cf.

Stores the unsigned 32-bit sum in the memory at __p, and returns the 8-bit carry-out (carry flag).

temp := (__cf == 0) ? 0 : 1
Store32(__p, __x + __y + temp)
result := CF

This intrinsic corresponds to the ADC instruction.

Parameters
__cfThe 8-bit unsigned carry flag; any non-zero value indicates carry.
__xA 32-bit unsigned addend.
__yA 32-bit unsigned addend.
__pPointer to memory for storing the sum.
Returns
The 8-bit unsigned carry-out value.

Definition at line 54 of file adcintrin.h.

References __p, and __y.

◆ _subborrow_u32()

__INLINE unsigned char __DEFAULT_FN_ATTRS _subborrow_u32 ( unsigned char  __cf,
unsigned int  __x,
unsigned int  __y,
unsigned int __p 
)

Adds unsigned 32-bit integer __y to 0 or 1 as indicated by the carry flag __cf, and subtracts the result from unsigned 32-bit integer __x.

Stores the unsigned 32-bit difference in the memory at __p, and returns the 8-bit carry-out (carry or overflow flag).

temp := (__cf == 0) ? 0 : 1
Store32(__p, __x - (__y + temp))
result := CF

This intrinsic corresponds to the SBB instruction.

Parameters
__cfThe 8-bit unsigned carry flag; any non-zero value indicates carry.
__xThe 32-bit unsigned minuend.
__yThe 32-bit unsigned subtrahend.
__pPointer to memory for storing the difference.
Returns
The 8-bit unsigned carry-out value.

Definition at line 85 of file adcintrin.h.

References __p, and __y.