HBehrens / puncover

Analyses C/C++ build output for code size, static variables, and stack usage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Xtensa assembly

HBehrens opened this issue · comments

Collector.enhance_call_tree_from_assembly_line looks into specific ARM instructions to identify calls. This needs to be broadened to support Xtensa.

Also, it seems as if it's a common pattern for GCC to do relative calls where possible, https://gcc.gnu.org/onlinedocs/gcc/Xtensa-Options.html leading to two instructions and objdump doesn't desymbolize this (unlike ARM's relative jumps), so that it's necessary to analyze two instructions to derive a call:

jump (on instruction) followed by a call (two instructions)

40204418:	42cc      	bnez.n	a2, 40204420 <umm_info+0x20>
4020441a:	fff501        	l32r	a0, 402043f0 <__umoddi3+0x38c>
4020441d:	0000c0        	callx0	a0

Also, see #7