aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2013-05-07 13:02:58 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2013-05-08 05:33:17 -0400
commit420c158dcf96ee3a5758c9bf1586b163584c75c7 (patch)
treee9cc98dbd2bf308b4d1b2ac58eb8659342ca7aca /arch/arm64
parent0e7f7bcc3fc87489cda5aa6aff8ce40eed912279 (diff)
arm64: Treat the bitops index argument as an 'int'
The bitops prototype use an 'int' as the bit index type but the asm implementation assume it to be a 'long'. Since the compiler does not guarantee zeroing the upper 32-bits in a register when used as 'int', change the bitops implementation accordingly. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/lib/bitops.S10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm64/lib/bitops.S b/arch/arm64/lib/bitops.S
index 36216d30cb9a..e5db797790d3 100644
--- a/arch/arm64/lib/bitops.S
+++ b/arch/arm64/lib/bitops.S
@@ -21,13 +21,13 @@
21 21
22/* 22/*
23 * x0: bits 5:0 bit offset 23 * x0: bits 5:0 bit offset
24 * bits 63:6 word offset 24 * bits 31:6 word offset
25 * x1: address 25 * x1: address
26 */ 26 */
27 .macro bitop, name, instr 27 .macro bitop, name, instr
28ENTRY( \name ) 28ENTRY( \name )
29 and x3, x0, #63 // Get bit offset 29 and w3, w0, #63 // Get bit offset
30 eor x0, x0, x3 // Clear low bits 30 eor w0, w0, w3 // Clear low bits
31 mov x2, #1 31 mov x2, #1
32 add x1, x1, x0, lsr #3 // Get word offset 32 add x1, x1, x0, lsr #3 // Get word offset
33 lsl x3, x2, x3 // Create mask 33 lsl x3, x2, x3 // Create mask
@@ -41,8 +41,8 @@ ENDPROC(\name )
41 41
42 .macro testop, name, instr 42 .macro testop, name, instr
43ENTRY( \name ) 43ENTRY( \name )
44 and x3, x0, #63 // Get bit offset 44 and w3, w0, #63 // Get bit offset
45 eor x0, x0, x3 // Clear low bits 45 eor w0, w0, w3 // Clear low bits
46 mov x2, #1 46 mov x2, #1
47 add x1, x1, x0, lsr #3 // Get word offset 47 add x1, x1, x0, lsr #3 // Get word offset
48 lsl x4, x2, x3 // Create mask 48 lsl x4, x2, x3 // Create mask