This is the mail archive of the gcc@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]

gcc.dg/weak/typeof-2.c makes invalid assumptions about the assembler language


The test gcc.dg/weak/typeof-2.c (formerly gcc.dg/typeof-2.c)
seems to try to determine how often a function is called
by seeing how often the name is mentioned in the assembler
file.  This doesn't work for any SH target: for SH1..SH4,
the function address is put into a memory location in the
text segment, which is loaded into a register.  Only if
you compile this file with -mrelax and link it with the
target in the bsr range will you see the address repeated
(as offsets in the bsr instructions) in the linked program.
For the SH5, the target is loaded into a target register,
and of course this load is only needed once.

Hence, the scan-assembler-not baz2.*baz2.*baz2.*baz2.*baz2.*baz2
test is meaningless (incidentally, baz2 is called twice for SH5),
and the scan-assembler baz3.*baz3.*baz3.*baz3.*baz3.*baz3 test
fails on all SH targets.

--  
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


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