This is an archive of the discontinued LLVM Phabricator instance.

[Sparc][LEON] Hardware erratum fix: Insert NOPs around double precision instructions
Needs ReviewPublic

Authored by lero_chris on Sep 16 2016, 6:13 AM.

Details

Summary

Fixes an erratum in LEON 2 processors where the result of double precision operations is not immediately available. This is fixed by inserting NOP instructions around the erroneous instructions.

The error is described by the LEON erratum: "Odd-Numbered FPU Register Dependency not Properly Checked in some Double-Precision FPU Operations”

Unit test included.

Diff Detail

Repository
rL LLVM

Event Timeline

lero_chris updated this revision to Diff 71625.Sep 16 2016, 6:13 AM
lero_chris retitled this revision from to [Sparc][LEON] Hardware erratum fix: Insert NOPs around double precision instructions.
lero_chris updated this object.
lero_chris added reviewers: jyknight, jacob_hansen.
lero_chris set the repository for this revision to rL LLVM.
dcederman added inline comments.
lib/Target/Sparc/LeonPasses.cpp
281

It should be a single precision load according to the errata document.

From http://www.atmel.com/Images/doc4409.pdf :
"Data dependency is not properly checked between a load singleword floating - point instruction (LDF) involving an odd-numbered floating-point register as a destination of the load and an immediately following double-precision floating-point instruction".

338–339

The indentation looks wrong here. You can use clang format to automatically indent and format your patch.

dcederman resigned from this revision.Sep 4 2018, 2:13 AM