[m-rev.] problems with abs for int{8,16,32}

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Feb 15 14:58:35 AEDT 2018

On Thu, 15 Feb 2018 14:53:16 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> They are *not* fine in asm_fast.gc, you weren't trying hard enough ;-)
> (Try compiling with -O0.)


> > I checked, and the abs operation on e.g. min_int8 throws
> > an exception, as expected, when invoked directly from main,
> > but the exception vanishes when invoked from within a try block.
> >
> > Julien, I think fixing this is up to you. I am attaching my cut-down
> > test case to save you a bit of work.
> The issue here is the handling of sub-word sized types in scalar common
> data; the runtime machinery for doing looks up in common data cannot
> handle fields being less than a word in size.  The fix here is to ensure
> that an field in static data are at least a word in size (which is
> indeed precisely how the MLDS backend handles it).
> I'll post a fix for this in the next couple of days.

I am probably more familiar with the common data system than you are.
If you can describe the problem to me in more detail, I can maybe fix it
while waiting for Peter's review of my change to du_type_layout.m.
Or, if Peter can't do the review, I can trade the fix for a review by you.


More information about the reviews mailing list