snikeguo commented on issue #17040: URL: https://github.com/apache/nuttx/issues/17040#issuecomment-3758365651
> [@snikeguo](https://github.com/snikeguo) could you please test PR [#17815](https://github.com/apache/nuttx/pull/17815) ? @acassis I think that even though the R12 register is not used at this moment, it should be saved. This is my solution: ``` __attribute__((naked)) void *__aeabi_read_tp(void) { asm volatile ( "push {r1,r2,r3,r12,lr} \n" // 保存寄存器 "bl tls_get_info \n" // 调用 tls_get_info 函数 "add r0, r0, %0 \n" // 跳过 struct tls_info_s "pop {r1,r2,r3,r12,lr} \n" // 恢复寄存器 "bx lr \n" // 返回 : : "I"(sizeof(struct tls_info_s)) ); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
