[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libjit-developers] Patch to handle constants in jit-insn.c
From: |
Avinash Atreya |
Subject: |
Re: [Libjit-developers] Patch to handle constants in jit-insn.c |
Date: |
Thu, 15 Dec 2005 19:57:16 +0530 |
Hi Aleksey,
Could you please provide more information on the problem. Why do you
need to take an address of a constant?
When trying to implement arrays for dpas, I ran into this issue of junk
values when constants were used as array indices. On exploring furhter,
it turned out that the problem was due to the address of instruction
called on constants. My bad, it seemed that one way to fix that was to
create a temporary variable, assign the constant to it and return its
address.
I would rather consider calling jit_insn_address_of() on a constant
value as error condition and therefore simply
return zero from the function in this case.
On digging a further it turned out that that instruction shoudn't
have been used at all, like you are suggesting. Returning zero treating
it as an error does seem like the right way to handle constants.
Sorry about the mistake. My first patch to an open source project :(.
Do I resubmit the patch retaining the condition checking for constants
but returning zero instead?
On a brighter note, it does seem like I have a start on arrays for
dpas. Multidimensional arrays are also working. Need a little bit more
work on that ( bounds checking and all that). Should hopefully have a
patch soon.
Thanks
Avinash