2 questions from the last 30 days
1
vote
2
answers
106
views
How do you use a c string (char array) in GCC with inline ARM assembly
When using ARM assembly, I know I can use CNTP_CTL_EL0 to get information about the physical timer. (https://developer.arm.com/documentation/ddi0595/2021-09/AArch64-Registers/CNTP-CTL-EL0--Counter-...
1
vote
1
answer
70
views
x86: How to obtain return address from %ebp?
Similar question: Assembly return address
I want to write a function to print the return address of the current function. This is code that prints %ebp+4:
void backtrace() {
int ebp;
asm ("movl %%...