FW: Regarding Bitwise relaxation for H8/300
Anil Paranjape
AnilP1@KPITCummins.com
Wed Dec 31 14:26:00 GMT 2003
Hi,
I have added linker relaxation support for bit manipulation insns like following,
band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset, bst, btst, bxor.
Please find attached a patch written for binutils snapshot dated 28 Dec 03 which adds relaxation support for above mentioned bit manipulation insns along with a patch for ChangeLog. Relaxation support is added for ELF as well as for COFF file formats.
Also please find attached testcode, object dump of testcode for COFF and ELF formats.
I hope this testcode can be directly included in ld-testsuite.
Thanks to Nick Clifton for his valuable guidance.
Regards,
Anil Paranjpe
-----Original Message-----
From: Nick Clifton [mailto:nickc@redhat.com]
Sent: Monday, December 15, 2003 9:37 PM
To: Anil Paranjape
Cc: binutils@sources.redhat.com
Subject: 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitwise_relaxation.patch
Type: application/octet-stream
Size: 7679 bytes
Desc: bitwise_relaxation.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20031231/c2c8d262/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relax-4.d
Type: application/octet-stream
Size: 1949 bytes
Desc: relax-4.d
URL: <https://sourceware.org/pipermail/binutils/attachments/20031231/c2c8d262/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relax-4.s
Type: application/octet-stream
Size: 1474 bytes
Desc: relax-4.s
URL: <https://sourceware.org/pipermail/binutils/attachments/20031231/c2c8d262/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relax-4.sh
Type: application/octet-stream
Size: 272 bytes
Desc: relax-4.sh
URL: <https://sourceware.org/pipermail/binutils/attachments/20031231/c2c8d262/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relax-4-coff.d
Type: application/octet-stream
Size: 1948 bytes
Desc: relax-4-coff.d
URL: <https://sourceware.org/pipermail/binutils/attachments/20031231/c2c8d262/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chnagelog.patch
Type: application/octet-stream
Size: 1591 bytes
Desc: chnagelog.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20031231/c2c8d262/attachment-0005.obj>
More information about the Binutils
mailing list