]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tcg/aarch64: Fix output of extract2 opcodes
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 9 Jul 2019 18:36:34 +0000 (18:36 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 14 Jul 2019 10:19:00 +0000 (12:19 +0200)
This patch fixes two problems:
(1) The inputs to the EXTR insn were reversed,
(2) The input constraints use rZ, which means that we need to use
    the REG0 macro in order to supply XZR for a constant 0 input.

Fixes: 464c2969d5d
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/aarch64/tcg-target.inc.c

index b0f8106642f088b9fcf0c977cf44d27cfe50c847..0713448bf53d27bf2a0bc40428968df7dfc32c3f 100644 (file)
@@ -2226,7 +2226,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
 
     case INDEX_op_extract2_i64:
     case INDEX_op_extract2_i32:
-        tcg_out_extr(s, ext, a0, a1, a2, args[3]);
+        tcg_out_extr(s, ext, a0, REG0(2), REG0(1), args[3]);
         break;
 
     case INDEX_op_add2_i32: