[MLton] cvs commit: C types now distinguish between signed and unsigned words

Kevin Redwine redwine@eecs.harvard.edu
Fri, 14 Jan 2005 11:14:12 -0500


Here is what I get:
mlton -default-ann 'allowImport true' -default-ann 'allowExport true' 
-keep g -codegen c -export-header export.h -stop tc test_quot.sml
mlton -default-ann 'allowImport true' -default-ann 'allowExport true' 
-keep g -codegen c -stop o my_quot.c
mlton -default-ann 'allowImport true' -default-ann 'allowExport true' 
-keep g -codegen c test_quot.sml my_quot.o
./test_quot
  bad_z = 25
      z = 0
   my_z = 25
your_z = 0

On Jan 13, 2005, at 8:19 PM, Matthew Fluet wrote:

>
>>> sweeks      04/09/06 17:46:20
>>>
>>>   Log:
>>>   MAIL C types now distinguish between signed and unsigned words
>>>
>>>   This distinction is necessary because on some platforms the calling
>>>   convention for signeds and unsigneds is different.  This can happen
>>>   when a small word (e.g. 8 bit) is represented in a larger word
>>>   (e.g. 32 bit), in which case the signed version will be passed sign
>>>   extended and the unsigned version will be passed zero extended.
>>
>> I don't believe that this modification had the intended effect.  In
>> particular, while we correctly distinguish between signed and unsigned
>> words for primitives, we do not do so for _import-ed functions.
>
> Could someone on a PPC please run this test with mlton-20041109?  
> Thanks.
> <test.tgz>