Am 07.04.2018 um 18:31 schrieb Maarten Brock:
>> Am 07.04.2018 um 15:50 schrieb Maarten Brock:
>>> I see in the stm8-large regression that you fixed it by loading the
>>> least
>>> significant word into x and the most significant byte into a and write
>>> those to the function pointer location as you need them. Is this an OK
>>> solution or would you still prefer the most significant word in x and
>>> the least significant byte in a?
>> The current solution is a bit of an ugly hack, but will certainly be
>> good enough for nearly all users. From this side the issue isn't a big
>> deal any more.
>> However, the >> 8 bug on the assembler / linker side still seems
>> dangerous to me, in case someone tries to use >> 8 in asm code. After
>> all it not just loads wrong data, but also silently overwrites the
>> following instruction.
>> Philipp
> Can you check if my commit of today fixes this?
> Maarten

It is no longer a silent failure. Compiling

void main(void)
        ldw x, #(_main >> 8)

Now gives:

***Internal error: C24 out in outrw()
test.asm:83: Error: <r> relocation error
removing test.rel


Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Sdcc-user mailing list

Reply via email to