]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ARM: net: bpf: improve 64-bit store implementation
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 12 Jul 2018 20:50:51 +0000 (21:50 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 13 Jul 2018 13:26:42 +0000 (15:26 +0200)
commitc5eae692571d6c44efeb27fe78a5ed8b5ded9b4a
tree89baa9ccc8322eaa6397399121613cbbd678a362
parent077513b89424ba814432b1cd7d7f793958059ed8
ARM: net: bpf: improve 64-bit store implementation

Improve the 64-bit store implementation from:

  ldr     r6, [fp, #-8]
  str     r8, [r6]
  ldr     r6, [fp, #-8]
  mov     r7, #4
  add     r7, r6, r7
  str     r9, [r7]

to:

  ldr     r6, [fp, #-8]
  str     r8, [r6]
  str     r9, [r6, #4]

We leave the store as two separate STR instructions rather than using
STRD as the store may not be aligned, and STR can handle misalignment.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
arch/arm/net/bpf_jit_32.c