diff options
author | Nicolas Pitre | 2008-10-23 05:34:08 +0200 |
---|---|---|
committer | Russell King | 2008-10-23 13:53:32 +0200 |
commit | 884afaab44c9f92eb618ce53b3d2b5316f174a39 (patch) | |
tree | 4d2795bc6050916411092736e5fe37ba5640983d /arch/arm/include/asm | |
parent | [ARM] 5318/1: Swap the PRRR and NMRR values in proc-v7.S (diff) | |
download | kernel-qcow2-linux-884afaab44c9f92eb618ce53b3d2b5316f174a39.tar.gz kernel-qcow2-linux-884afaab44c9f92eb618ce53b3d2b5316f174a39.tar.xz kernel-qcow2-linux-884afaab44c9f92eb618ce53b3d2b5316f174a39.zip |
[ARM] 5320/1: fix assembly constraints in implementation of do_div()
Those inline assembly segments using the umlal instruction must have
the & modifier so to be sure that a purely input register won't alias
one of the registers used as input+output. In most cases, the inputs
are still used after the outputs are touched, and most binutil versions
insist on "rdhi, rdlo and rm must all be different" even for ARMv6+.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/div64.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h index 5001390be958..d3f0a9eee9f6 100644 --- a/arch/arm/include/asm/div64.h +++ b/arch/arm/include/asm/div64.h @@ -165,7 +165,7 @@ __res = __m; \ asm ( "umlal %Q0, %R0, %Q1, %Q2\n\t" \ "mov %Q0, #0" \ - : "+r" (__res) \ + : "+&r" (__res) \ : "r" (__m), "r" (__n) \ : "cc" ); \ } else { \ @@ -182,7 +182,7 @@ "umlal %R0, %Q0, %Q1, %R2\n\t" \ "mov %R0, #0\n\t" \ "umlal %Q0, %R0, %R1, %R2" \ - : "+r" (__res) \ + : "+&r" (__res) \ : "r" (__m), "r" (__n) \ : "cc" ); \ } else { \ @@ -192,7 +192,7 @@ "adds %Q0, %1, %Q0\n\t" \ "adc %R0, %R0, #0\n\t" \ "umlal %Q0, %R0, %R2, %R3" \ - : "+r" (__res), "+r" (__z) \ + : "+&r" (__res), "+&r" (__z) \ : "r" (__m), "r" (__n) \ : "cc" ); \ } \ |