All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Tony Wu <tung7970@gmail.com>
Cc: ralf@linux-mips.org, Steven.Hill@imgtec.com, linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: microMIPS: Refactor mips16 get_frame_info support
Date: Fri, 24 May 2013 10:30:13 -0700	[thread overview]
Message-ID: <519FA3A5.7070408@gmail.com> (raw)
In-Reply-To: <20130524145535.GA5369@hades>

On 05/24/2013 07:55 AM, Tony Wu wrote:
[...]
>
> Signed-off-by: Tony Wu <tung7970@gmail.com>
> Cc: Steven J. Hill <Steven.Hill@imgtec.com>
> ---
>   arch/mips/kernel/process.c |  214 +++++++++++++++++++++++++++++---------------
>   1 file changed, 141 insertions(+), 73 deletions(-)
>
> diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
> index c6a041d..c335a7f 100644
> --- a/arch/mips/kernel/process.c
> +++ b/arch/mips/kernel/process.c
> @@ -211,14 +211,17 @@ struct mips_frame_info {
>   	int		pc_offset;
>   };
>
> +#ifdef CONFIG_CPU_MICROMIPS
> +#define J_TARGET(pc,target)	\
> +		(((unsigned long)(pc) & 0xf8000000) | ((target) << 1))
> +#else
>   #define J_TARGET(pc,target)	\
>   		(((unsigned long)(pc) & 0xf0000000) | ((target) << 2))
> +#endif

I really dislike this #ifdefery.


>
>   static inline int is_ra_save_ins(union mips_instruction *ip)
>   {
>   #ifdef CONFIG_CPU_MICROMIPS

And here too.

Would it be better to leave the existing objects alone, and add 
microMIPS functions and macros with new names?



[...]
> + * 2. access the fetched word using halfword (defeat endian issue)
> + * 3. assemble 16/32 bit MIPS16 instruction from halfword(s)
> + */
> +static inline void MIPS16_fetch_halfword(union mips_instruction **ip,

No inline for any of these functions.

> +					 unsigned short *this_halfword,
> +					 unsigned short *prev_halfword)
> +{
> +	if (*prev_halfword) {
[...]
David Daney

      reply	other threads:[~2013-05-24 17:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24 14:55 [PATCH] MIPS: microMIPS: Refactor mips16 get_frame_info support Tony Wu
2013-05-24 17:30 ` David Daney [this message]

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=519FA3A5.7070408@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=Steven.Hill@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=tung7970@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.