summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/sparc/isa/operands.isa2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/sparc/isa/operands.isa b/src/arch/sparc/isa/operands.isa
index 9dcd73598..40926a5fb 100644
--- a/src/arch/sparc/isa/operands.isa
+++ b/src/arch/sparc/isa/operands.isa
@@ -48,7 +48,7 @@ output header {{
// MSB put in the LSB position but are otherwise normal.
static inline unsigned int dfpr(unsigned int regNum)
{
- return regNum | ((regNum & 1) << 5);
+ return (regNum & (~1)) | ((regNum & 1) << 5);
}
}};