qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 12/17] s390x: Prepare cpu.h for emulation


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 12/17] s390x: Prepare cpu.h for emulation
Date: Mon, 28 Mar 2011 15:54:49 +0100

On 24 March 2011 15:58, Alexander Graf <address@hidden> wrote:
> diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h

Minor nits only.

> -    FPReg fregs[16]; /* FP registers */
> +    CPU_DoubleU fregs[16]; /* FP registers */

These changes mean that the FPReg typedef in this file is no longer
used, so you might as well delete it.

Personally I prefer the way target-arm handles float regs,
ie it just has 'float64 regs[32]' and relies on them being
the right representation to pass in registers. This is
less likely to work with float128s though, and anyway I suspect
Nathan would disagree with me, so this isn't a request to change
this code.

> +#define EXCP_EXT  1
> +
> +#define EXCP_SVC 2 /* supervisor call (syscall) */
> +#define EXCP_PGM 3 /* program interruption */
> +/* XXX */
> +#define EXCP_EXECUTE_SVC 0xff00000 /* supervisor call via execute insn */

This comment ought to have an explanation of what the issue is
that means it's 'XXX'...

> +    CC_OP_ADD_64,               /* */
> +    CC_OP_ADDU_64,              /* */
> +    CC_OP_SUB_64,               /* */
> +    CC_OP_SUBU_64,              /* */
> +    CC_OP_ABS_64,               /* */
> +    CC_OP_NABS_64,              /* */

Why the empty comments?

> +static inline uint64_t time2tod(uint64_t time) {
> +    return (time << 9) / 125;
> +}

Could maybe use a comment about what units we're converting
to and from here.

-- PMM



reply via email to

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