OSDN Git Service

qmiga/qemu.git
16 months agoUpdate version for v8.0.0-rc0 release
Peter Maydell [Tue, 14 Mar 2023 19:25:05 +0000 (19:25 +0000)]
Update version for v8.0.0-rc0 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
16 months agoMerge tag 'display-pull-request' of https://gitlab.com/marcandre.lureau/qemu into...
Peter Maydell [Tue, 14 Mar 2023 14:28:58 +0000 (14:28 +0000)]
Merge tag 'display-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging

ui: dbus & misc fixes

v2:
- fix crash spotted by avocado VNC test

# -----BEGIN PGP SIGNATURE-----
#
# iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmQPgRIcHG1hcmNhbmRy
# ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5QDFEACef6cbSlTtQji1hV+x
# FM2ESPn0tgg9YVmtjsC1zqcdOEKsbs+2SQxBSs6tvQGwX5CgtnmyEsH5/Y4+TU64
# r6dvGAhokEkhiyHwnC+DFw0ajYAaDK96RfJ02tPQ58lrBTyioKZH9K/3mB6pMFEG
# aroE1Z3SQqqMnP+zsQ64nYuJrTXnv9iFejIxnuou+LyXdxmwLWAl5e47eZYaTmrh
# RrJYbCyHbiL5bx6mOmAL1XlO9jJD4o0FrqRWFn4zz1T+w4FvUC/uX52XwRn1G/Hk
# oHNnJBt95czCQ3S43xX0VTVrT9vLAptQzQc45KfegRL3XqPLgTgn4eocBQCYLmHZ
# jKnUsE9VjBNCbkIzgfN9RP/zEklD/3lAHzrW5US7q7oTTYksyxN+pmvfrYbUvKWP
# Oq/EQtpv66R06hjpxD76ime4+Y8WN7I3F/fJS8jl2QDy5I/2IzFSIOD9Rt5PGbky
# xsIdr7QPzlN4ZKpnsRCNeEPwcR/kiv4grIF7jBAxxz3k5UENtIVSJkHBEEQjMy8O
# +ZCvnHsbjPGxFtnlNTvtGsR2hiKYRCJSG/C4YQryTDWoScomlF6UWxzbapjs9CRW
# /GR+98Z2QfwOtRRRteRRt9UFdC/T0DquxnRyJxa5N4VxMiWzmhtCOzmn4oc1THbG
# 5UqDhRNSWEJn9iIvKca5ahSWLw==
# =Rjcs
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 13 Mar 2023 20:01:22 GMT
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* tag 'display-pull-request' of https://gitlab.com/marcandre.lureau/qemu:
  ui/dbus: restrict opengl to gbm-enabled config
  ui/dbus: do not require opengl & gbm
  ui: introduce egl_init()
  ui/sdl: try to instantiate the matching opengl renderer
  ui/sdl: add QEMU_ENABLE_SDL_LOGGING setting/environment
  ui/egl: print EGL error, helping debugging
  ui/shader: fix #version directive must occur on first line
  ui/sdl: get the GL context from the window
  ui: set cursor position upon listener registration
  ui: set cursor upon listener registration
  ui: keep current cursor with QemuConsole
  ui: rename cursor_{get->ref}, return it
  ui: rename cursor_{put->unref}
  meson: ensure dbus-display generated code is built before other units
  ui/dbus: set mouse is-absolute during console creation
  audio/dbus: there are no sender for p2p mode
  ui/dbus: unregister clipboard on connection close
  ui/dbus: initialize cursor_fb

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
16 months agoMerge tag 'pull-riscv-to-apply-20230314' of https://github.com/alistair23/qemu into...
Peter Maydell [Tue, 14 Mar 2023 14:28:47 +0000 (14:28 +0000)]
Merge tag 'pull-riscv-to-apply-20230314' of https://github.com/alistair23/qemu into staging

Seventh RISC-V PR for 8.0

* Fix slli_uw decoding
* Fix incorrect register name in disassembler for fmv,fabs,fneg instructions

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEE9sSsRtSTSGjTuM6PIeENKd+XcFQFAmQQFj4ACgkQIeENKd+X
# cFTDowgAhgganhgtSIKwCzQsfSh9P1KOnftmeRLtGQEC36YeJQc6CyqrgwOWCbBy
# +IEs/0/mXT0g70xaisQT2BKR9J6kevb1aHf790J13MmdFZmkpzTmS5SCQCHgUVjG
# SlFf2d2sIoLeBcZYorQSTZdRHjKG3KQ1y0dFWfaqYYwHVqko67fQhKTcqfu3Sn/l
# SKLeD3hz8iDc2Dh8HMls945rpQxATVTj5+/Fi8p0VL1194XK9dXRW4dpACZYJJEv
# T3u+tK5GUgLVXfxlXLxbk4yw4DtNofU0gaQNAfd2i6E9TImhstrvGDojt2pGrY8Y
# crLkAAxsOH8xNWYZdD5tcFrDZDrPvw==
# =oElO
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 14 Mar 2023 06:37:50 GMT
# gpg:                using RSA key F6C4AC46D4934868D3B8CE8F21E10D29DF977054
# gpg: Good signature from "Alistair Francis <alistair@alistair23.me>" [full]
# Primary key fingerprint: F6C4 AC46 D493 4868 D3B8  CE8F 21E1 0D29 DF97 7054

