[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, impleme
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI |
Date: |
Fri, 30 Apr 2021 07:31:55 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 4/30/21 7:05 AM, Matheus K. Ferst wrote:
+ADDI 000001 10 0--.-- .................. \
+ 001110 ..... ..... ................ @PLS_D
I'm not sure about this. It's a bit surprising to find ADDI here, and the
comment that explains why is likely to be ignored after the big copyright header.
You could move the comment closer, and replicate, e.g.
ADDI .... \
.... @PLS_D # PADDI
I'd prefer to keep a trans_PADDI like
> static bool trans_PADDI(DisasContext *ctx, arg_PLS_D *a)
> {
> if(!resolve_PLS_D(ctx, a)) {
> return false;
> }
> return trans_ADDI(ctx, a);
> }
But in this case ADDI probably doesn't use PLS_D. You could use
static bool trans_PADDI(DisasContext *ctx, arg_PLS_D *a)
{
arg_D d;
if (!resolve_PLS_D(ctx, &d, a)) {
return false;
}
return trans_ADDI(ctx, &d);
}
making sure to use int64_t in the offset for arg_D.
It's the middle way between v2 and v3. trans_ADDI code is reused, it'll
probably be optimized as a tail call, and resolve_PLS_D is not called when it's
not needed.
My version won't tail-call, because of the escaping local storage, but I don't
see how you can avoid it.
r~
- [PATCH v3 29/30] target/ppc: Move D/DS/X-form integer stores to decodetree, (continued)
- [PATCH v3 29/30] target/ppc: Move D/DS/X-form integer stores to decodetree, Richard Henderson, 2021/04/29
- [PATCH v3 27/30] target/ppc: Move D/DS/X-form integer loads to decodetree, Richard Henderson, 2021/04/29
- [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Richard Henderson, 2021/04/29
- RE: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Luis Fernando Fujita Pires, 2021/04/30
- Re: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Richard Henderson, 2021/04/30
- RE: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Luis Fernando Fujita Pires, 2021/04/30
- Re: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Richard Henderson, 2021/04/30
- RE: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Luis Fernando Fujita Pires, 2021/04/30
- Re: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Richard Henderson, 2021/04/30
Re: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Matheus K. Ferst, 2021/04/30
- Re: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI,
Richard Henderson <=
- Re: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Matheus K. Ferst, 2021/04/30
- Re: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Richard Henderson, 2021/04/30
- Re: [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Matheus K. Ferst, 2021/04/30
[PATCH v3 26/30] target/ppc: Implement PNOP, Richard Henderson, 2021/04/29
[PATCH v3 30/30] target/ppc: Implement prefixed integer store instructions, Richard Henderson, 2021/04/29
Re: [PATCH v3 00/30] Base for adding PowerPC 64-bit instructions, no-reply, 2021/04/29