Calling convention

pdelprat
Posts: 10
Joined: Mon Sep 04, 2017 1:37 pm

Calling convention

Postby pdelprat » Mon Jan 15, 2018 6:02 pm

Hello,

Is it possible to change calling convention with xtensa-esp32-elf-gcc ?

Kind regards,
Pascal

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Calling convention

Postby ESP_Angus » Mon Jan 15, 2018 9:01 pm

Hi Pascal,

Unfortunately not. When gcc is compiled to target an xtensa core, it's compiled with an "overlay" file of source/header files that describes that core's specific features. This is used to "configure" gcc at compile time. The overlay includes the ABI configuration. For our ESP32 toolchain it can be found here:
https://github.com/espressif/crosstool- ... x/overlays

(There's an xtensa-config.h file in the xtensa_esp32.tar file.)

To change ABIs you need to recompile gcc with a modified overlay.

Why do you ask?


Angus

pdelprat
Posts: 10
Joined: Mon Sep 04, 2017 1:37 pm

Re: Calling convention

Postby pdelprat » Mon Jan 15, 2018 9:55 pm

Hello Angus,

Thanks for your quick answer,

Why this question ? The answer is related to MSIL. I'm working on a project to compile MSIL to extensa processor.

I'm learning how gcc generate assembler, and the calling convention is based on store parameters on registers more than on the stack, which is not realy the way of MSIL works.

Kind regards,
Pascal

Who is online

Users browsing this forum: No registered users and 379 guests