Merge pull request #156 from p12nGH/noncontiguous_harts
[riscv-isa-sim.git] / softfloat / s_shortShiftRightM.c
index ec61c256a9ad59f739633e25d9bffeea8b40a39b..308ad59c5743c1a092f6fc2df45a88e2c01559c2 100644 (file)
@@ -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 3d, 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
@@ -44,23 +44,23 @@ void
  softfloat_shortShiftRightM(
      uint_fast8_t size_words,
      const uint32_t *aPtr,
-     uint_fast8_t count,
+     uint_fast8_t dist,
      uint32_t *zPtr
  )
 {
-    uint_fast8_t negCount;
+    uint_fast8_t uNegDist;
     unsigned int index, lastIndex;
     uint32_t partWordZ, wordA;
 
-    negCount = -count;
+    uNegDist = -dist;
     index = indexWordLo( size_words );
     lastIndex = indexWordHi( size_words );
-    partWordZ = aPtr[index]>>count;
+    partWordZ = aPtr[index]>>dist;
     while ( index != lastIndex ) {
         wordA = aPtr[index + wordIncr];
-        zPtr[index] = wordA<<(negCount & 31) | partWordZ;
+        zPtr[index] = wordA<<(uNegDist & 31) | partWordZ;
         index += wordIncr;
-        partWordZ = wordA>>count;
+        partWordZ = wordA>>dist;
     }
     zPtr[index] = partWordZ;