* tag 'pull-riscv-to-apply-20230314' of https://github.com/alistair23/qemu:
  Fix incorrect register name in disassembler for fmv,fabs,fneg instructions
  disas/riscv: Fix slli_uw decoding

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
16 months agoMerge tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier...
Peter Maydell [Tue, 14 Mar 2023 14:28:35 +0000 (14:28 +0000)]
Merge tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging

trivial branch pull request 20230314

Update MAINTAINER file
Fix typo in qemu-options.hx

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmQQe1ESHGxhdXJlbnRA
# dml2aWVyLmV1AAoJEPMMOL0/L748qpwP/i6k8Jhy9YIN9J/+V/XE6i/KM5ce29zZ
# 8wV7s7/SRobVCFeD4L44Yb4eyyh+XGPrVPosjkloAhM36lfq+2DBWT7A+qjU8PoG
# 3jiRi/pSn+Nc+BtZgKOEWc3FNGjCCBJMXWKOf0XC5djwujth1AEh+VKXyly0GaQx
# 5DY50/VyGCYskBDy2Pv1jUHAiCHBprDOKtxGaM8wB0XIajnAE2znT1NIVOfzWHO1
# HqoWT/Mery2jN1/80rAstPyQX4tYo4C1wXFf3kwfjJibM3Vwd8XOpYTUmeGFGCZ5
# DttPzi3gS7ZkEPQsPMKuNt8ayag62NeOgnoRlsjNsWwnqHkVb1QxN5liA1ZgOWtj
# xbsQk1Ko2YUfG1a/W3hq4AgTZRiuSe2/H4K4sV5kMwVgCNci0OL7a1oNP6JloQm+
# MGRr/nP9GwwnZyyF4CLHW5pGntly0T4C2Ij+AytstBL4QbuzxJJx7FugGrRxdiE8
# +odpUGo+21TxR3kLq9W4xrEwz/A5VNnpUdLFGHK6iuNjNdHNa+7umtHwB9YLHbjP
# V9XQv60+nnbVoTUYx+/IrZy4mwB3M853kjNMbOQrlX94PBlEXlk1Ro6PKGSJrzcT
# xSLVfsJynsU/8CjfJttXsNEYDk6DcdBvw/aj14QM96Flcfwal+jy8YnIIguPQp3Z
# /ORSiS2uSWvp
# =75ca
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 14 Mar 2023 13:49:05 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu:
  MAINTAINERS: Remove CXL maintainer Ben Widawsky
  MAINTAINERS: update my email address for the clock framework
  qemu-options.hx: remove stray quote

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
16 months agoMAINTAINERS: Remove CXL maintainer Ben Widawsky
Markus Armbruster [Mon, 20 Feb 2023 21:24:37 +0000 (22:24 +0100)]
MAINTAINERS: Remove CXL maintainer Ben Widawsky

Ben is no longer with intel.  He told me he expected to get back to
CXL, but it's not happening as quickly as he'd like, and that it's
best to remove him as maintainer.  So let's do that.

Thank you for serving as maintainer, Ben!

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20230220212437.1462314-1-armbru@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
16 months agoMAINTAINERS: update my email address for the clock framework
Damien Hedde [Mon, 13 Feb 2023 10:53:06 +0000 (10:53 +0000)]
MAINTAINERS: update my email address for the clock framework

Also update mailmap

Signed-off-by: Damien Hedde <damien.hedde@dahe.fr>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Message-Id: <20230213105227.2357-1-damien.hedde@dahe.fr>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
16 months agoMerge tag 'pull-tcg-20230313' of https://gitlab.com/rth7680/qemu into staging
Peter Maydell [Tue, 14 Mar 2023 10:09:15 +0000 (10:09 +0000)]
Merge tag 'pull-tcg-20230313' of https://gitlab.com/rth7680/qemu into staging

