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

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

 



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@xxxxxxxx>|
|         |                            |
|         |                            |
|         |           2006-09-25 16:42 |
|---------+---------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                              |
  |       To:       <linux-mips@xxxxxxxxxxxxxx>, <william_lei@xxxxxxxxxx>                                                        |
  |       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@xxxxxxxxxx>
To: <linux-mips@xxxxxxxxxxxxxx>
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!
>
>
>
>






[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux