xiaoxiang781216 commented on PR #15437: URL: https://github.com/apache/nuttx/pull/15437#issuecomment-2581919934
> > > > This approach causes the code size of "nuttx/arch/arm64/src/common/arm64_vector_table.S: arm64_enter_exception“ to be larger than the 128 bytes required by the vector table. Can this problem be solved by changing the macro to a function? ! I passed the test by turning off "CONFIG_ARCH_FPU" > > > > > > > > > let's try to reduce the code size first. > > > > > > @W-M-R some optimization can be done: > > > > 1. Skip save and restore x0 since it's always zero > > 2. Remove the duplication loading tpidrro_el0 at line 92 > > 3. Remove line 93 by using add with immediate value: > > https://developer.arm.com/documentation/ddi0596/2021-03/Base-Instructions/ADDS--immediate---Add--immediate---setting-flags-#:~:text=Add%20(immediate)%2C%20setting%20flags,the%20alias%20CMN%20(immediate). > > I didn't find any information about the X0 register being always 0 for arm64? I only saw that X0 is used to pass the first parameter, https://developer.arm.com/documentation/102374/0102/Procedure-Call-Standard, not sure about the status of X0 under arm64 vector? But fortunately, after optimizing according to 2 and 3 instructions, the size of the vector table meets the requirements again Ok, my memory is wrong, the zero register is X31, not X0. -- 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]
