linux-mips
[Top] [All Lists]

Re: How to emulate lw/sw instruction by lb/sb instruction

To: "Kevin D. Kissell" <kevink@mips.com>
Subject: Re: How to emulate lw/sw instruction by lb/sb instruction
From: william_lei@ali.com.tw
Date: Mon, 25 Sep 2006 18:35:01 +0800
Cc: linux-mips@linux-mips.org
In-reply-to: <001401c6e07e$8b07c080$10eca8c0@grendel>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Dear Kevin
      Because there are some aligned instruction will load/store from/to
unaligned base address in some module,such as "lw t0,56(sp)  ##sp is odd
address"
that's why I want some special version GCC can avoid generating load/store
4 bytes opcode,then I can use this "GCC" to compile specified module and
linked with others,it will avoid unnecessary exception processing when
these instruction to be invoked and come up with best performance for me.
Regards
William Lei


|---------+---------------------------->
|         |           "Kevin D.        |
|         |           Kissell"         |
|         |           <kevink@mips.com>|
|         |                            |
|         |                            |
|         |           2006-09-25 16:42 |
|---------+---------------------------->
  
>------------------------------------------------------------------------------------------------------------------------------|
  |                                                                             
                                                 |
  |       To:       <linux-mips@linux-mips.org>, <william_lei@ali.com.tw>       
                                                 |
  |       cc:                                                                   
                                                 |
  |       Subject:  Re: How to emulate lw/sw instruction by lb/sb instruction   
                                                 |
  
>------------------------------------------------------------------------------------------------------------------------------|





The MIPS Linux kernel is capable of handling unalgined loads and
stores in emulation.  This is less efficient than synthesizing the word
access out of byte or left/right load/store operations in-line, but it's
only done when there really is an unaligned access, whereas forcing
the compiler to synthesize *all* loads/stores adds that overhead
even when the addresses are actually aligned.

            Regards,

            Kevin K.

----- Original Message -----
From: <william_lei@ali.com.tw>
To: <linux-mips@linux-mips.org>
Sent: Monday, September 25, 2006 2:41 AM
Subject: How to emulate lw/sw instruction by lb/sb instruction


> Dear all
>       Could someone tell me how to modify GCC as titled?because we have
met
> problem while porting some middleware,which will generate some lw/sw
> instruction to unaligned address,so I would modify GCC to not generate
> lw/sw instructions for this pieces code.
> Regards
> William Lei
>
> ************* Email Confidentiality Notice ********************
>
> The information contained in this e-mail message (including any
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be
conveyed
> only to the designated recipient(s). Any use, dissemination,
distribution,
> printing, retaining or copying of this e-mail (including its attachments)
> by unintended recipient(s) is strictly prohibited and may be unlawful. If
> you are not an intended recipient of this e-mail, or believe that you
have
> received this e-mail in error, please notify the sender immediately (by
> replying to this e-mail), delete any and all copies of this e-mail
> (including any attachments) from your system, and do not disclose the
> content of this e-mail to any other person. Thank you!
>
>
>
>





<Prev in Thread] Current Thread [Next in Thread>