Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
s_addComplCarryM.c File Reference
#include <stdint.h>
#include "platform.h"
#include "primitiveTypes.h"
Include dependency graph for s_addComplCarryM.c:

Go to the source code of this file.

Functions

uint_fast8_t softfloat_addComplCarryM (uint_fast8_t size_words, const uint32_t *aPtr, const uint32_t *bPtr, uint_fast8_t carry, uint32_t *zPtr)
 

Function Documentation

◆ softfloat_addComplCarryM()

uint_fast8_t softfloat_addComplCarryM ( uint_fast8_t size_words,
const uint32_t * aPtr,
const uint32_t * bPtr,
uint_fast8_t carry,
uint32_t * zPtr )

Definition at line 44 of file s_addComplCarryM.c.

51{
52 unsigned int index, lastIndex;
53 uint32_t wordA, wordZ;
54
55 index = indexWordLo( size_words );
56 lastIndex = indexWordHi( size_words );
57 for (;;) {
58 wordA = aPtr[index];
59 wordZ = wordA + ~bPtr[index] + carry;
60 zPtr[index] = wordZ;
61 if ( wordZ != wordA ) carry = (wordZ < wordA);
62 if ( index == lastIndex ) break;
63 index += wordIncr;
64 }
65 return carry;
66
67}
#define wordIncr
#define indexWordLo(total)
#define indexWordHi(total)
unsigned int uint32_t
Definition stdint.h:126