0

I am starring at a lot of assembly code for the Espressig ESP32 (Tensilica/Cadence Xtensa LX6 core) recently and I've been asking myself why I see a lot of functions which look like the following:

                             **************************************************************
                             *                          FUNCTION                          *
                             ************************************************************** 
        401b076c 36 41 00        entry      a1,0x20
        401b076f e5 3f ac        call8      FUN_4015cb6c_unknown
        401b0772 2d 0a           mov.n      a2,a10
        401b0774 1d f0           retw.n

Ghidra has decompiled this into:

undefined4 FUN_401b076c_unknown(void)
{
  undefined4 uVar1;
  
  uVar1 = FUN_4015cb6c_unknown();
  return uVar1;
}

I really see a lot of those functions and wonder why a compiler would generate such code instead of calling the inner function directly? It does not seem that any parameter or return value is converted. It just does not make any sense to me, so I must be missing something.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.