Cmm: Promote stack arguments to word size

Authored by trommler on Jan 31 2019, 2:43 AM.

Description

Cmm: Promote stack arguments to word size

Smaller than word size integers must be promoted to word size
when passed on the stack. While on little endian systems we can
get away with writing a small integer to a word size stack slot
and read it as a word ignoring the upper bits, on big endian
systems a small integer write ends up in the most significant
bits and a word size read that ignores the upper bits delivers
a random value.

On little endian systems a smaller than word size write to
the stack might be more efficient but that decision is
system specific and should be done as an optimization in the
respective backends.

Fixes Trac #16258

(cherry picked from commit af7b0fdb64ad1c57f5829e8bd89e8e0fa96b11d2)

Details

Committed
bgamariMar 13 2019, 3:31 PM
Parents
rGHCeda76b1357cb: Fix checkStackChunk() call in Interepter.c, enable an assertion
Branches
Unknown
Tags
Unknown