Subject: Re: [RFC PATCH 1/1] BPF JIT for PPC64

From: Ben Hutchings <[email-masked]>
Date: Sat, 25 Jun 2011 02:58:34 +0100

On Fri, 2011-06-24 at 16:02 +1000, Matt Evans wrote:
[...]
> +		case BPF_S_ALU_ADD_K: /* A += K; */
> +			if (!K)
> +				break;
> +			if (K < 32768)
> +				PPC_ADDI(r_A, r_A, K);
> +			else
> +				PPC_ADDI(r_A, r_A, IMM_L(K));
> +				PPC_ADDIS(r_A, r_A, IMM_HA(K));
> +			break;

Missing braces.

> +		case BPF_S_ALU_SUB_X: /* A -= X; */
> +			ctx->seen |= SEEN_XREG;
> +			PPC_SUB(r_A, r_A, r_X);
> +			break;
> +		case BPF_S_ALU_SUB_K: /* A -= K */
> +			if (!K)
> +				break;
> +			if (K < 32768)
> +				PPC_ADDI(r_A, r_A, -K);
> +			else
> +				PPC_ADDI(r_A, r_A, IMM_L(-K));
> +				PPC_ADDIS(r_A, r_A, IMM_HA(-K));
> +			break;
[...]

Here as well.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.