1 730
14 أغسطس 2025, 16:26
14 أغسطس 2025, ~16:26
mov rax, rdiیعنی داره پارامتر اول رو توی خروجی میزاره That means it is putting the first parameter in the output
add rax, rsiپارامتر دوم اضافه میشه The second parameter is added
add _numbers: mov eax, edi add eax, esi ret🌑 بدون استفاده از استک 🌕 فقط جمع میکنه و برمیگرده 🌑No stack usage 🌕Just collect and return
تابعی که هیچ تابع دیگه ای رو صدا نمیزنهLeaf Functions:
A function that does not call any other functionLeaf Functions: ساده ترن نیازی به ذخیره ی ادرس بازگشت یا ذخیره رجیستر های خاص ندارن (اگه ساختار خاص نیاز داشته باشه) Simpler ones do not need to store a return address or store special registers (if the specific structure requires it) Non-Leaf Functions: تابعی که خودش یا هیچ تابع دیگه ای رو صدا نمیزنه A function that does not call itself or any other function معمولا باید ساختار استک فریم بسازن و از رجیسترهای خودشون مراقبت کنن چون ممکنه تابع هایی که صدا میزنن مقدار رجیستر ها رو تغییر بدن They usually have to create a stack frame structure and take care of their own registers because the functions they call may change the values of the registers
وقتی که تابعی وسط کار خودش یک تابع دیگه رو صدا بزنهNested Function Calls:
When a function calls another function in the middle of its work

نستخدم ملفات تعريف الارتباط لتحسين تجربة التصفح لديك.
بالنقر على «قبول الكل»، فإنك توافق على سياسة استخدام ملفات تعريف الارتباط.