This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] |
Hi! I've used attached script on -S -dp compiled i386/x86_64 sources to find various bugs in config/i386/ instruction length computation. This patch fixes all bugs found in -O2 {-m32,-m64} insn-attrtab.i compilation and most bugs found in -O3 -fpic {-m32,-m64} tramp3d-v4.ii compilation. The script isn't perfect, e.g. it doesn't handle multi-insn instructions (like return_long_internal, which contain \;, or e.g. set_got (which is wrong anyway, 11 bytes actual vs. 12 bytes returned by get_attr_length)), but for finding bugs in length computations is quite useful. The script is invoked with a list of -S -dp compiled files, like: ./analyze.S.-dp.sh *.s (or asflags=-32 ./analyze.S.-dp.sh *.s for -m32 compiled stuff). I've also run the vanilla and patched gcc on a collection of preprocessed gcc sources, with -O2 {-m32,-m64} and -O3 -fpic {-m32 -march=core2,-m64}, results of the script attached. There is still work to do, but the patch already grew quite a bit, so I'd prefer to do further bugfixes in followup patches. From the results* tarball it is clear that the patch does substantial improvements in the insn length computation, especially for -m64 compiled code. My primary reason for working on this is to make get_attr_length good enough to be usable in min_insn_size for non-jump insns other than TYPE_MULTI/TYPE_OTHER. Bootstrapped/regtested on x86_64-linux and i686-linux. Ok for trunk? Jakub
Attachment:
Y311l
Description: Text document
Attachment:
analyze.S.-dp.sh
Description: Bourne shell script
Attachment:
results.S.-dp.tar.bz2
Description: BZip2 compressed data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |