This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regarding Bitwise relaxation for H8/300


Hi Anil,

> Above objdump clearly shows that "bset #0x6,@0x120:32" insn can be
> relaxed to "bset #0x6,@0x120:16" likewise "mov.b r2l,@0x120:16" is
> relaxed by linker from insn "mov.b r2l,@0x120:32".
>
> I would like to add relaxation support for bitwise insn like bset,
> bclr etc .  Can anyone guide me on this ?

What you need to do is to download the latest binutils sources from
the CVS repository.  (See the binutils web page for information on
how to do this).  The build yourself a version of the linker targeted
at the h8300-elf using these sources and verify that it works.

Next take a look at the source file bfd/elf32-h8300.c and find the
function elf32_h8_relax_section().  This is the function where you
will need to add the support for relaxing the BSET instruction.  Use
the code that is already there as a guide for what you need to do.

When you think you have things working, and have tested the patched
linker and found that it works, have a look at the directory
ld/testsuite/ld-h8300.  Try adding a test case here to check that the
new relaxation works, and continues to work with future version of the
linker.

When you are happy that everything is ready, please do consider
contributing it back to the FSF.  You will need a copyright assignment
in place to do this - so that we can accept the code.  If you are
interested I can send you the email form that starts this process
rolling.

If you have questions or encounter problems, please do post them to
this mailing list.

Cheers
        Nick
        


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]