Uploaded image for project: 'JikesRVM'
  1. JikesRVM
  2. RVM-163

SSE rules for memory operands, conditional moves, etc.

    Details

      Description

      Currently SSE rules just perform FP math using registers and not memory operands. We should have memory operand rules mirroring those for integer IA32 instructions. We should also look at issues such as conditional moves. The current support for floating point conditional moves is based on what the x87 supports. SSE introduces new instructions which we should possibly adapt the branch optimizations to target.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              ianrogers Ian Rogers added a comment -

              The AMD64 optimization guide recomends:

              Use the MOVLPS and MOVLPD instructions to move scalar floating-point data into the XMM registers prior to addition, multiplication, or other scalar instructions.

              this is because it avoids clearing the upper 64 or 96 bits of the register. Currentyly we use MOVSS and MOVSD.

              http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25112.PDF page 212

              Show
              ianrogers Ian Rogers added a comment - The AMD64 optimization guide recomends: Use the MOVLPS and MOVLPD instructions to move scalar floating-point data into the XMM registers prior to addition, multiplication, or other scalar instructions. this is because it avoids clearing the upper 64 or 96 bits of the register. Currentyly we use MOVSS and MOVSD. http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25112.PDF page 212
              Hide
              ianrogers Ian Rogers added a comment -

              Fixed in r13942. MOVSD is switched to MOVLPD when the operands are register and memory. MOVSS isn't switched to MOVLPS (although AMD recommend this) as we don't guarantee 8byte alignment of floats (we could) and MOVLPS could access beyond a page boundary causing an unexpected page fault.

              Show
              ianrogers Ian Rogers added a comment - Fixed in r13942. MOVSD is switched to MOVLPD when the operands are register and memory. MOVSS isn't switched to MOVLPS (although AMD recommend this) as we don't guarantee 8byte alignment of floats (we could) and MOVLPS could access beyond a page boundary causing an unexpected page fault.

                People

                • Assignee:
                  ianrogers Ian Rogers
                  Reporter:
                  ianrogers Ian Rogers
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: