2016년 3월 9일 수요일


If you ask the C compiler to generate an assembly language listing from your source, you'll see how it handles pushing data on the stack for ARMv8. This might not be the only way to do it, but GCC does it this way:
   sub  sp, sp, #32     \\ Open up some temp stack space
   stp  x19, x20, [sp]  \\ save 2 pairs of registers
   stp  x21, x30, [sp,#16]
 
   ldp  x19, x20, [sp]  \\ restore 2 pairs of registers
   ldp  x21, x30, [sp,#16]
   add  sp, sp, #32     \\ "free" the temp stack space

댓글 없음:

댓글 쓰기