Questions about assembly routines
Posted: Wed May 23, 2018 2:00 pm
Hi All,
I have a question regarding coding in Assembly in the ESP32.
There are some things I want to know, I try to be brief.
1) I know that certianly I can use Inline assembler in the ESP32, I'm trying to use extended assembly.
Which constraints are available? I'm mostly concerned about register related constraints.
For example for the x86 the a document I found says:
2) How careful should I be using the A registers (A0-A15) during coding? I guess this comes from the contstraints, but I just wanna make sure, I do things correctly.
Thanks
Vader
I have a question regarding coding in Assembly in the ESP32.
There are some things I want to know, I try to be brief.
1) I know that certianly I can use Inline assembler in the ESP32, I'm trying to use extended assembly.
Which constraints are available? I'm mostly concerned about register related constraints.
For example for the x86 the a document I found says:
How can this be reflexted to the ESP32, and Xtensa stuff? (BTW I have the Xtensa manual with the instruction and register descriptions, but no info about assembler contraints.When the "r" constraint is specified, gcc may keep the variable in any of the available General Purpose Registers. We can also specify the register names directly by using specific register constraints.
+---+--------------------+
| r | Register(s) |
+---+--------------------+
| a | %eax, %ax, %al |
| b | %ebx, %bx, %bl |
| c | %ecx, %cx, %cl |
| d | %edx, %dx, %dl |
| S | %esi, %si |
| D | %edi, %di |
+---+--------------------+
2) How careful should I be using the A registers (A0-A15) during coding? I guess this comes from the contstraints, but I just wanna make sure, I do things correctly.
Thanks
Vader