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

Go to the source code of this file.

Functions

void softfloat_addM (uint_fast8_t size_words, const uint32_t *aPtr, const uint32_t *bPtr, uint32_t *zPtr)
 

Function Documentation

◆ softfloat_addM()

void softfloat_addM ( uint_fast8_t size_words,
const uint32_t * aPtr,
const uint32_t * bPtr,
uint32_t * zPtr )

Definition at line 44 of file s_addM.c.

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