+2021-06-27 Mike Frysinger <vapier@gentoo.org>
+
+ * bpf-helpers.c (bpf_trace_printk): Move value decl to top of scope.
+ * mloop.in: Move off16 & imm32 decls to top of scope.
+
2021-06-22 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
supported, which are read from %r3, %r4 and %r5 respectively. */
for (i = 0, tags_processed = 0; i < size;)
{
+ UDI value;
QI c = GETMEMUQI (current_cpu, CPU_PC_GET (current_cpu),
fmt_address + i);
if (i++ >= size)
return -1; /* XXX look for kernel error code. */
- UDI value = GET_H_GPR (3 + tags_processed);
+ value = GET_H_GPR (3 + tags_processed);
switch ((GETMEMUQI (current_cpu, CPU_PC_GET (current_cpu),
fmt_address + i)))
if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
+ UHI off16;
+ USI imm32;
+
/* eBPF instructions are little-endian, but GETIMEMUDI reads according
to target byte order. Swap to little-endian. */
insn = SWAP_8 (insn);
/* But, the imm32 and offset16 fields within instructions follow target
byte order. Swap those fields back. */
- UHI off16 = (UHI) ((insn & 0x00000000ffff0000) >> 16);
- USI imm32 = (USI) ((insn & 0xffffffff00000000) >> 32);
+ off16 = (UHI) ((insn & 0x00000000ffff0000) >> 16);
+ imm32 = (USI) ((insn & 0xffffffff00000000) >> 32);
off16 = SWAP_2 (off16);
imm32 = SWAP_4 (imm32);