[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190819142459.GJ31406@gate.crashing.org>
Date: Mon, 19 Aug 2019 09:24:59 -0500
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Christophe Leroy <christophe.leroy@....fr>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v3 3/3] powerpc/64: optimise LOAD_REG_IMMEDIATE_SYM()
On Mon, Aug 19, 2019 at 01:58:12PM +0000, Christophe Leroy wrote:
> -#define LOAD_REG_IMMEDIATE_SYM(reg,expr) \
> - lis reg,(expr)@highest; \
> - ori reg,reg,(expr)@higher; \
> - rldicr reg,reg,32,31; \
> - oris reg,reg,(expr)@__AS_ATHIGH; \
> - ori reg,reg,(expr)@l;
> +#define LOAD_REG_IMMEDIATE_SYM(reg, tmp, expr) \
> + lis reg, (expr)@highest; \
> + lis tmp, (expr)@__AS_ATHIGH; \
> + ori reg, reg, (expr)@higher; \
> + ori tmp, reg, (expr)@l; \
> + rldimi reg, tmp, 32, 0
That should be
#define LOAD_REG_IMMEDIATE_SYM(reg, tmp, expr) \
lis tmp, (expr)@highest; \
ori tmp, tmp, (expr)@higher; \
lis reg, (expr)@__AS_ATHIGH; \
ori reg, reg, (expr)@l; \
rldimi reg, tmp, 32, 0
(tmp is the high half, reg is the low half, as inputs to that rldimi).
Segher
Powered by blists - more mailing lists