PPC NCG: Generate MO_?_QuotRem for subword sizes

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



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

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
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.Nov 25 2018, 3:33 AM
  • Break up long line
  • Rebase
bgamari added inline comments.Dec 7 2018, 10:07 PM

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.Dec 8 2018, 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.


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.Dec 9 2018, 3:09 AM
  • Refactor PPC remainder code
  • Rebase
trommler marked 2 inline comments as done.Dec 9 2018, 3:11 AM

Inline comments done.

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

Yes, looks good to me.

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