dotgnu-pnet
[Top][All Lists]
Advanced

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

[Pnet-developers] [bugs #10917] libjit convert to int bug patch


From: Evin Robertson
Subject: [Pnet-developers] [bugs #10917] libjit convert to int bug patch
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.3) Gecko/20041007 Galeon/1.3.17 (Debian package 1.3.17-2)

This mail is an automated notification from the bugs tracker
 of the project: DotGNU Portable.NET.




/**************************************************************************/
[bugs #10917] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10917>
Project: DotGNU Portable.NET
Submitted by: Evin Robertson
On: Fri 11/05/04 at 05:35

Category:  None
Severity:  5 - Average
Item Group:  None
Resolution:  None
Privacy:  Public
Assigned to:  None
Status:  Open


Summary:  libjit convert to int bug patch

Original Submission:  Similar in symptom to the previous bug.  If a write is 
made from one global variable to another, the type of the source might be used 
instead of the type of the destination.

The problem is that jit_insn_store_relative determines its mode of operation 
from the source value.  So the first problem is that dpas does not run 
jit_insn_convert on the source value to give the store enough information.

The second problem is that jit_insn_convert does not work properly when going 
from an unsigned byte to an integer.  The value returned is the original value 
without the correct type.

A patch is attached which corrects both problems.  Probably other CVT_NONE 
values should be replaced as well.

Because every call to jit_insn_store_relative will likely be preceded by a 
jit_insn_convert, perhaps it should be modified to take an extra parameter 
giving the destination type.

program loadb;

Var
   a : Byte;
   b : Integer;

Procedure run;
Var x :  Integer;
begin
   b := a;
   x := a;
   WriteLn(a);
   WriteLn(b);
   WriteLn(x);
end;

begin
   a := 250;
   b := -1;
   run;
end.






File Attachments
-------------------

-------------------------------------------------------
Date: Fri 11/05/04 at 05:35  Name: jit.patch  Size: 676B   By: evin

http://savannah.gnu.org/bugs/download.php?item_id=10917&amp;item_file_id=1841






For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10917>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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