[Mesa-dev] [PATCH 2/2] gm107/ir: make use of IADD32I for all immediates

Ilia Mirkin imirkin at alum.mit.edu
Sun Jun 26 21:46:36 UTC 2016


We don't appear to handle src(0) having a neg modifier in the
immediate case. Does the insnCanLoad logic account for that? (Perhaps
the bit is there and we just forgot about it?)

On Sun, Jun 26, 2016 at 5:40 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> IADD only allows to emit 19-bits immediates. This is similar to the
> previous fix I did for MOV.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> Cc: <mesa-stable at lists.freedesktop.org>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> index bf719a9..80761e2 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> @@ -1683,7 +1683,7 @@ CodeEmitterGM107::emitNOT()
>  void
>  CodeEmitterGM107::emitIADD()
>  {
> -   if (!longIMMD(insn->src(1))) {
> +   if (insn->src(1).getFile() != FILE_IMMEDIATE) {
>        switch (insn->src(1).getFile()) {
>        case FILE_GPR:
>           emitInsn(0x5c100000);
> --
> 2.8.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list