Printf Change values in registers, ARM Assembly

后端 未结 2 1878
情歌与酒
情歌与酒 2020-12-11 11:46

I\'m new to assembly programing and I\'m programing for ARM. I\'m making a program with two subroutines: one that appends a byte info on a byte vector in memory, and one tha

2条回答
  •  甜味超标
    2020-12-11 12:07

    The ARM ABI specifies that registers r0-r3 and r12 are to be considered volatile on function calls. Meaning that the callee does not have to restore their value. LR also changes if you use bl, because LR will then contain the return address for the called function.

    More information can be found on ARMs Information Center entry for the ABI or in the APCS (ARM Procedure Call Standard) document.

提交回复
热议问题