cvsuser 02/11/30 08:31:33
Modified: . dotgnu.ops
Log:
"Oi! dotgnu folks, No!
assuming that char is signed is bang out of order" :-)
[not all the world's an x86, sparc ...]
[OK. so a small proportion of the world *is* PPC and ARM, which seem to be
about the only two platforms with char as unsigned]
Revision Changes Path
1.3 +2 -2 parrot/dotgnu.ops
Index: dotgnu.ops
===================================================================
RCS file: /cvs/public/parrot/dotgnu.ops,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- dotgnu.ops 26 Nov 2002 16:56:26 -0000 1.2
+++ dotgnu.ops 30 Nov 2002 16:31:33 -0000 1.3
@@ -18,13 +18,13 @@
=cut
inline op conv_i1(inout INT) {
- $1 = (INTVAL)((char)($1));
+ $1 = (INTVAL)((signed char)($1));
goto NEXT();
}
inline op conv_i1_ovf(inout INT) {
if($1 >= -128 && $1 <= 127) {
- $1 = (INTVAL)((char)($1));
+ $1 = (INTVAL)((signed char)($1));
}
else {
internal_exception(1, "Overflow exception for conv_i1_ovf\n");