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

Go to the source code of this file.

Macros

#define softfloat_shiftRightJamM   softfloat_shiftRightJamM
 

Functions

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

Macro Definition Documentation

◆ softfloat_shiftRightJamM

#define softfloat_shiftRightJamM   softfloat_shiftRightJamM

Definition at line 42 of file s_shiftRightJamM.c.

Function Documentation

◆ softfloat_shiftRightJamM()

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

Definition at line 46 of file s_shiftRightJamM.c.

52{
53 uint32_t wordJam, wordDist, *ptr;
54 uint_fast8_t i, innerDist;
55
56 wordJam = 0;
57 wordDist = dist>>5;
58 if ( wordDist ) {
59 if ( size_words < wordDist ) wordDist = size_words;
60 ptr = (uint32_t *) (aPtr + indexMultiwordLo( size_words, wordDist ));
61 i = wordDist;
62 do {
63 wordJam = *ptr++;
64 if ( wordJam ) break;
65 --i;
66 } while ( i );
67 ptr = zPtr;
68 }
69 if ( wordDist < size_words ) {
70 aPtr += indexMultiwordHiBut( size_words, wordDist );
71 innerDist = dist & 31;
72 if ( innerDist ) {
74 size_words - wordDist,
75 aPtr,
76 innerDist,
77 zPtr + indexMultiwordLoBut( size_words, wordDist )
78 );
79 if ( ! wordDist ) goto wordJam;
80 } else {
81 aPtr += indexWordLo( size_words - wordDist );
82 ptr = zPtr + indexWordLo( size_words );
83 for ( i = size_words - wordDist; i; --i ) {
84 *ptr = *aPtr;
85 aPtr += wordIncr;
86 ptr += wordIncr;
87 }
88 }
89 ptr = zPtr + indexMultiwordHi( size_words, wordDist );
90 }
91 do {
92 *ptr++ = 0;
93 --wordDist;
94 } while ( wordDist );
95 wordJam:
96 if ( wordJam ) zPtr[indexWordLo( size_words )] |= 1;
97
98}
#define indexMultiwordHi(total, n)
#define indexMultiwordLo(total, n)
#define wordIncr
#define indexWordLo(total)
#define indexMultiwordHiBut(total, n)
#define indexMultiwordLoBut(total, n)
void softfloat_shortShiftRightJamM(uint_fast8_t, const uint32_t *, uint_fast8_t, uint32_t *)
unsigned int uint32_t
Definition stdint.h:126
uint8_t uint_fast8_t
Definition stdint.h:154