Roll forward "Add Int8# and Word8#"
ClosedPublic

Authored by michalt on Oct 24 2018, 2:04 PM.

Details

Summary

This rolls forward the change introducing Int8# and Word8#
and fixes the problems discovered on 32-bit x86.

Test Plan

./validate (on both x86-{32,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.
michalt created this revision.Oct 24 2018, 2:04 PM
michalt updated this revision to Diff 18435.Oct 24 2018, 2:06 PM
  • Mark %ebp as not allocatable on x86-32
  • X86/CodeGen: Fix a problem with handling 8-bit registers
  • Fix parameter size calculation for FFI calls on IA32
michalt edited the summary of this revision. (Show Details)Oct 24 2018, 2:10 PM
michalt retitled this revision from Roll forward with "Add Int8# and Word8#" to Roll forward "Add Int8# and Word8#".
michalt edited the test plan for this revision. (Show Details)
simonmar added inline comments.Oct 26 2018, 2:20 AM
includes/CodeGen.Platform.hs
842 ↗(On Diff #18435)

Interesting, did the register allocator ever actually use %ebp? It's mapped to Sp on i386, so I wouldn't expect it to be available for allocation most of the time. Perhaps in a very few places where we're returning from a foreign call and about to load Sp.

michalt added inline comments.Oct 26 2018, 11:08 AM
includes/CodeGen.Platform.hs
842 ↗(On Diff #18435)

I didn't actually observe this. I just noticed this code when debugging and since the Note explicitly mentioned 8-bit registers, I thought it's better to make sure %ebp is also excluded.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 2 2018, 4:15 PM
Closed by commit rGHC2c959a189431: Add Int8# and Word8# (authored by michalt, committed by bgamari). · Explain Why
This revision was automatically updated to reflect the committed changes.