By: EduardoS (no.delete@this.spam.com), August 31, 2013 12:26 pm
Room: Moderated Discussions
Linus Torvalds (torvalds.delete@this.linux-foundation.org) on August 31, 2013 11:34 am wrote:
> But for a compiler I can see it being somewhat painful. A compiler does not intuitively think "A0 is an address".
The compiler does know int* is a pointer as it does know float is floating point, the operation set allowed for int* is limited as well, if the ISA does not provide some of those limited operations on the Ax then the problem is with the ISA, the compiler decides to use Dx for pointers and Ax for anything else then it is a problem with the compiler, if the calling convention mandates using Dx for passing pointers then the problem is the calling convention, at this point this separation is no different from FP registers
> But for a compiler I can see it being somewhat painful. A compiler does not intuitively think "A0 is an address".
The compiler does know int* is a pointer as it does know float is floating point, the operation set allowed for int* is limited as well, if the ISA does not provide some of those limited operations on the Ax then the problem is with the ISA, the compiler decides to use Dx for pointers and Ax for anything else then it is a problem with the compiler, if the calling convention mandates using Dx for passing pointers then the problem is the calling convention, at this point this separation is no different from FP registers