Lars Schubert
Lars Schubert

Reputation: 11

libgcc subroutines documentation for avr-gcc

I disassembled some C++ code with the avr-gcc compiler in godbolt and often found calls to libgcc subroutines like __udivmodhi4 or __mulhi3.

Where can I find good and insightful documentation about those subroutines?

I tried to find any good documentation about those subroutines but could not find any.

The only (kind of) useful thing I found was the plain implementation of those subroutines in the libgcc avr config files.

Upvotes: 0

Views: 84

Answers (1)

emacs drives me nuts
emacs drives me nuts

Reputation: 3993

Basically, the documentation is the libgcc implementation (and comments) you aleady found.

Nomenclature is according to the respective insn naming in the backend's avr.md. The insn names can be found in section 17.10 Standard Pattern Names For Generation of the internals.

And the avr-gcc wiki also mentions some functions in Exceptions to the Calling Convention, but that's far from being complete.

Upvotes: 0

Related Questions