Re: I'd like to be able to set registers directly
Re: I'd like to be able to set registers directly
- Subject: Re: I'd like to be able to set registers directly
- From: William Kucharski <email@hidden>
- Date: Thu, 07 Jul 2016 07:37:05 -0600
> On Jul 7, 2016, at 7:25 AM, Gordo Cath <email@hidden> wrote:
>
> Hi William,
> Thanks for the help. I'm guessing the register keyword doesn't address variables directly or doesn't do what I thought it was doing.
You are correct that you are incorrect. :-)
The "register" keyword is a largely deprecated "hint" to the compiler that it may want to store that variable in a register for faster access; in reality most C optimizers are pretty good at figuring out what will go in registers and what wont, so the register keyword is largely if not completely ignored.
To actually use registers you have to use assembly instructions and the extended asm syntax of the form I gave a sample of.
William Kucharski
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden