qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Leon Alrae <leon.alrae@imgtec.com>, qemu-devel@nongnu.org
Cc: amit.shah@redhat.com, macro@linux-mips.org, aurelien@aurel32.net,
	quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] target-mips: add missing MSA and correct FP in VMState
Date: Thu, 19 Feb 2015 07:43:41 -0800	[thread overview]
Message-ID: <54E604AD.8070602@twiddle.net> (raw)
In-Reply-To: <1424271115-7885-3-git-send-email-leon.alrae@imgtec.com>

On 02/18/2015 06:51 AM, Leon Alrae wrote:
>  static VMStateField vmstate_fpu_fields[] = {
>      VMSTATE_FPR_ARRAY(fpr, CPUMIPSFPUContext, 32),
> -    VMSTATE_INT8(fp_status.float_detect_tininess, CPUMIPSFPUContext),
> +    VMSTATE_UINT8(fp_status.flush_to_zero, CPUMIPSFPUContext),
>      VMSTATE_INT8(fp_status.float_rounding_mode, CPUMIPSFPUContext),
>      VMSTATE_INT8(fp_status.float_exception_flags, CPUMIPSFPUContext),
>      VMSTATE_UINT32(fcr0, CPUMIPSFPUContext),
> @@ -70,6 +78,11 @@ static VMStateField vmstate_tc_fields[] = {
>      VMSTATE_UINTTL(CP0_TCScheFBack, TCState),
>      VMSTATE_INT32(CP0_Debug_tcstatus, TCState),
>      VMSTATE_UINTTL(CP0_UserLocal, TCState),
> +    VMSTATE_INT32(msacsr, TCState),
> +    VMSTATE_INT8(msa_fp_status.float_rounding_mode, TCState),
> +    VMSTATE_INT8(msa_fp_status.float_exception_flags, TCState),
> +    VMSTATE_UINT8(msa_fp_status.flush_to_zero, TCState),
> +    VMSTATE_UINT8(msa_fp_status.flush_inputs_to_zero, TCState),
>      VMSTATE_END_OF_LIST()
>  };

Surely these fp_status fields are simply implementation of the architectural
CSR registers?

IMO you shouldn't store things related to TCG state, but always how the
architecture represents it.  That way you're free to change the TCG
implementation without breaking save/restore.


r~

  reply	other threads:[~2015-02-19 15:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 14:51 [Qemu-devel] [PATCH 0/2] target-mips: port MIPS CPU to VMState Leon Alrae
2015-02-18 14:51 ` [Qemu-devel] [PATCH 1/2] target-mips: replace cpu_save/cpu_load with VMStateDescription Leon Alrae
2015-02-18 16:59   ` Andreas Färber
2015-02-19 10:23     ` Leon Alrae
2015-02-18 14:51 ` [Qemu-devel] [PATCH 2/2] target-mips: add missing MSA and correct FP in VMState Leon Alrae
2015-02-19 15:43   ` Richard Henderson [this message]
2015-02-19 16:43     ` Leon Alrae
2015-02-20 13:12       ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54E604AD.8070602@twiddle.net \
    --to=rth@twiddle.net \
    --cc=amit.shah@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=leon.alrae@imgtec.com \
    --cc=macro@linux-mips.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).