Tool/software: TI C/C++ Compiler
Hello!
During making the changes required when taking GGT 8 in use, I have noticed that fast code size of RTS has increased much. Originally (with CGT 7.3.23) we classified following RTS sections as fast (and linked to L2):
AsdRtsFastCodeConst
{
rts6600_elf.lib<divd.obj>(.text)
rts6600_elf.lib<divu.obj>(.text)
rts6600_elf.lib<divi.obj>(.text)
rts6600_elf.lib<expf.obj>(.text)
rts6600_elf.lib<exp2f.obj>(.text)
rts6600_elf.lib<imath64.obj>(.text)
rts6600_elf.lib<ldexpf.obj>(.text)
rts6600_elf.lib<llshift.obj>(.text)
rts6600_elf.lib<memcpy64.obj>(.text)
rts6600_elf.lib<memset.obj>(.text)
rts6600_elf.lib<modff.obj>(.text)
rts6600_elf.lib<push.obj>(.text)
rts6600_elf.lib<remu.obj>(.text)
}
Linker started to complain about long jumps when using this list, and I ended up to this list without any warnings (with CGT 8.3.4):
AsdRtsFastCodeConst
{
rts6600_elf.lib<divd.c.obj>(.text)
rts6600_elf.lib<divu.asm.obj>(.text)
rts6600_elf.lib<divi.asm.obj>(.text)
rts6600_elf.lib<expf.c.obj>(.text)
rts6600_elf.lib<exp2f.c.obj>(.text)
rts6600_elf.lib<fclose.c.obj>(.text)
rts6600_elf.lib<fputc.c.obj>(.text)
rts6600_elf.lib<fputs.c.obj>(.text)
rts6600_elf.lib<fseek.c.obj>(.text)
rts6600_elf.lib<frexp.c.obj>(.text)
rts6600_elf.lib<imath64.c.obj>(.text)
rts6600_elf.lib<ldexp.c.obj>(.text)
rts6600_elf.lib<ldexpf.c.obj>(.text)
rts6600_elf.lib<llabs.c.obj>(.text)
rts6600_elf.lib<llshift.c.obj>(.text)
rts6600_elf.lib<_ltoa.c.obj>(.text)
rts6600_elf.lib<memcpy64.asm.obj>(.text)
rts6600_elf.lib<memset.c.obj>(.text)
rts6600_elf.lib<modff.c.obj>(.text)
rts6600_elf.lib<push.asm.obj>(.text)
rts6600_elf.lib<_printfi.c.obj>(.text)
rts6600_elf.lib<remu.asm.obj>(.text)
rts6600_elf.lib<_scanfi.c.obj>(.text)
rts6600_elf.lib<setvbuf.c.obj>(.text)
rts6600_elf.lib<signbit.c.obj>(.text)
rts6600_elf.lib<wcslen.c.obj>(.text)
}
This lead to a situation, where L2 memory usage is increased like this:
10822000 10822000 00000f60 00000f60 r-x AsdRtsFastCodeConst
->
108231c0 108231c0 000074a0 000074a0 r-x AsdRtsFastCodeConst
Could you explain what has been done for the mentioned parts of RTS? From my perspective 26k increase of L2 memory usage is not acceptable. Do you have any hints how this could be optimized?
Another problem that have observed a strange problem with CGT 8.3.4 RTS header files. With earlier CGT (7.3.23) the strrchr() function is automatically inlined with the linker, but with never CGT I can see, that linker creates different symbols for all use cases of the mentioned function (in .text section). After adding FUNC_ALWAYS_INLINE pragma definition for the mentioned function, symbols disappeared from the memory map. I have observed similar kind of phenomenon also with some functions that have been defined by Nokia (inlined as expected with CGT7, but pragma required with CGT8).Are you able to explain the behavior?
Please find the changed header as attachment:
Br,
Risto Alasaarela