qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 709a34: tcg/sparc: Zero extend data argument


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 709a34: tcg/sparc: Zero extend data argument to store help...
Date: Mon, 03 Apr 2017 05:45:09 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 709a340d679d95a0c6cbb9b5f654498f04345b50
      
https://github.com/qemu/qemu/commit/709a340d679d95a0c6cbb9b5f654498f04345b50
  Author: Peter Maydell <address@hidden>
  Date:   2017-04-03 (Mon, 03 Apr 2017)

  Changed paths:
    M tcg/sparc/tcg-target.inc.c

  Log Message:
  -----------
  tcg/sparc: Zero extend data argument to store helpers

The C store helper functions take the data argument as a uint8_t,
uint16_t, etc depending on the store size. The SPARC calling
convention requires that data types smaller than the register
size must be extended by the caller. We weren't doing this,
which meant that if QEMU was compiled with optimizations enabled
we could end up storing incorrect values to guest memory.
(In particular the i386 guest BIOS would crash on startup.)

Add code to the trampolines that call the store helpers to
do the zero extension as required.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Reviewed-by: Richard Henderson <address@hidden>


  Commit: 5c32be5baf41aec4f4675d2bf24f9948756abf3c
      
https://github.com/qemu/qemu/commit/5c32be5baf41aec4f4675d2bf24f9948756abf3c
  Author: Peter Maydell <address@hidden>
  Date:   2017-04-03 (Mon, 03 Apr 2017)

  Changed paths:
    M tcg/sparc/tcg-target.inc.c

  Log Message:
  -----------
  tcg/sparc: Zero extend address argument to ld/st helpers

The C store helper functions take the address argument as a
target_ulong type; if this is 32 bit but the host is 64 bit
then the SPARC calling convention requires that the caller
must zero extend the value. We weren't doing this, which
meant we could pass values to the caller with high bits set
and QEMU would crash if it was compiled with optimizations.
In particular, the i386 BIOS would not start.

Signed-off-by: Peter Maydell <address@hidden>
Message-id: address@hidden
Reviewed-by: Richard Henderson <address@hidden>


  Commit: 6499fd151daa88a136939775dd6002235cafb193
      
https://github.com/qemu/qemu/commit/6499fd151daa88a136939775dd6002235cafb193
  Author: Peter Maydell <address@hidden>
  Date:   2017-04-03 (Mon, 03 Apr 2017)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Mark SPARC as supported

Thanks to John Paul Adrian Glaubitz <address@hidden>
and the Debian Project, we now have access to a SPARC Linux
system we can use for build testing. Move SPARC back into
the "supported" list.

Signed-off-by: Peter Maydell <address@hidden>
Message-id: address@hidden


Compare: https://github.com/qemu/qemu/compare/f9e46d37bd19...6499fd151daa

reply via email to

[Prev in Thread] Current Thread [Next in Thread]