bugDotGNU Portable.NET - Bugs: bug #10917, libjit convert to int bug patch


You are not allowed to post comments on this tracker with your current authentication level.

bug #10917: libjit convert to int bug patch

Submitted by:  Evin Robertson <evin>
Submitted on:  Fri 05 Nov 2004 05:35:53 AM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Tue 30 Nov 2004 04:07:50 AM UTC, comment #1:

I noticed this bug again. I was attempting to do an unsigned comparison of two integers. So I converted both to jit_type_uint. But the conversion did not take place. Another patch is attached which corrects this.

Evin Robertson <evin>
Fri 05 Nov 2004 05:35:53 AM UTC, 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;

a : Byte;
b : Integer;

Procedure run;
Var x : Integer;
b := a;
x := a;

a := 250;
b := -1;

Evin Robertson <evin>


Attached Files
file #2116:  jit2.patch added by evin (512B - application/octet-stream - Patch for uint conversion)
file #924:  jit.patch added by evin (676B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.


Please enter the title of George Orwell's famous dystopian book (it's a date):



Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 30 Nov 2004 04:07:51 AM UTCevinCarbon-Copy-=>Added rweather --AT-- zip --DOT-- com --DOT-- au
Tue 30 Nov 2004 04:07:50 AM UTCevinAttached File-=>Added jit2.patch, #1927
Fri 05 Nov 2004 05:35:53 AM UTCevinAttached File-=>Added jit.patch, #1841

Back to the top

Powered by Savane 3.1-cleanup1