Partial fix for 587029, Different results on Alpha

Alex Cherepanov <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Organization Coscript Software
Message-ID <[email protected]>
Do sign extension on 64-bit platforms.

Genoa test considers 64-bit integers to be an error. If we decide
to implement 32-bit arithmetic on any platform this patch
should be undone.

_______________________________________________
gs-code-review mailing list
[email protected]
http://www.ghostscript.com/mailman/listinfo/gs-code-review
gs_ttf.ps.diff (text/plain, 658 B)
Index: gs/lib/gs_ttf.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/gs_ttf.ps,v
retrieving revision 1.33
diff -b -u -r1.33 gs_ttf.ps
--- gs/lib/gs_ttf.ps	15 Oct 2003 00:03:30 -0000	1.33
+++ gs/lib/gs_ttf.ps	15 Nov 2003 06:51:39 -0000
@@ -192,6 +192,13 @@
   2 copy gets16 16 bitshift 3 1 roll 2 add getu16 add
 } bind def
 
+16#ffffffff 0 gt {  % 64-bit sign extension
+  { /curxuid /gets32 } {
+    mark 1 index load aload pop { 16#80000000 xor 16#80000000 sub } aload pop
+    .packtomark cvx def
+  } bind forall
+} if
+
 % <string> <index> <integer> putu16 -
 /putu16 {
   3 copy -8 bitshift put
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.