Implemented arm64 instructions: ldp and stp

This commit is contained in:
2025-03-12 12:29:55 +01:00
parent 03c8dfa34c
commit 450e634d79
8 changed files with 100 additions and 4 deletions

View File

@ -42,8 +42,8 @@ func (c *compiler) compileARM(x asm.Instruction) {
case asm.LABEL:
label := c.assembler.Param.Label[x.Index]
c.codeLabels[label.Name] = Address(len(c.code))
c.append(0xa9be7bfd)
c.append(0x910003fd)
c.append(arm.StorePair(arm.FP, arm.LR, arm.SP, -16))
c.append(arm.MoveRegisterRegister(arm.FP, arm.SP))
case asm.LOAD:
switch x.Type {
@ -96,8 +96,7 @@ func (c *compiler) compileARM(x asm.Instruction) {
}
case asm.RETURN:
c.append(0xa8c27bfd)
c.append(0xd65f03c0)
c.append(arm.LoadPair(arm.FP, arm.LR, arm.SP, 16))
c.append(arm.Return())
case asm.SYSCALL: