aboutsummaryrefslogtreecommitdiff
path: root/source/s_shiftRightM.c
diff options
context:
space:
mode:
authorJohn Hauser <jhauser@eecs.berkeley.edu>2016-07-22 18:03:04 -0700
committerJohn Hauser <jhauser@eecs.berkeley.edu>2016-07-22 18:03:04 -0700
commitcb5087cd7403acf31ac24ac4be8e019a51904895 (patch)
tree3eeb55d6ad63e33dc8e3be33614e94bbe8a8cac5 /source/s_shiftRightM.c
parent45fdcf1c6583e4af380b147ac568f5aa721b7ba8 (diff)
downloadberkeley-softfloat-3-cb5087cd7403acf31ac24ac4be8e019a51904895.zip
berkeley-softfloat-3-cb5087cd7403acf31ac24ac4be8e019a51904895.tar.gz
berkeley-softfloat-3-cb5087cd7403acf31ac24ac4be8e019a51904895.tar.bz2
Release 3b. See "doc/SoftFloat-history.html".
Diffstat (limited to 'source/s_shiftRightM.c')
-rw-r--r--source/s_shiftRightM.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source/s_shiftRightM.c b/source/s_shiftRightM.c
index cbea113..6256235 100644
--- a/source/s_shiftRightM.c
+++ b/source/s_shiftRightM.c
@@ -2,9 +2,9 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -46,44 +46,44 @@ void
softfloat_shiftRightM(
uint_fast8_t size_words,
const uint32_t *aPtr,
- uint32_t count,
+ uint32_t dist,
uint32_t *zPtr
)
{
- uint32_t wordCount;
- uint_fast8_t innerCount;
+ uint32_t wordDist;
+ uint_fast8_t innerDist;
uint32_t *destPtr;
uint_fast8_t i;
- wordCount = count>>5;
- if ( wordCount < size_words ) {
- aPtr += indexMultiwordHiBut( size_words, wordCount );
- innerCount = count & 31;
- if ( innerCount ) {
+ wordDist = dist>>5;
+ if ( wordDist < size_words ) {
+ aPtr += indexMultiwordHiBut( size_words, wordDist );
+ innerDist = dist & 31;
+ if ( innerDist ) {
softfloat_shortShiftRightM(
- size_words - wordCount,
+ size_words - wordDist,
aPtr,
- innerCount,
- zPtr + indexMultiwordLoBut( size_words, wordCount )
+ innerDist,
+ zPtr + indexMultiwordLoBut( size_words, wordDist )
);
- if ( ! wordCount ) return;
+ if ( ! wordDist ) return;
} else {
- aPtr += indexWordLo( size_words - wordCount );
+ aPtr += indexWordLo( size_words - wordDist );
destPtr = zPtr + indexWordLo( size_words );
- for ( i = size_words - wordCount; i; --i ) {
+ for ( i = size_words - wordDist; i; --i ) {
*destPtr = *aPtr;
aPtr += wordIncr;
destPtr += wordIncr;
}
}
- zPtr += indexMultiwordHi( size_words, wordCount );
+ zPtr += indexMultiwordHi( size_words, wordDist );
} else {
- wordCount = size_words;
+ wordDist = size_words;
}
do {
*zPtr++ = 0;
- --wordCount;
- } while ( wordCount );
+ --wordDist;
+ } while ( wordDist );
}