accel/tcg: Fix NB_MMU_MODES to 16
Balance of the target/ patchset which eliminates tcg_temp_free
Balance of the target/ patchset which eliminates tcg_const

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmQPcb0dHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV885AgAjDbg1soRBy0THf0X
# CVXmQ4yYyUKAonZBL8Abt9yX01BhLFqEsrju3HiaLNOM9DbwWQ4gdvSrtAZ/K2YG
# d6EvC+rJe79pr58MEEhqO4OO1ymp52amRHtEXva4vcKRNuM9WF5by/Hz2PsZyenG
# ysaLBdddooA9SJeL7xYBMpKWFgUm3C8NzfaRfCBVcG94er9u8RUi0kx+drmOLw0g
# vZ3Hekvi2I8Y5mWqvHeAIOsr8Md9PO3ezWxEteE4qsPNTTRfVD93oSGe9nNCYZTX
# wWU51Vfv9GB6hOylAfMRIeCmkjks/gqLOGElsh1MaVovNDTXS5IKV/HgaLaocJHV
# 2P81uQ==
# =FpIY
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 13 Mar 2023 18:55:57 GMT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* tag 'pull-tcg-20230313' of https://gitlab.com/rth7680/qemu: (91 commits)
  tcg: Drop tcg_const_*
  tcg: Drop tcg_const_*_vec
  target/tricore: Use min/max for saturate
  target/ppc: Avoid tcg_const_* in translate.c
  target/ppc: Fix gen_tlbsx_booke206
  target/ppc: Rewrite trans_ADDG6S
  target/ppc: Avoid tcg_const_* in power8-pmu-regs.c.inc
  target/ppc: Avoid tcg_const_* in fp-impl.c.inc
  target/ppc: Avoid tcg_const_* in vsx-impl.c.inc
  target/ppc: Avoid tcg_const_* in xxeval
  target/ppc: Avoid tcg_const_* in vmx-impl.c.inc
  target/ppc: Avoid tcg_const_i64 in do_vcntmb
  target/m68k: Use tcg_constant_i32 in gen_ea_mode
  target/arm: Avoid tcg_const_ptr in handle_rev
  target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn
  target/arm: Avoid tcg_const_ptr in disas_simd_zip_trn
  target/arm: Avoid tcg_const_* in translate-mve.c
  target/arm: Avoid tcg_const_ptr in gen_sve_{ldr,str}
  target/arm: Improve trans_BFCI
  target/arm: Create gen_set_rmode, gen_restore_rmode
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
16 months agoFix incorrect register name in disassembler for fmv,fabs,fneg instructions
Mikhail Tyutin [Fri, 10 Mar 2023 18:58:45 +0000 (21:58 +0300)]
Fix incorrect register name in disassembler for fmv,fabs,fneg instructions

Fix incorrect register name in RISC-V disassembler for fmv,fabs,fneg instructions

Signed-off-by: Mikhail Tyutin <m.tyutin@yadro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <3454991f-7f64-24c3-9a36-f5fa2cc389e1@yadro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
16 months agodisas/riscv: Fix slli_uw decoding
Ivan Klokov [Mon, 27 Feb 2023 09:02:28 +0000 (12:02 +0300)]
disas/riscv: Fix slli_uw decoding

The decoding of the slli_uw currently contains decoding
error: shamt part of opcode has six bits, not five.

Fixes 3de1fb71("target/riscv: update disas.c for xnor/orn/andn and slli.uw")

Signed-off-by: Ivan Klokov <ivan.klokov@syntacore.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230227090228.17117-1-ivan.klokov@syntacore.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
16 months agoui/dbus: restrict opengl to gbm-enabled config
Marc-André Lureau [Tue, 10 Jan 2023 13:10:01 +0000 (17:10 +0400)]
ui/dbus: restrict opengl to gbm-enabled config

We can enable EGL later for non-GBM hosts.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui/dbus: do not require opengl & gbm
Marc-André Lureau [Thu, 11 Aug 2022 14:25:16 +0000 (18:25 +0400)]
ui/dbus: do not require opengl & gbm

Allow to build & use the DBus display without 3d/GPU acceleration support.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui: introduce egl_init()
Marc-André Lureau [Tue, 14 Feb 2023 12:11:24 +0000 (16:11 +0400)]
ui: introduce egl_init()

Future patches will introduce EGL support on win32 (too late for 8.0
though). Having a common place for EGL initialization and error handling
will make it simpler.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui/sdl: try to instantiate the matching opengl renderer
Marc-André Lureau [Wed, 15 Feb 2023 14:29:29 +0000 (18:29 +0400)]
ui/sdl: try to instantiate the matching opengl renderer

-display sdl,gl=es didn't actually use OpenGL ES.

Using OpenGL ES allows to use ANGLE, which works generally better than
Windows/OEM OpenGL driver.

(note: users can still bypass the QEMU choice with SDL_RENDER_DRIVER
environment variable)

(note: for some reason, specifying a driver disables batching and
breaks rendering, so enable it explicitly)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui/sdl: add QEMU_ENABLE_SDL_LOGGING setting/environment
Marc-André Lureau [Wed, 15 Feb 2023 14:27:46 +0000 (18:27 +0400)]
ui/sdl: add QEMU_ENABLE_SDL_LOGGING setting/environment

Enable SDL logging when QEMU_ENABLE_SDL_LOGGING variable is set, as
suggested by Sam Lantinga, upstream SDL maintainer.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui/egl: print EGL error, helping debugging
Marc-André Lureau [Tue, 14 Feb 2023 11:46:58 +0000 (15:46 +0400)]
ui/egl: print EGL error, helping debugging

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
16 months agoui/shader: fix #version directive must occur on first line
Marc-André Lureau [Tue, 14 Feb 2023 10:33:47 +0000 (14:33 +0400)]
ui/shader: fix #version directive must occur on first line

ANGLE fails to compile shaders otherwise.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui/sdl: get the GL context from the window
Marc-André Lureau [Tue, 24 Jan 2023 13:47:18 +0000 (17:47 +0400)]
ui/sdl: get the GL context from the window

There is no guarantee to have a current GL context here. The current
code seems to rely on the renderer using a GL backend, and to set a
current GL context. But this is not always the case, for example if the
renderer backend is DirectX.

This change is enough to fix using virgl with sdl2 on win32, on my setup.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui: set cursor position upon listener registration
Marc-André Lureau [Tue, 17 Jan 2023 11:40:58 +0000 (15:40 +0400)]
ui: set cursor position upon listener registration

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui: set cursor upon listener registration
Marc-André Lureau [Tue, 17 Jan 2023 11:34:45 +0000 (15:34 +0400)]
ui: set cursor upon listener registration

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui: keep current cursor with QemuConsole
Marc-André Lureau [Tue, 17 Jan 2023 11:24:40 +0000 (15:24 +0400)]
ui: keep current cursor with QemuConsole

Keeping the current cursor around is useful, not only for VNC, but for
other displays. Let's move it down, see the following patches for other
usages.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui: rename cursor_{get->ref}, return it
Marc-André Lureau [Tue, 17 Jan 2023 11:10:13 +0000 (15:10 +0400)]
ui: rename cursor_{get->ref}, return it

The naming is more conventional in QEMU code, and allows to simplify
some code by changing the API design, so it returns the input parameter,
instead of void.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui: rename cursor_{put->unref}
Marc-André Lureau [Tue, 17 Jan 2023 11:07:02 +0000 (15:07 +0400)]
ui: rename cursor_{put->unref}

The naming is more conventional in QEMU.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agomeson: ensure dbus-display generated code is built before other units
Marc-André Lureau [Thu, 11 Aug 2022 11:59:40 +0000 (15:59 +0400)]
meson: ensure dbus-display generated code is built before other units

It's simply by luck that dbus-display header is built first before the
other units using it.

With sourceset, I can't find an easier way out than declaring an extra
dependency for dbus-display1 generate code.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui/dbus: set mouse is-absolute during console creation
Marc-André Lureau [Tue, 15 Nov 2022 13:47:40 +0000 (17:47 +0400)]
ui/dbus: set mouse is-absolute during console creation

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
16 months agoaudio/dbus: there are no sender for p2p mode
Marc-André Lureau [Tue, 15 Nov 2022 12:19:43 +0000 (16:19 +0400)]
audio/dbus: there are no sender for p2p mode

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui/dbus: unregister clipboard on connection close
Marc-André Lureau [Tue, 15 Nov 2022 12:12:13 +0000 (16:12 +0400)]
ui/dbus: unregister clipboard on connection close

Fixes unregistration with p2p connections, since they don't have an
associated name owner.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
16 months agoui/dbus: initialize cursor_fb
Marc-André Lureau [Tue, 14 Feb 2023 15:15:09 +0000 (19:15 +0400)]
ui/dbus: initialize cursor_fb

Or else, we may randomly destroy some textures..

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
16 months agoqemu-options.hx: remove stray quote
John Snow [Thu, 2 Feb 2023 22:31:21 +0000 (17:31 -0500)]
qemu-options.hx: remove stray quote

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230202223121.252073-1-jsnow@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
16 months agoMerge tag 'pull-request-2023-03-13' of https://gitlab.com/thuth/qemu into staging
Peter Maydell [Mon, 13 Mar 2023 17:09:32 +0000 (17:09 +0000)]
Merge tag 'pull-request-2023-03-13' of https://gitlab.com/thuth/qemu into staging

