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

Go to the source code of this file.

Functions

void softfloat_shortShiftRightExtendM (uint_fast8_t size_words, const uint32_t *aPtr, uint_fast8_t dist, uint32_t *zPtr)
 

Function Documentation

◆ softfloat_shortShiftRightExtendM()

void softfloat_shortShiftRightExtendM ( uint_fast8_t size_words,
const uint32_t * aPtr,
uint_fast8_t dist,
uint32_t * zPtr )

Definition at line 44 of file s_shortShiftRightExtendM.c.

50{
51 uint_fast8_t uNegDist;
52 unsigned int indexA, lastIndexA;
53 uint32_t partWordZ, wordA;
54
55 uNegDist = -dist;
56 indexA = indexWordLo( size_words );
57 lastIndexA = indexWordHi( size_words );
58 zPtr += indexWordLo( size_words + 1 );
59 partWordZ = 0;
60 for (;;) {
61 wordA = aPtr[indexA];
62 *zPtr = wordA<<(uNegDist & 31) | partWordZ;
63 zPtr += wordIncr;
64 partWordZ = wordA>>dist;
65 if ( indexA == lastIndexA ) break;
66 indexA += wordIncr;
67 }
68 *zPtr = partWordZ;
69
70}
#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