Skip to content

Use vector register in spite of memory to copy registers #165

Description

@igorsnunes

In vasm copy, in order to move a general purpose register to a floating point register two memory access are being done: one to store an integer value in memory, and the other to load this value as a floating point value. A similar approach is being done in the opposite case, moving a floating point value to a general purpose value.

See:
https://github.com/PPC64/hhvm/blob/next/hphp/runtime/vm/jit/vasm-ppc64.cpp#L119
https://github.com/PPC64/hhvm/blob/next/hphp/runtime/vm/jit/vasm-ppc64.cpp#L125

To avoid memory access, it is possible to use an auxiliary vector register and move from a general purpose register to a vector register and then from the vector register to a floating point register (also valid for moving from a floating point register to a general purpose register). This may be accomplished using mtvsrd and mfvsrd.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions