__restrict keyword for the XGATE compiler

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

__restrict keyword for the XGATE compiler

1,310件の閲覧回数
davide_ferrari
Contributor II

Hi

does anybody know which is the usage of the __restrict keyword for the XGate compiler?

Many thanks

Davide

ラベル(1)
0 件の賞賛
返信
1 返信

875件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

The semantic is the same as the restrict keyword in ANSI C99.

 

It basically means that the structure pointer to by a restricted pointer is not modified by some other alias.

More concretely for the RS08, __restrict is used for the pointer to the parameter block for a channel to allow the compiler to keep parameter values in registers even when calling other functions.

Without restrict, the compiler just knows about a pointer to a struct and would not know that the values in the struct did not change, so he would have to reload them whenever used.

 

Daniel

0 件の賞賛
返信