target-mips queue
Hi,
Here's my target-mips queue, few fixes and includes clean-up.
Thanks,
Leon
The following changes since commit 047e363b05679724d6b784c6ec6310697fe48ba0:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-softfloat-20160122' into staging (2016-01-22 15:19:21 +0000)
are available in the git repository at:
git://github.com/lalrae/qemu.git tags/mips-20160125
for you to fetch changes up to c684822ad29968af09735148f03a511bc514589d:
mips: Clean up includes (2016-01-23 14:30:04 +0000)
----------------------------------------------------------------
MIPS patches 2016-01-25
Changes:
* fixes and includes clean-up
----------------------------------------------------------------
Aurelien Jarno (1):
target-mips: silence NaNs for cvt.s.d and cvt.d.s
Dongxue Zhang (1):
target-mips/cpu.h: Fix spell error
Miodrag Dinic (1):
target-mips: Fix ALIGN instruction when bp=0
Peter Maydell (1):
mips: Clean up includes
disas/mips.c | 1 + hw/mips/addr.c | 1 + hw/mips/cputimer.c | 1 + hw/mips/gt64xxx_pci.c | 1 + hw/mips/mips_fulong2e.c | 1 + hw/mips/mips_int.c | 1 + hw/mips/mips_jazz.c | 1 + hw/mips/mips_malta.c | 1 + hw/mips/mips_mipssim.c | 1 + hw/mips/mips_r4k.c | 1 + target-mips/cpu.c | 1 + target-mips/cpu.h | 2 +- target-mips/dsp_helper.c | 1 + target-mips/gdbstub.c | 2 +- target-mips/helper.c | 6 +----- target-mips/kvm.c | 2 +- target-mips/lmi_helper.c | 1 + target-mips/machine.c | 1 + target-mips/mips-semi.c | 2 +- target-mips/msa_helper.c | 1 + target-mips/op_helper.c | 4 +++- target-mips/translate.c | 12 +++++++++++- 22 files changed, 34 insertions(+), 11 deletions(-)
[Qemu-devel] [PULL 1/4] target-mips/cpu.h: Fix spell error
From: Dongxue Zhang <[email protected]>
CP0IntCtl_IPPC1, the last letter should be 'i', not 'one'.
--- target-mips/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target-mips/cpu.h +1 -1
@@ -358,7 +358,7 @@ struct CPUMIPSState {#define CP0St_IE 0int32_t CP0_IntCtl;#define CP0IntCtl_IPTI 29 -#define CP0IntCtl_IPPC1 26 +#define CP0IntCtl_IPPCI 26#define CP0IntCtl_VS 5int32_t CP0_SRSCtl;#define CP0SRSCtl_HSS 26
Signature · 1 line
2.1.0
[Qemu-devel] [PULL 2/4] target-mips: silence NaNs for cvt.s.d and cvt.d.s
In reply to Leon AlraeFrom: Aurelien Jarno <[email protected]>
cvt.s.d and cvt.d.s are FP operations and thus need to convert input sNaN into corresponding qNaN. Explicitely use the floatXX_maybe_silence_nan functions for that as the floatXX_to_floatXX functions do not do that.
--- target-mips/op_helper.c | 2 ++ 1 file changed, 2 insertions(+)
target-mips/op_helper.c +2 -0
@@ -2545,6 +2545,7 @@ uint64_t helper_float_cvtd_s(CPUMIPSState *env, uint32_t fst0)uint64_t fdt2; fdt2 =float32_to_float64 (fst0, &env->active_fpu.fp_status); + fdt2 =float64_maybe_silence_nan (fdt2);update_fcr31 (env,GETPC ());return fdt2; }
@@ -2634,6 +2635,7 @@ uint32_t helper_float_cvts_d(CPUMIPSState *env, uint64_t fdt0)uint32_t fst2; fst2 =float64_to_float32 (fdt0, &env->active_fpu.fp_status); + fst2 =float32_maybe_silence_nan (fst2);update_fcr31 (env,GETPC ());return fst2; }
Signature · 1 line
2.1.0
[Qemu-devel] [PULL 3/4] target-mips: Fix ALIGN instruction when bp=0
In reply to Leon AlraeFrom: Miodrag Dinic <[email protected]>
If executing ALIGN with shift count bp=0 within mips64 emulation, the result of the operation should be sign extended.
Taken from the official documentation (pseudo code) :
ALIGN:
tmp_rt_hi = unsigned_word(GPR[rt]) << (8*bp) tmp_rs_lo = unsigned_word(GPR[rs]) >> (8*(4-bp)) tmp = tmp_rt_hi || tmp_rt_lo GPR[rd] = sign_extend.32(tmp)
--- target-mips/translate.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
target-mips/translate.c +10 -1
@@ -4630,7 +4630,16 @@ static void gen_align(DisasContext *ctx, int opc, int rd, int rs, int rt, t0 =tcg_temp_new ();gen_load_gpr (t0, rt);if (bp ==0 ) { -tcg_gen_mov_tl (cpu_gpr[rd], t0); +switch (opc) { +case OPC_ALIGN : +tcg_gen_ext32s_tl (cpu_gpr[rd], t0); +break ; +#if defined(TARGET_MIPS64 ) +case OPC_DALIGN : +tcg_gen_mov_tl (cpu_gpr[rd], t0); +break ; +#endif + } }else {TCGv t1 =tcg_temp_new ();gen_load_gpr (t1, rs);
Signature · 1 line
2.1.0
[Qemu-devel] [PULL 4/4] mips: Clean up includes
In reply to Leon AlraeFrom: Peter Maydell <[email protected]>
Clean up includes so that osdep.h is included first and headers which it implies are not included manually.
This commit was created with scripts/clean-includes.
--- disas/mips.c | 1 + hw/mips/addr.c | 1 + hw/mips/cputimer.c | 1 + hw/mips/gt64xxx_pci.c | 1 + hw/mips/mips_fulong2e.c | 1 + hw/mips/mips_int.c | 1 + hw/mips/mips_jazz.c | 1 + hw/mips/mips_malta.c | 1 + hw/mips/mips_mipssim.c | 1 + hw/mips/mips_r4k.c | 1 + target-mips/cpu.c | 1 + target-mips/dsp_helper.c | 1 + target-mips/gdbstub.c | 2 +- target-mips/helper.c | 6 +----- target-mips/kvm.c | 2 +- target-mips/lmi_helper.c | 1 + target-mips/machine.c | 1 + target-mips/mips-semi.c | 2 +- target-mips/msa_helper.c | 1 + target-mips/op_helper.c | 2 +- target-mips/translate.c | 1 + 21 files changed, 21 insertions(+), 9 deletions(-)
disas/mips.c +1 -0
@@ -19,6 +19,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "disas/bfd.h" /* mips.h. Mips opcode list for GDB, the GNU debugger.
hw/mips/addr.c +1 -0
@@ -20,6 +20,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/mips/cpudevs.h"
hw/mips/cputimer.c +1 -0
@@ -20,6 +20,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/mips/cpudevs.h" #include "qemu/timer.h"
hw/mips/gt64xxx_pci.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/mips/mips.h" #include "hw/pci/pci.h"
hw/mips/mips_fulong2e.c +1 -0
@@ -18,6 +18,7 @@* http://www.loongsondeveloper.com/doc/Loongson2EUserGuide.pdf */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/i386/pc.h" #include "hw/char/serial.h"
hw/mips/mips_int.c +1 -0
@@ -20,6 +20,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/mips/cpudevs.h" #include "cpu.h"
hw/mips/mips_jazz.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/mips/mips.h" #include "hw/mips/cpudevs.h"
hw/mips/mips_malta.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/i386/pc.h" #include "hw/char/serial.h"
hw/mips/mips_mipssim.c +1 -0
@@ -24,6 +24,7 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/mips/mips.h" #include "hw/mips/cpudevs.h"
hw/mips/mips_r4k.c +1 -0
@@ -7,6 +7,7 @@* All peripherial devices are attached to this "bus" with * the standard PC ISA addresses. */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/mips/mips.h" #include "hw/mips/cpudevs.h"
target-mips/cpu.c +1 -0
@@ -18,6 +18,7 @@* <http://www.gnu.org/licenses/lgpl-2.1.html> */ +#include "qemu/osdep.h" #include "cpu.h" #include "kvm_mips.h" #include "qemu-common.h"
target-mips/dsp_helper.c +1 -0
@@ -17,6 +17,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "cpu.h" #include "exec/helper-proto.h" #include "qemu/bitops.h"
target-mips/gdbstub.c +1 -1
@@ -17,7 +17,7 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include "config.h" +#include "qemu/osdep.h" #include "qemu-common.h" #include "exec/gdbstub.h"
target-mips/helper.c +1 -5
@@ -16,11 +16,7 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include <stdarg.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <inttypes.h> +#include "qemu/osdep.h" #include "cpu.h" #include "sysemu/kvm.h"
target-mips/kvm.c +1 -1
@@ -9,7 +9,7 @@* Authors: Sanjay Lal <[email protected]> */ -#include <sys/types.h> +#include "qemu/osdep.h" #include <sys/ioctl.h> #include <sys/mman.h>
target-mips/lmi_helper.c +1 -0
@@ -17,6 +17,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "cpu.h" #include "exec/helper-proto.h"
target-mips/machine.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "hw/hw.h" #include "cpu.h"
target-mips/mips-semi.c +1 -1
@@ -17,7 +17,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sys/stat.h> +#include "qemu/osdep.h" #include "cpu.h" #include "exec/helper-proto.h" #include "exec/softmmu-semi.h"
target-mips/msa_helper.c +1 -0
@@ -17,6 +17,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "cpu.h" #include "exec/helper-proto.h"
target-mips/op_helper.c +1 -1
@@ -16,7 +16,7 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include <stdlib.h> +#include "qemu/osdep.h" #include "cpu.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h"
target-mips/translate.c +1 -0
@@ -21,6 +21,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "cpu.h" #include "disas/disas.h" #include "tcg-op.h"
Signature · 1 line
2.1.0
Peter Maydell
AppliedQuoted 20 lines · Leon Alrae
Hi,
Here's my target-mips queue, few fixes and includes clean-up.
Thanks,
LeonCc Peter Maydell <[email protected]>Cc Aurelien Jarno <[email protected]>The following changes since commit
047e363b05679724d6b784c6ec6310697fe48ba0:Merge remote-tracking branch 'remotes/pmaydell/tags/pull-softfloat-20160122' into staging (2016-01-22 15:19:21 +0000)
are available in the git repository at:
git://github.com/lalrae/qemu.gittags/mips-20160125for you to fetch changes up to
c684822ad29968af09735148f03a511bc514589d:
Quoted 7 lines
mips: Clean up includes (2016-01-23 14:30:04 +0000)
----------------------------------------------------------------
MIPS patches 2016-01-25Changes:
* fixes and includes clean-up
Applied, thanks.
-- PMM