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

Go to the source code of this file.

Functions

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

Function Documentation

◆ softfloat_subM()

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

Definition at line 44 of file s_subM.c.

50{
51 unsigned int index, lastIndex;
52 uint_fast8_t borrow;
53 uint32_t wordA, wordB;
54
55 index = indexWordLo( size_words );
56 lastIndex = indexWordHi( size_words );
57 borrow = 0;
58 for (;;) {
59 wordA = aPtr[index];
60 wordB = bPtr[index];
61 zPtr[index] = wordA - wordB - borrow;
62 if ( index == lastIndex ) break;
63 borrow = borrow ? (wordA <= wordB) : (wordA < wordB);
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