* One more fix for the migration qtest
* Remove the edk2 gitlab-CI job
* Improve the build-system-alpine CI job
* Fix emulation of the CHRL/CGHRL s390x instructions

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmQPLmgRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbUrlhAAsfqqK5UQodnUTfuu/XitdLaMc31Hbqrt
# aKbKvg/ejL2cMzNC0bTZU1Xv8lx09HEij27Fod5O2z73y25FZIn+7mz8POhSeK0k
# C07mrssaPUzM7OcnFmXrsQ6jRSDJEtMLSiYHly4UKjeokV7YAk9gxjrF2CVPOqg3
# YsZFrY6HZHX3H3Me2rtDKgwxzohfwpVKKZS7oO+yUfRgPdcK0jsIkpBKgQjTfNys
# CNtUH5ULC6IBdigiMAW66rNDetwkhoKyfuNcEmOCBR93v/kSDLJugnVcgJlxwwq+
# 8ULr4zBlf3MlmZ5xZlPdZ/7dxfdB2LhSALi476ebnVlHq8TIxsPOVJiJ8K3oqUxP
# OfrLhn7el/qozl+aUhfHtoWfYZ0NI/+qffgXFOca/zi5UyqmTXs5GBjZIEoYUsoW
# Vs9mXyoZelHYn0b3u2ClGMiZjPGACYSTVFQJevNKOTxm4gwGpFK7aH5pmkJpFsJW
# 582DXFIFk2Dj0flThAxYcZE2QlnDgglvIaKB5ZuaUyIZeugRMVbO1euqik6WzIFN
# tm8wxRmYi7ao388YXYQd/OFSaYuk5A2AG3cmfev4164z87rtCitOUHa8TPvA5oTL
# /xbJMymKq6yCQpEDEaWQox6Wk1jhEv/Zzg3iT0hv1aVPn79bnPJDmm0me6U1yDLl
# sLco473rMHI=
# =uugc
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 13 Mar 2023 14:08:40 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2023-03-13' of https://gitlab.com/thuth/qemu:
  tests/tcg/s390x: Add C(G)HRL test
  target/s390x: Fix emulation of C(G)HRL
  gitlab-ci.d/buildtest: Rework the target list of build-system-alpine
  gitlab-ci: Remove job building EDK2 firmware binaries
  tests/migration: Tweek auto converge limits check

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
16 months agotcg: Drop tcg_const_*
Richard Henderson [Mon, 27 Feb 2023 05:16:25 +0000 (19:16 -1000)]
tcg: Drop tcg_const_*

These functions are no longer used.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotcg: Drop tcg_const_*_vec
Richard Henderson [Sun, 26 Feb 2023 23:57:36 +0000 (13:57 -1000)]
tcg: Drop tcg_const_*_vec

Replace with tcg_constant_vec*.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/tricore: Use min/max for saturate
Richard Henderson [Sun, 26 Feb 2023 22:30:27 +0000 (12:30 -1000)]
target/tricore: Use min/max for saturate

Use tcg_constant_i32 for the bounds.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Avoid tcg_const_* in translate.c
Richard Henderson [Sun, 26 Feb 2023 19:11:38 +0000 (09:11 -1000)]
target/ppc: Avoid tcg_const_* in translate.c

All remaining uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Fix gen_tlbsx_booke206
Richard Henderson [Sun, 26 Feb 2023 19:08:09 +0000 (09:08 -1000)]
target/ppc: Fix gen_tlbsx_booke206

Fix incorrect read from rD.
Avoid adding 0 when rA == 0.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Rewrite trans_ADDG6S
Richard Henderson [Sun, 26 Feb 2023 18:45:26 +0000 (08:45 -1000)]
target/ppc: Rewrite trans_ADDG6S

Compute all carry bits in parallel instead of a loop.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Avoid tcg_const_* in power8-pmu-regs.c.inc
Richard Henderson [Sun, 26 Feb 2023 19:11:11 +0000 (09:11 -1000)]
target/ppc: Avoid tcg_const_* in power8-pmu-regs.c.inc

All uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Avoid tcg_const_* in fp-impl.c.inc
Richard Henderson [Sun, 26 Feb 2023 04:37:22 +0000 (18:37 -1000)]
target/ppc: Avoid tcg_const_* in fp-impl.c.inc

All uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Avoid tcg_const_* in vsx-impl.c.inc
Richard Henderson [Sun, 26 Feb 2023 04:32:23 +0000 (18:32 -1000)]
target/ppc: Avoid tcg_const_* in vsx-impl.c.inc

All remaining uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Avoid tcg_const_* in xxeval
Richard Henderson [Sun, 26 Feb 2023 04:32:04 +0000 (18:32 -1000)]
target/ppc: Avoid tcg_const_* in xxeval

Initialize a new temp instead of tcg_const_*.
Fix a pasto in a comment.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Avoid tcg_const_* in vmx-impl.c.inc
Richard Henderson [Sun, 26 Feb 2023 04:18:31 +0000 (18:18 -1000)]
target/ppc: Avoid tcg_const_* in vmx-impl.c.inc

All remaining uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Avoid tcg_const_i64 in do_vcntmb
Richard Henderson [Sun, 26 Feb 2023 04:17:50 +0000 (18:17 -1000)]
target/ppc: Avoid tcg_const_i64 in do_vcntmb

Compute both partial results separately and accumulate
at the end, instead of accumulating in the middle.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/m68k: Use tcg_constant_i32 in gen_ea_mode
Richard Henderson [Sun, 26 Feb 2023 00:12:24 +0000 (14:12 -1000)]
target/m68k: Use tcg_constant_i32 in gen_ea_mode

Return a constant for an immediate input.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Avoid tcg_const_ptr in handle_rev
Richard Henderson [Sat, 25 Feb 2023 22:29:41 +0000 (12:29 -1000)]
target/arm: Avoid tcg_const_ptr in handle_rev

Here it is not trivial to notice first initialization, so explicitly
zero the temps.  Use an array for the output, rather than separate
tcg_rd/tcg_rd_hi variables.

Fixes a bug by adding a missing clear_vec_high.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn
Richard Henderson [Sat, 25 Feb 2023 22:24:07 +0000 (12:24 -1000)]
target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn

It is easy enough to use mov instead of or-with-zero
and relying on the optimizer to fold away the or.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Avoid tcg_const_ptr in disas_simd_zip_trn
Richard Henderson [Sat, 25 Feb 2023 22:05:00 +0000 (12:05 -1000)]
target/arm: Avoid tcg_const_ptr in disas_simd_zip_trn

It is easy enough to use mov instead of or-with-zero and relying
on the optimizer to fold away the or.  Use an array for the output,
rather than separate tcg_res{l,h} variables.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Avoid tcg_const_* in translate-mve.c
Richard Henderson [Sat, 25 Feb 2023 21:32:36 +0000 (11:32 -1000)]
target/arm: Avoid tcg_const_* in translate-mve.c

All uses are in the context of an accumulator conditionally
having a zero input.  Split the rda variable to rda_{i,o},
and set rda_i to tcg_constant_foo(0) when required.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Avoid tcg_const_ptr in gen_sve_{ldr,str}
Richard Henderson [Sat, 25 Feb 2023 21:22:38 +0000 (11:22 -1000)]
target/arm: Avoid tcg_const_ptr in gen_sve_{ldr,str}

This hides the implicit initialization of a variable.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Improve trans_BFCI
Richard Henderson [Sat, 25 Feb 2023 21:19:48 +0000 (11:19 -1000)]
target/arm: Improve trans_BFCI

Reorg temporary usage so that we can use tcg_constant_i32.
tcg_gen_deposit_i32 already has a width == 32 special case,
so remove the check here.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Create gen_set_rmode, gen_restore_rmode
Richard Henderson [Sat, 25 Feb 2023 21:06:53 +0000 (11:06 -1000)]
target/arm: Create gen_set_rmode, gen_restore_rmode

Split out common subroutines for handing rounding mode
changes during translation.  Use tcg_constant_i32 and
tcg_temp_new_i32 instead of tcg_const_i32.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Consistently use ARMFPRounding during translation
Richard Henderson [Sat, 25 Feb 2023 20:52:58 +0000 (10:52 -1000)]
target/arm: Consistently use ARMFPRounding during translation

In preparation for extracting new helpers, ensure that
the rounding mode is represented as ARMFPRounding and
not FloatRoundMode.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Improve arm_rmode_to_sf
Richard Henderson [Sat, 25 Feb 2023 20:48:08 +0000 (10:48 -1000)]
target/arm: Improve arm_rmode_to_sf

Use proper enumeration types for input and output.
Use a const array to perform the mapping, with an
assert that the input is valid.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Handle FPROUNDING_ODD in arm_rmode_to_sf
Richard Henderson [Sat, 25 Feb 2023 20:28:05 +0000 (10:28 -1000)]
target/arm: Handle FPROUNDING_ODD in arm_rmode_to_sf

While this enumerator has been present since the first commit,
it isn't ever used.  The first actual use of round-to-odd came
with SVE, which currently uses float_round_to_odd instead of
the arm-specific enumerator.

Amusingly, the comment about unhandled TIEAWAY has been
out of date since the initial commit of translate-a64.c.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/arm: Use rmode >= 0 for need_rmode
Richard Henderson [Sat, 25 Feb 2023 19:48:58 +0000 (09:48 -1000)]
target/arm: Use rmode >= 0 for need_rmode

Initialize rmode to -1 instead of keeping two variables.
This is already used elsewhere in translate-a64.c.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotcg: Replace tcg_const_i64 in tcg-op.c
Richard Henderson [Sun, 26 Feb 2023 23:58:13 +0000 (13:58 -1000)]
tcg: Replace tcg_const_i64 in tcg-op.c

These three instances got missed in previous conversion.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/tricore: Avoid tcg_const_i32
Richard Henderson [Sun, 26 Feb 2023 22:36:01 +0000 (12:36 -1000)]
target/tricore: Avoid tcg_const_i32

All remaining uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/tricore: Drop some temp initialization
Richard Henderson [Sun, 26 Feb 2023 22:35:42 +0000 (12:35 -1000)]
target/tricore: Drop some temp initialization

The temp variables here are always set afterward;
the initialization with a constant was discarded.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/tricore: Use setcondi instead of explicit allocation
Richard Henderson [Sun, 26 Feb 2023 22:32:01 +0000 (12:32 -1000)]
target/tricore: Use setcondi instead of explicit allocation

This removes the only use of temp.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/tricore: Rename t_off10 and use tcg_constant_i32
Richard Henderson [Sun, 26 Feb 2023 22:28:18 +0000 (12:28 -1000)]
target/tricore: Rename t_off10 and use tcg_constant_i32

While temp3 could simply be initialized with tcg_constant_i32,
the renaming makes the purpose clearer.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/tricore: Split t_n as constant from temp as variable
Richard Henderson [Sun, 26 Feb 2023 22:23:18 +0000 (12:23 -1000)]
target/tricore: Split t_n as constant from temp as variable

As required, allocate temp separately.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotcg/sparc: Avoid tcg_const_tl in gen_edge
Richard Henderson [Sun, 26 Feb 2023 21:14:48 +0000 (11:14 -1000)]
tcg/sparc: Avoid tcg_const_tl in gen_edge

Push tcg_constant_tl into the shift argument directly.
Since t1 no longer exists as a temp, replace with lo1,
whose last use was just above.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/sh4: Avoid tcg_const_i32
Richard Henderson [Sun, 26 Feb 2023 20:53:01 +0000 (10:53 -1000)]
target/sh4: Avoid tcg_const_i32

All remaining uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/sh4: Avoid tcg_const_i32 for TAS.B
Richard Henderson [Sun, 26 Feb 2023 20:52:48 +0000 (10:52 -1000)]
target/sh4: Avoid tcg_const_i32 for TAS.B

Since we're assigning to cpu_sr_t in the end,
use that as the intermediate temp as well.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/s390x: Avoid tcg_const_i64
Richard Henderson [Sun, 26 Feb 2023 20:43:27 +0000 (10:43 -1000)]
target/s390x: Avoid tcg_const_i64

All uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/rx: Avoid tcg_const_i32
Richard Henderson [Sun, 26 Feb 2023 20:13:07 +0000 (10:13 -1000)]
target/rx: Avoid tcg_const_i32

All remaining uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/rx: Avoid tcg_const_i32 when new temp needed
Richard Henderson [Sun, 26 Feb 2023 20:12:45 +0000 (10:12 -1000)]
target/rx: Avoid tcg_const_i32 when new temp needed

These three cases use a constant as first input, and
then overwrite the temp in the output.  Separate them.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/rx: Use cpu_psw_z as temp in flags computation
Richard Henderson [Sun, 26 Feb 2023 20:09:44 +0000 (10:09 -1000)]
target/rx: Use cpu_psw_z as temp in flags computation

Since PSW_Z = PSW_S, we can move that assignment to the end
and use PSW_Z as a temporary while computing PSW_O.
Use tcg_constant_i32 instead of tcg_const_i32.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/rx: Use tcg_gen_abs_i32
Richard Henderson [Sun, 26 Feb 2023 20:03:02 +0000 (10:03 -1000)]
target/rx: Use tcg_gen_abs_i32

Remove the local definition of rx_abs.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Avoid tcg_const_i64 in do_vector_shift_quad
Richard Henderson [Sun, 26 Feb 2023 04:16:43 +0000 (18:16 -1000)]
target/ppc: Avoid tcg_const_i64 in do_vector_shift_quad

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Split out gen_vx_vmul10
Richard Henderson [Sun, 26 Feb 2023 04:01:07 +0000 (18:01 -1000)]
target/ppc: Split out gen_vx_vmul10

Move the body out of this large macro.
Use tcg_constant_i64.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/mips: Avoid tcg_const_* throughout
Richard Henderson [Sun, 26 Feb 2023 03:46:54 +0000 (17:46 -1000)]
target/mips: Avoid tcg_const_* throughout

All remaining uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/mips: Avoid tcg_const_tl in gen_r6_ld
Richard Henderson [Sun, 26 Feb 2023 03:46:36 +0000 (17:46 -1000)]
target/mips: Avoid tcg_const_tl in gen_r6_ld

Allocate a separate temp for modification.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/mips: Split out gen_lxr
Richard Henderson [Sun, 26 Feb 2023 03:40:49 +0000 (17:40 -1000)]
target/mips: Split out gen_lxr

Common subroutine for LDR and LWR.
Use tcg_constant_tl of ~1 instead of tcg_const_tl of 0x..fe.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/mips: Split out gen_lxl
Richard Henderson [Sun, 26 Feb 2023 03:28:36 +0000 (17:28 -1000)]
target/mips: Split out gen_lxl

