diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2009-04-29 20:16:19 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-05-14 08:50:29 -0400 |
commit | 0b54352600b820a6d25f151cbd8975ed9b2aeb09 (patch) | |
tree | a98536daeb5afab2eda0c8ba31cf5ac4da2eebaa /arch | |
parent | 5c5dd1d29120affb127955277bfba9f60e27a3fe (diff) |
MIPS: Fix sign-extension bug in 32-bit kernel on 32-bit hardware.
Probably nobody does arithmetic on cp0 register values so this has never
bitten.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/include/asm/mipsregs.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 0ef30c81fea6..32ef8bec5c85 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -728,8 +728,8 @@ do { \ | |||
728 | ".set\tmips64\n\t" \ | 728 | ".set\tmips64\n\t" \ |
729 | "dmfc0\t%M0, " #source "\n\t" \ | 729 | "dmfc0\t%M0, " #source "\n\t" \ |
730 | "dsll\t%L0, %M0, 32\n\t" \ | 730 | "dsll\t%L0, %M0, 32\n\t" \ |
731 | "dsrl\t%M0, %M0, 32\n\t" \ | 731 | "dsra\t%M0, %M0, 32\n\t" \ |
732 | "dsrl\t%L0, %L0, 32\n\t" \ | 732 | "dsra\t%L0, %L0, 32\n\t" \ |
733 | ".set\tmips0" \ | 733 | ".set\tmips0" \ |
734 | : "=r" (__val)); \ | 734 | : "=r" (__val)); \ |
735 | else \ | 735 | else \ |
@@ -737,8 +737,8 @@ do { \ | |||
737 | ".set\tmips64\n\t" \ | 737 | ".set\tmips64\n\t" \ |
738 | "dmfc0\t%M0, " #source ", " #sel "\n\t" \ | 738 | "dmfc0\t%M0, " #source ", " #sel "\n\t" \ |
739 | "dsll\t%L0, %M0, 32\n\t" \ | 739 | "dsll\t%L0, %M0, 32\n\t" \ |
740 | "dsrl\t%M0, %M0, 32\n\t" \ | 740 | "dsra\t%M0, %M0, 32\n\t" \ |
741 | "dsrl\t%L0, %L0, 32\n\t" \ | 741 | "dsra\t%L0, %L0, 32\n\t" \ |
742 | ".set\tmips0" \ | 742 | ".set\tmips0" \ |
743 | : "=r" (__val)); \ | 743 | : "=r" (__val)); \ |
744 | local_irq_restore(__flags); \ | 744 | local_irq_restore(__flags); \ |