Implemented arm64 instructions: ldp and stp

This commit is contained in:
Eduard Urbach 2025-03-12 12:29:55 +01:00
parent aa40af44f6
commit 6e738d2c9f
Signed by: eduard
GPG key ID: 49226B848C78F6C8
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: