ARM: net: bpf: improve 64-bit load immediate implementation
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 12 Jul 2018 20:50:41 +0000 (21:50 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 13 Jul 2018 13:26:41 +0000 (15:26 +0200)
commitf9ff5018c13b4918c98178ee81d41372b455201e
tree7ef75ba7dcd86e28e943857ccc46eaf3dcb1d522
parent6fd066604123ed4ab71aefe797d35996655c5eb1
ARM: net: bpf: improve 64-bit load immediate implementation

Rather than writing each 32-bit half of the 64-bit immediate value
separately when the register is on the stack:

  movw    r6, #45056      ; 0xb000
  movt    r6, #60979      ; 0xee33
  str     r6, [fp, #-44]  ; 0xffffffd4
  mov     r6, #0
  str     r6, [fp, #-40]  ; 0xffffffd8

arrange to use the double-word store when available instead:

  movw    r6, #45056      ; 0xb000
  movt    r6, #60979      ; 0xee33
  mov     r7, #0
  strd    r6, [fp, #-44]  ; 0xffffffd4

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