Skip to content

Arm64 multireg passing: keep in regs #53956

Description

@sandreenko

For such code:

struct Struct
{
    int i1;
    int i2;
    int i3;
    int i4;
}

[MethodImpl(MethodImplOptions.NoInlining)]
static void Caller(Struct s)
{
    Callee(s);
}

we currently generate

IN0004: 000000      stp     fp, lr, [sp,#-32]!
IN0005: 000004      mov     fp, sp
N0006: 000008      str     x0, [fp,#16]
IN0007: 00000C      str     x1, [fp,#24]
IN0001: 000010      ldr     x0, [fp,#16]
IN0002: 000014      ldr     x1, [fp,#24]
IN0003: 000018      bl      Runtime_52320.C:Callee(Struct)
IN0008: 00001C      ldp     fp, lr, [sp],#32
IN0009: 000020      ret     lr

when, of course, we want something like:

IN0004: 000000      stp     fp, lr, [sp,#-32]!
IN0005: 000004      mov     fp, sp
IN0003: 000018      bl      Runtime_52320.C:Callee(Struct)
IN0008: 00001C      ldp     fp, lr, [sp],#32
IN0009: 000020      ret     lr

not a major thing but lets keep track of it and see if we can support it with the new morph logic.

category:cq
theme:register-allocator

Activity

  1. added this to the 7.0.0 milestone on Jun 9, 2021
  2. self-assigned this
    on Jun 9, 2021
  3. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jun 9, 2021
  4. removed
    untriagedNew issue has not been triaged by the area owner
    on Jun 10, 2021
  5. modified the milestones: 7.0.0, Future on May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions