[maemo-developers] Java acceleration/Jazelle

From: Simon Pickering S.G.Pickering at bath.ac.uk
Date: Thu Jul 19 01:49:57 EEST 2007
I've adjusted the code I wrote to test Scott Bambrough's suggestion 
(see earlier in the thread). The name and URL is still the same: 
http://people.bath.ac.uk/enpsgp/nokia770/jazelle/test_jazelle7.c

After the code starts and BXJ R12 is issued, the code does branch to 
the handler whose address is contained in R12 (this can be seen as the 
first entry of the output buffer is equal to the first of the code 
(input) buffer. This may or may not indicate that Jazelle is working - 
on the one hand this is what we'd expect, on the other if Jazelle is 
disabled for some reason this is also what we'd see. We need to get it 
to process more than one instruction to determine which is the case. 
Unfortunately the code segfaults on the second BXJ R12 instruction (the 
one issued at the end of the handler starting at label 2:).

It is definitely this instruction causing the problem, I've spent all 
evening debugging the code to check I'd not made some silly mistake 
(which is not to say I just haven't spotted it) and this instruction is 
the one that produces the segfault.

Therefore, the question is why does this happen? The only apparent 
difference between this BXJ and the first one is that the address is to 
a backwards label rather than a forwards label. I don't think this 
should cause any problems. The other possibility is that the Jazelle 
hardware is now fired up and therefore needs something different to be 
done to it, or I have managed to overwrite one of the registers that 
it's using and it's therefore not happy. This sort of indicates that 
Jazelle is "working", though I'll wait and see if anyone has any other 
ideas

Any suggestions before I try reducing my register usage and trying 
other registers?

Thanks,


Simon

More information about the maemo-developers mailing list