Roll forward "Add Int8# and Word8#"

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



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

rGHC Glasgow Haskell Compiler
Lint WarningsExcuse: consistency with existing code
Warningcompiler/nativeGen/X86/CodeGen.hs:678TXT3Line Too Long
Warningcompiler/nativeGen/X86/CodeGen.hs:679TXT3Line Too Long
Warningcompiler/nativeGen/X86/CodeGen.hs:2412TXT3Line Too Long
Warningcompiler/nativeGen/X86/CodeGen.hs:2503TXT3Line Too Long
Warningcompiler/nativeGen/X86/CodeGen.hs:2505TXT3Line Too Long
Warningcompiler/prelude/PrelNames.hs:1685TXT3Line Too Long
Warningcompiler/prelude/TysPrim.hs:195TXT3Line Too Long
Warningcompiler/prelude/TysPrim.hs:198TXT3Line Too Long
Warningcompiler/prelude/TysPrim.hs:202TXT3Line Too Long
Warningcompiler/prelude/TysWiredIn.hs:110TXT3Line Too Long
Warningcompiler/prelude/TysWiredIn.hs:111TXT3Line Too Long
Warningcompiler/typecheck/TcGenDeriv.hs:2136TXT3Line Too Long
Warningcompiler/typecheck/TcGenDeriv.hs:2138TXT3Line Too Long
No Unit Test Coverage
Build Status
Buildable 24920
Build 61879: [GHC] Linux/amd64: Continuous Integration
Build 61878: [GHC] OSX/amd64: Continuous Integration
Build 61877: [GHC] Windows/amd64: Continuous Integration
Build 61876: arc lint + arc unit
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

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

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.