changeset a7a718faaf56 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=a7a718faaf56
description:
arm: Fix fplib 128-bit shift operators
Appease clang.
diffstat:
src/arch/arm/insts/fplib.cc | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 2981e399c816 -r a7a718faaf56 src/arch/arm/insts/fplib.cc
--- a/src/arch/arm/insts/fplib.cc Sun Nov 22 05:10:17 2015 -0500
+++ b/src/arch/arm/insts/fplib.cc Sun Nov 22 05:10:18 2015 -0500
@@ -101,7 +101,10 @@
static inline void
lsl128(uint64_t *r0, uint64_t *r1, uint64_t x0, uint64_t x1, uint32_t shift)
{
- if (shift < 64) {
+ if (shift == 0) {
+ *r1 = x1;
+ *r0 = x0;
+ } else if (shift < 64) {
*r1 = x1 << shift | x0 >> (64 - shift);
*r0 = x0 << shift;
} else if (shift < 128) {
@@ -116,7 +119,10 @@
static inline void
lsr128(uint64_t *r0, uint64_t *r1, uint64_t x0, uint64_t x1, uint32_t shift)
{
- if (shift < 64) {
+ if (shift == 0) {
+ *r1 = x1;
+ *r0 = x0;
+ } else if (shift < 64) {
*r0 = x0 >> shift | x1 << (64 - shift);
*r1 = x1 >> shift;
} else if (shift < 128) {
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev