Richard Henderson
2786a3f8d3
target/sparc: Use GET_ASI_CODE for ASI_KERNELTXT and ASI_USERTXT
...
Reads are done with execute access. It is not clear whether writes
are legal at all -- for now, leave helper_st_asi unchanged, so that
we continue to raise an mmu fault.
This generalizes the exiting code for ASI_KERNELTXT to be usable for
ASI_USERTXT as well, by passing down the MemOpIdx to use.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2281
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2059
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1609
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1166
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Tested-by: M Bazz <bazz@bazz1.com >
2024-04-12 14:48:01 -07:00
Clément Chigot
c92948f22b
target/sparc: implement asr17 feature for smp
...
This allows the guest program to know its cpu id.
Co-developed-by: Frederic Konrad <konrad.frederic@yahoo.fr >
Signed-off-by: Clément Chigot <chigot@adacore.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-ID: <20240131085047.18458-6-chigot@adacore.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
2024-02-15 16:58:46 +01:00
Richard Henderson
d8c5b92f3f
target/sparc: Split fcc out of env->fsr
...
Represent each fcc field separately from the rest of fsr.
This vastly simplifies floating-point comparisons.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-22-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
c9fa8e586b
target/sparc: Remove cpu_fsr
...
Drop this field as a tcg global, loading it explicitly in the
few places required. This means that all FPop helpers may
once again be TCG_CALL_NO_WG.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-21-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
3590f01ed2
target/sparc: Split cexc and ftt from env->fsr
...
These two fields are adjusted by all FPop insns.
Having them separate makes it easier to set without masking.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-20-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
db71391123
target/sparc: Merge check_ieee_exceptions with FPop helpers
...
If an exception is to be raised, the destination fp register
should be unmodified. The current implementation is incorrect,
in that double results will be written back before calling
gen_helper_check_ieee_exceptions, despite the placement of
gen_store_fpr_D, since gen_dest_fpr_D returns cpu_fpr[].
We can simplify the entire implementation by having each
FPOp helper call check_ieee_exceptions. For the moment this
requires that all FPop helpers write to the TCG global cpu_fsr,
so remove TCG_CALL_NO_WG from the DEF_HELPER_FLAGS_*.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-19-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
1ccd6e13cc
target/sparc: Introduce cpu_get_fsr, cpu_put_fsr
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-16-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
ba21dc991b
target/sparc: Use i128 for Fdmulq
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-14-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
fdc50716a0
target/sparc: Use i128 for FdTOq, FxTOq
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-13-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
0b2a61cc26
target/sparc: Use i128 for FsTOq, FiTOq
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-12-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
f3ceafad5e
target/sparc: Use i128 for FCMPq, FCMPEq
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-11-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
25a5769e3b
target/sparc: Use i128 for FqTOd, FqTOx
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-10-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
d81e3efed9
target/sparc: Use i128 for FqTOs, FqTOi
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-9-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
16bedf89c1
target/sparc: Use i128 for FADDq, FSUBq, FMULq, FDIVq
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-8-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
e41716be4d
target/sparc: Use i128 for FSQRTq
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-7-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
daf457d40f
target/sparc: Inline FNEG, FABS
...
These are simple bit manipulation insns.
Begin using i128 for float128.
Implement FMOVq with do_qq.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20231103173841.33651-6-richard.henderson@linaro.org >
2024-02-03 16:46:10 +10:00
Richard Henderson
f3141174dd
target/sparc: Implement UDIVX and SDIVX inline
...
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2023-11-05 12:07:10 -08:00
Richard Henderson
b597eedcce
target/sparc: Remove CC_OP leftovers
...
All instructions have been converted to generate
full condition codes explicitly.
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2023-11-05 12:03:17 -08:00
Richard Henderson
1326010322
target/sparc: Remove CC_OP_DIV
...
Return both result and overflow from helper_[us]div.
Compute all flags explicitly in gen_op_[us]divcc.
Marginally improve the INT64_MIN special case in helper_sdiv.
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2023-11-05 11:53:36 -08:00
Richard Henderson
fafba1bb0b
target/sparc: Use tcg_gen_vec_{add,sub}*
...
Replace the local helpers for the same integer operations.
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2023-10-25 01:01:13 -07:00
Richard Henderson
da68140604
target/sparc: Merge LDFSR, LDXFSR implementations
...
Combine the helper to a single set_fsr().
Perform the mask and merge inline.
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2023-10-25 01:01:13 -07:00
Richard Henderson
186e78905a
target/sparc: Implement check_align inline
...
Emit the exception at the end of the translation block,
so that the non-exception case can fall through.
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2023-10-25 01:01:12 -07:00
Artyom Tarasenko
cbc3a6a4cc
target-sparc: implement UA2005 GL register
...
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com >
2017-01-18 22:03:44 +01:00
Richard Henderson
08da3180dc
target-sparc: Use ctpop helper
...
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2017-01-10 08:49:55 -08:00
Thomas Huth
fcf5ef2ab5
Move target-* CPU file into a target/ folder
...
We've currently got 18 architectures in QEMU, and thus 18 target-xxx
folders in the root folder of the QEMU source tree. More architectures
(e.g. RISC-V, AVR) are likely to be included soon, too, so the main
folder of the QEMU sources slowly gets quite overcrowded with the
target-xxx folders.
To disburden the main folder a little bit, let's move the target-xxx
folders into a dedicated target/ folder, so that target-xxx/ simply
becomes target/xxx/ instead.
Acked-by: Laurent Vivier <laurent@vivier.eu > [m68k part]
Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de > [tricore part]
Acked-by: Michael Walle <michael@walle.cc > [lm32 part]
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com > [s390x part]
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com > [s390x part]
Acked-by: Eduardo Habkost <ehabkost@redhat.com > [i386 part]
Acked-by: Artyom Tarasenko <atar4qemu@gmail.com > [sparc part]
Acked-by: Richard Henderson <rth@twiddle.net > [alpha part]
Acked-by: Max Filippov <jcmvbkbc@gmail.com > [xtensa part]
Reviewed-by: David Gibson <david@gibson.dropbear.id.au > [ppc part]
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com > [crisµblaze part]
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn > [unicore32 part]
Signed-off-by: Thomas Huth <thuth@redhat.com >
2016-12-20 21:52:12 +01:00