Common subroutine for LDL and LWL.
Use tcg_constant_tl instead of tcg_const_tl and t2.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/m68k: Avoid tcg_const_* throughout
Richard Henderson [Sun, 26 Feb 2023 01:39:06 +0000 (15:39 -1000)]
target/m68k: Avoid tcg_const_* throughout

All remaining uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/m68k: Avoid tcg_const_i32 in bfop_reg
Richard Henderson [Sun, 26 Feb 2023 01:37:18 +0000 (15:37 -1000)]
target/m68k: Avoid tcg_const_i32 in bfop_reg

Tidy up the whole function, hoisting is_bfffo as a common test
for whether tlen and tofs needed. Use tcg_constant_i32, and load
a separate temporary for mask.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/m68k: Avoid tcg_const_i32 when modified
Richard Henderson [Sun, 26 Feb 2023 01:05:31 +0000 (15:05 -1000)]
target/m68k: Avoid tcg_const_i32 when modified

In several instances, a temp is initialized with a
for use as a constant, and then subsequently used
as an unrelated temp.  Split them.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/i386: Avoid use of tcg_const_* throughout
Richard Henderson [Sat, 25 Feb 2023 23:26:02 +0000 (13:26 -1000)]
target/i386: Avoid use of tcg_const_* throughout

All uses are strictly read-only.  Most of the obviously so,
as direct arguments to gen_helper_*.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/hppa: Avoid use of tcg_const_i32 throughout
Richard Henderson [Sat, 25 Feb 2023 23:05:46 +0000 (13:05 -1000)]
target/hppa: Avoid use of tcg_const_i32 throughout

All uses were read-write, so replace with a new
allocation and initialization.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/hppa: Avoid tcg_const_i64 in trans_fid_f
Richard Henderson [Sat, 25 Feb 2023 23:01:12 +0000 (13:01 -1000)]
target/hppa: Avoid tcg_const_i64 in trans_fid_f

Use a C test instead of a pre-processor test for the id.
Use tcg_constant_i64 instead of tcg_const_i64.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/cris: Avoid use of tcg_const_i32 throughout
Richard Henderson [Sat, 25 Feb 2023 22:44:04 +0000 (12:44 -1000)]
target/cris: Avoid use of tcg_const_i32 throughout

All remaining uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/avr: Avoid use of tcg_const_i32 throughout
Richard Henderson [Sat, 25 Feb 2023 22:39:04 +0000 (12:39 -1000)]
target/avr: Avoid use of tcg_const_i32 throughout

All remaining uses are strictly read-only.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/avr: Avoid use of tcg_const_i32 in SBIC, SBIS
Richard Henderson [Sat, 25 Feb 2023 22:38:14 +0000 (12:38 -1000)]
target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS

The use of separate data/port variables is existing
practice elsewhere, e.g. SBI, CBI.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agoinclude/exec: Remove guards around `NB_MMU_MODES`
Anton Johansson [Mon, 6 Mar 2023 17:52:30 +0000 (18:52 +0100)]
include/exec: Remove guards around `NB_MMU_MODES`

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-24-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/xtensa: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:29 +0000 (18:52 +0100)]
target/xtensa: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-23-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/tricore: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:28 +0000 (18:52 +0100)]
target/tricore: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-22-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/sparc: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:27 +0000 (18:52 +0100)]
target/sparc: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-21-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/sh4: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:26 +0000 (18:52 +0100)]
target/sh4: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-20-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/s390x: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:25 +0000 (18:52 +0100)]
target/s390x: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-19-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/rx: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:24 +0000 (18:52 +0100)]
target/rx: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-18-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/riscv: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:23 +0000 (18:52 +0100)]
target/riscv: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-17-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/ppc: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:22 +0000 (18:52 +0100)]
target/ppc: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-16-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/openrisc: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:21 +0000 (18:52 +0100)]
target/openrisc: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-15-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/nios2: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:20 +0000 (18:52 +0100)]
target/nios2: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-14-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/mips: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:19 +0000 (18:52 +0100)]
target/mips: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-13-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/microblaze: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:18 +0000 (18:52 +0100)]
target/microblaze: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-12-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/m68k: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:17 +0000 (18:52 +0100)]
target/m68k: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-11-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/loongarch: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:16 +0000 (18:52 +0100)]
target/loongarch: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-10-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/i386: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:15 +0000 (18:52 +0100)]
target/i386: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-9-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/hppa: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:14 +0000 (18:52 +0100)]
target/hppa: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-8-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
16 months agotarget/hexagon: Remove `NB_MMU_MODES` define
Anton Johansson [Mon, 6 Mar 2023 17:52:13 +0000 (18:52 +0100)]
target/hexagon: Remove `NB_MMU_MODES` define

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230306175230.7110-7-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>