* How Can I add a 8bits offset for MIPS?
@ 2011-03-31 8:09 Liu
2011-03-31 8:26 ` Richard Sandiford
0 siblings, 1 reply; 3+ messages in thread
From: Liu @ 2011-03-31 8:09 UTC (permalink / raw)
To: binutils
hi all
MIPS have only 16bits offset, I need a 8bits offset now. How can I make it?
I know very few about bfd, please tell me more details, thanks.
-Liu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How Can I add a 8bits offset for MIPS?
2011-03-31 8:09 How Can I add a 8bits offset for MIPS? Liu
@ 2011-03-31 8:26 ` Richard Sandiford
2011-03-31 9:55 ` Liu
0 siblings, 1 reply; 3+ messages in thread
From: Richard Sandiford @ 2011-03-31 8:26 UTC (permalink / raw)
To: Liu; +Cc: binutils
Liu <proljc@gmail.com> writes:
> hi all
> MIPS have only 16bits offset, I need a 8bits offset now. How can I make it?
> I know very few about bfd, please tell me more details, thanks.
Support for Loongson 3A was recently added to binutils and some of
its instructions also need non-16-bit-offsets. See:
#define OP_SH_OFFSET_A 6
#define OP_MASK_OFFSET_A 0xff
#define OP_SH_OFFSET_B 3
#define OP_MASK_OFFSET_B 0xff
#define OP_SH_OFFSET_C 6
#define OP_MASK_OFFSET_C 0x1ff
in include/opcode/mips.h, and the way they're handled in the rest
of the codebase. OFFSET_A is an 8-bit offset in bits 6-13,
OFFSET_B is an 8-bit offset in bits 3-10. The associated mips-opc.c
operand strings are "+a" and "+b".
If your offsets are in the same bit positions as either A or B,
then you could use them directly. If not, you could add an
OFFSET_D (and "+d") along the same lines.
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How Can I add a 8bits offset for MIPS?
2011-03-31 8:26 ` Richard Sandiford
@ 2011-03-31 9:55 ` Liu
0 siblings, 0 replies; 3+ messages in thread
From: Liu @ 2011-03-31 9:55 UTC (permalink / raw)
To: Liu, binutils, rdsandiford
On Thursday, March 31, 2011, Richard Sandiford
<rdsandiford@googlemail.com> wrote:
> Liu <proljc@gmail.com> writes:
>> hi all
>> MIPS have only 16bits offset, I need a 8bits offset now. How can I make it?
>> I know very few about bfd, please tell me more details, thanks.
>
> Support for Loongson 3A was recently added to binutils and some of
> its instructions also need non-16-bit-offsets. See:
>
> #define OP_SH_OFFSET_A 6
> #define OP_MASK_OFFSET_A 0xff
> #define OP_SH_OFFSET_B 3
> #define OP_MASK_OFFSET_B 0xff
> #define OP_SH_OFFSET_C 6
> #define OP_MASK_OFFSET_C 0x1ff
>
> in include/opcode/mips.h, and the way they're handled in the rest
> of the codebase. OFFSET_A is an 8-bit offset in bits 6-13,
> OFFSET_B is an 8-bit offset in bits 3-10. The associated mips-opc.c
> operand strings are "+a" and "+b".
>
> If your offsets are in the same bit positions as either A or B,
> then you could use them directly. If not, you could add an
> OFFSET_D (and "+d") along the same lines.
>
> Richard
>
Thank you! Richard
I thought I need to modify BFD.
For now, I get that I need to ask MingJie Xing. He is a nice man, too.
thank you again Richard.
-Liu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-31 8:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-31 8:09 How Can I add a 8bits offset for MIPS? Liu
2011-03-31 8:26 ` Richard Sandiford
2011-03-31 9:55 ` Liu
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 read-only IMAP folder(s) and NNTP newsgroup(s).