[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Simulavr-devel] erroneous offset in rjmp and rcall
From: |
Theodore A. Roth |
Subject: |
Re: [Simulavr-devel] erroneous offset in rjmp and rcall |
Date: |
Fri Sep 20 17:21:38 2002 |
Hi Alberto,
Try the attached patch. If it fixes your problem, I'll commit it to cvs.
On Fri, 20 Sep 2002, eban wrote:
:) I think that somewhere in your code, where you
:) calculate the real address = next address+offset, you
:) need to check if it is lower than 0, and in that case
:) add 8192. If the real address is over 8192 you need to
:) substract 8192.
The check was there. I had changed PC to from int to dword to make sure
that it is 32 bits which screwed up the check (see adjust_PC_to_max() in
avrcore.c) The < 0 case gets compiled out if PC is unsigned.
Ted Roth
sim-pc-signed.diff
Description: Text document