qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <andreas.faerber@web.de>
To: Khansa Butt <khansa@kics.edu.pk>
Cc: qemu-devel Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 2/3] target-mips:enabling of 64 bit user mode and floating point operations MIPS_HFLAG_UX is included in env->hflags so that the address computation for LD instruction does not treated as 32 bit code see gen_op_addr_add() in t
Date: Sat, 31 Dec 2011 12:54:52 +0100	[thread overview]
Message-ID: <4EFEF80C.4010702@web.de> (raw)
In-Reply-To: <CAAoJSP677G-bsiZ3W=D_O5DiwyKv=XtEWgU_6wH2LztGBK2s8A@mail.gmail.com>

Am 31.12.2011 08:42, schrieb Khansa Butt:
> On Fri, Dec 9, 2011 at 5:04 AM, Andreas Färber <andreas.faerber@web.de> wrote:
>> Am 08.12.2011 06:25, schrieb khansa@kics.edu.pk:
>>> diff --git a/target-mips/translate.c b/target-mips/translate.c
>>> index d5b1c76..452a63b 100644
>>> --- a/target-mips/translate.c
>>> +++ b/target-mips/translate.c
>>> @@ -12779,6 +12779,10 @@ void cpu_reset (CPUMIPSState *env)
>>>          env->hflags |= MIPS_HFLAG_FPU;
>>>      }
>>>  #ifdef TARGET_MIPS64
>>> +    env->hflags |=  MIPS_HFLAG_UX;
>>
>> So for those of us not knowing mips, it's defined as:
>>
>> #define MIPS_HFLAG_UX     0x00200 /* 64-bit user mode                 */
>>
>> The code above is inside CONFIG_USER_ONLY, so this looks right for n64
>> but not for n32 ABI.
>>
>> If you put this into its own patch with a description of
>>
>> ---8<---
>> target-mips: Enable 64 bit user mode for n64
>>
>> For user mode n64 ABI emulation, MIPS_HFLAG_UX is included in
>> env->hflags so that the address computation for LD instruction does not
>> get treated as 32 bit code, see gen_op_addr_add() in translate.c.
>>
>> Signed-off-by: Abdul Qadeer <qadeer@kics.edu.pk>
>> Signed-off-by: (you)
>> ---8<---
>>
>> and make it depend on TARGET_ABI_MIPSN64 then I will happily add my
>> Acked-by.
>>
> Why this is necessary to put "env->hflags |=  MIPS_HFLAG_UX;" line under
> TARGET_ABI_MIPSN64? as this was already put  under #if TARGET_MIPS64, is not
> it suffient?

You're right. I was under the impression that both n32 and n64 were
based off mips64, but mipsn32 is in fact based off mips. Adding NUBI64
support (as opposed to NUBI64W) would then probably be based off mips as
well then. Quite confusing.

So yes, no need to add #if defined(TARGET_ABI_MIPSN64) there, but do put
it in its own patch with a description explaining why.

Andreas

       reply	other threads:[~2011-12-31 11:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAAoJSP677G-bsiZ3W=D_O5DiwyKv=XtEWgU_6wH2LztGBK2s8A@mail.gmail.com>
2011-12-31 11:54 ` Andreas Färber [this message]
2011-12-29  8:06 [Qemu-devel] [PATCH 2/3] target-mips:enabling of 64 bit user mode and floating point operations MIPS_HFLAG_UX is included in env->hflags so that the address computation for LD instruction does not treated as 32 bit code see gen_op_addr_add() in t Khansa Butt
  -- strict thread matches above, loose matches on Subject: below --
2011-12-29  7:55 Khansa Butt
2011-12-29 11:17 ` Andreas Färber
     [not found]   ` <CAAoJSP5wPz_rL9x0ZZBZJz1A9RuGhohLKSg_nChyo96mvuJ70w@mail.gmail.com>
2011-12-30  7:52     ` Khansa Butt
2011-12-30 12:39       ` Andreas Färber

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=4EFEF80C.4010702@web.de \
    --to=andreas.faerber@web.de \
    --cc=khansa@kics.edu.pk \
    --cc=qemu-devel@nongnu.org \
    /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).