]> Pileus Git - ~andy/linux/blobdiff - arch/arm64/lib/bitops.S
arm64: Treat the bitops index argument as an 'int'
[~andy/linux] / arch / arm64 / lib / bitops.S
index 36216d30cb9af72167f44b76cce35ab81de4ad8b..e5db797790d3265c5418d749b7537c494ddeb250 100644 (file)
 
 /*
  * x0: bits 5:0  bit offset
- *     bits 63:6 word offset
+ *     bits 31:6 word offset
  * x1: address
  */
        .macro  bitop, name, instr
 ENTRY( \name   )
-       and     x3, x0, #63             // Get bit offset
-       eor     x0, x0, x3              // Clear low bits
+       and     w3, w0, #63             // Get bit offset
+       eor     w0, w0, w3              // Clear low bits
        mov     x2, #1
        add     x1, x1, x0, lsr #3      // Get word offset
        lsl     x3, x2, x3              // Create mask
@@ -41,8 +41,8 @@ ENDPROC(\name )
 
        .macro  testop, name, instr
 ENTRY( \name   )
-       and     x3, x0, #63             // Get bit offset
-       eor     x0, x0, x3              // Clear low bits
+       and     w3, w0, #63             // Get bit offset
+       eor     w0, w0, w3              // Clear low bits
        mov     x2, #1
        add     x1, x1, x0, lsr #3      // Get word offset
        lsl     x4, x2, x3              // Create mask