gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Bug in gm2-2008-12-15 compiling xor


From: john o goyo
Subject: [Gm2] Bug in gm2-2008-12-15 compiling xor
Date: Thu, 25 Dec 2008 16:21:22 -0500

There is a problem compiling xor on sets in both the Solaris 10/sparc
and Mac OS X/ppc versions of gm2-2008-12-15.  Both compile to unsigned
division as noted below.

Here are xortest.def and xortest.mod (as a separate module purely for
testing purposes).
================================================
DEFINITION MODULE xor32test;

TYPE
    WordSet = SET OF [0..31];

PROCEDURE XOR32(x, y :WordSet; VAR z :WordSet);

END xor32test.
================================================
IMPLEMENTATION MODULE xor32test;

PROCEDURE XOR32(x, y :WordSet; VAR z :WordSet);
BEGIN
    z := x / y
END XOR32;

END xor32test.
================================================
The Solaris 10/sparc version compiles the pertinent
bits as follows:

        udivx   %o0, %o1, %o1

The Mac OS X/ppc version compiles the pertinent bits
as follows:

        divwu r4,r3,r4


Sincerely,
jog






reply via email to

[Prev in Thread] Current Thread [Next in Thread]