> * _If_ we ever expect to compile the VM itself for Thumb (or Thumb-2), we
> _need_ to address this issue so that branches from nanojit-generated ARM code
> can interwork properly.
I don't think we'll do this for spidermonkey.
> * If we don't ever expect to compile the VM for Thumb, this isn't an issue at
> all, provided that the generated code guarantees never to call anything outside
> of TM. For example, if generated code calls into the C library and the C
> library is compiled for Thumb-2, interworking calls will be required.
The second part is more interesting -- we'll be mostly calling mozilla code, but I can see a future world where we'd want to make more and more direct calls on trace. I don't think there's a big cost to generating iterworking branches, is there?
Though... I haven't thought this through all that much, but intra-trace branches would just be normal, and we already restore pc on return via ldmia which will handle the mode switch (on new enough architectures). I guess for ins_call we don't generate bx but just b? Is there any other change that would be needed?
> * _If_ we ever expect to compile the VM itself for Thumb (or Thumb-2), we
> _need_ to address this issue so that branches from nanojit-generated ARM code
> can interwork properly.
I don't think we'll do this for spidermonkey.
> * If we don't ever expect to compile the VM for Thumb, this isn't an issue at
> all, provided that the generated code guarantees never to call anything outside
> of TM. For example, if generated code calls into the C library and the C
> library is compiled for Thumb-2, interworking calls will be required.
The second part is more interesting -- we'll be mostly calling mozilla code, but I can see a future world where we'd want to make more and more direct calls on trace. I don't think there's a big cost to generating iterworking branches, is there?
Though... I haven't thought this through all that much, but intra-trace branches would just be normal, and we already restore pc on return via ldmia which will handle the mode switch (on new enough architectures). I guess for ins_call we don't generate bx but just b? Is there any other change that would be needed?