[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] SHIFT questions
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] SHIFT questions |
Date: |
Fri, 05 Feb 2010 01:30:28 +0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Iztok Kobal <address@hidden> writes:
> If I read e.g. XDS M2 doc (see
> http://www.excelsior-usa.com/doc/isom2.html) the things for me are
> more or less clear:
>
> "A call of SHIFT shall have two actual parameters. The first parameter
> shall be an expression that is of a packedset type. The second
> parameter shall be an expression of a type with which the signed type
> is value parameter compatible."
>
> Note: value parameter compatibility
>
> That means: compile time (in case of constant 2nd argument) or
> run-time exception (in case of type range check was enabled and
> variable 2nd argument) when 2nd argument was greater than MAXBITS.
>
>
> Otherwise (2nd argument was variable and no_of_shifts >= MAXBITS and
> no runtime type range check was enabled):
Hi Iztok,
now fixed in the CVS, if the second parameter is <-MAXBITS or >MAXBITS
then a range overflow is generated. (Detected at compile time if
constant or at runtime providing the compiler switch was enabled).
regards,
Gaius
* gm2/gm2-compiler/M2Base.def: declare and export
ExceptionShift, ExceptionRotate.
* gm2/gm2-compiler/M2Base.mod: assign ExceptionShift
and ExceptionRotate.
* gm2/gm2-compiler/M2Quads.mod: insert runtime checks
to both SHIFT and ROTATE.
* gm2/gm2-compiler/M2Range.def: declared and export
InitRotateCheck, InitShiftCheck.
* gm2/gm2-compiler/M2Range.mod: implement InitShiftCheck
and InitRotateCheck.
* gm2/gm2-libs/M2RTS.def: declare and export
ShiftException and RotateException.
* gm2/gm2-libs/M2RTS.mod: implement ShiftException
and RotateException.
* gm2/gm2-libs-iso/M2RTS.def: declare and export
ShiftException and RotateException.
* gm2/gm2-libs-iso/M2RTS.mod: implement ShiftException
and RotateException.
* gm2/ulm-lib-gm2/std/M2RTS.mod: implement ShiftException
and RotateException.
* gm2/gm2-compiler/M2Range.mod: fixed bugs in FoldShift
FoldRotate, CodeShiftRotate so that the subrange of the
set rather than the set type is range tested.
* gm2/TODO: removed the SHIFT and ROTATE range checking
entry.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Gm2] SHIFT questions,
Gaius Mulley <=