PPC NCG: Generate MO_?_QuotRem for subword sizes
ClosedPublic

Authored by trommler on Nov 11 2018, 4:28 AM.

Details

Summary

Handle Int*QuotRemOP and Word*QuotRemOp in PPC NCG.
Refactor common code with remainder operation.

Test Plan

validate (I validated on Linux powerpc64le and x86_64)

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
trommler created this revision.Nov 11 2018, 4:28 AM
trommler updated this revision to Diff 18869.Sun, Nov 25, 3:33 AM
  • Break up long line
  • Rebase
bgamari added inline comments.Fri, Dec 7, 10:07 PM
compiler/nativeGen/PPC/CodeGen.hs
2283

Wibble: Why not make this a where clause of remainderCode? I would argue that the same should have been done in coerceInt2FP' below.

trommler planned changes to this revision.Sat, Dec 8, 3:31 AM

I plan the following

  • refactor remainderCode.
  • rebase D5300 and this diff (which will hopefully make Harbourmaster a bit happier)

I would like to submit the refactoring of coerceInt2FP and coerceFP2Int as a separate diff.

compiler/nativeGen/PPC/CodeGen.hs
2283

It is needed in line 1303 above.

I will make remainderCode a where clause of getRegister' and then rename remainderCode' to remainderCode instead.

trommler updated this revision to Diff 19068.Sun, Dec 9, 3:09 AM
  • Refactor PPC remainder code
  • Rebase
trommler marked 2 inline comments as done.Sun, Dec 9, 3:11 AM

Inline comments done.

trommler edited the summary of this revision. (Show Details)Sun, Dec 9, 4:51 AM
bgamari accepted this revision.Tue, Dec 11, 12:21 PM

Yes, looks good to me.

This revision is now accepted and ready to land.Tue, Dec 11, 12:21 PM
This revision was automatically updated to reflect the committed changes.