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

Go to the source code of this file.

Functions

struct uint128 softfloat_shiftRightJam128 (uint64_t a64, uint64_t a0, uint_fast32_t dist)
 

Function Documentation

◆ softfloat_shiftRightJam128()

struct uint128 softfloat_shiftRightJam128 ( uint64_t a64,
uint64_t a0,
uint_fast32_t dist )

Definition at line 44 of file s_shiftRightJam128.c.

45{
46 uint_fast8_t u8NegDist;
47 struct uint128 z;
48
49 if ( dist < 64 ) {
50 u8NegDist = -dist;
51 z.v64 = a64>>dist;
52 z.v0 =
53 a64<<(u8NegDist & 63) | a0>>dist
54 | ((uint64_t) (a0<<(u8NegDist & 63)) != 0);
55 } else {
56 z.v64 = 0;
57 z.v0 =
58 (dist < 127)
59 ? a64>>(dist & 63)
60 | (((a64 & (((uint_fast64_t) 1<<(dist & 63)) - 1)) | a0)
61 != 0)
62 : ((a64 | a0) != 0);
63 }
64 return z;
65
66}
uint64_t uint_fast64_t
Definition stdint.h:157
uint8_t uint_fast8_t
Definition stdint.h:154
unsigned __int64 uint64_t
Definition stdint.h:136