OpenCores
no use no use 1/1 no use no use
Bug in or32.h in GCC
by mikerez on Aug 26, 2010
mikerez
Posts: 3
Joined: May 14, 2009
Last seen: Dec 25, 2017
Hello,

I have investigated strange code provided by your or32 gcc port
and think that you have bug in or32.h line 333.

The ALL_REGS index in REG_CLASS_CONTENTS is 2.
But ALL_REGS index in enum reg_class is 3.

(The local allocation always fails to find hard reg)

The generated code becomes pretty after fix.
(mostly visibly without optimize)


Thank you,
Mikhail.

JB>It is astonishing that things worked so well with this error!

Global allocation pass did all job while local allocation was broken.
At least this resulted in twice more instructions for MOVs with -O0.
(simple program like "int a = 0;")
Suggested patch is attached.
or32.h.patch (0 kb)
RE: Bug in or32.h in GCC
by jeremybennett on Aug 27, 2010
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

Hi Mikhail

Thanks for the patch, which I've tested and committed to SVN. I've actually removed CR_REGS completely, since the register class is not used anywhere, or included in related data structures.

This removed one test failure and one time out from the regression.

		=== gcc Summary ===

# of expected passes		40165
# of unexpected failures	109
# of expected failures		78
# of unresolved testcases	31
# of untested testcases		28
# of unsupported tests		440

runtest completed at Thu Aug 26 13:07:22 2010

The GCC port has been modified by many users over the years, and is now quite confused, so there are likely other faults. I know that at present it is not generating DWARF2 call frame information correctly, leading to problems with GDB. I am sure there are other faults (clearly, since there are unexplained regression errors).

Best wishes,

Jeremy

--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com

no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.