1336 views|0 replies

3836

Posts

19

Resources
The OP
 

Storage alias fuzziness (alias) [Copy link]

Alias ambiguity occurs when multiple different variable names refer to the same storage area, that is, the instructions that operate on these variables may have storage dependencies. The dependencies between instructions restrict the arrangement of instructions, including software pipelining. The assembly optimizer assumes that all memory references are aliased, and it gives control to the user to provide information about whether the storage is aliased. The programmer can provide storage alias information through a compilation option/"restrict" keyword/two linear assembly pseudo instructions. -mt compilation option: indicates that there is no storage aliasing in the code. Carefully determine whether to use -mt. If the code uses aliasing technology and the -mt option is set, unexpected results may occur. Restrict keyword: In C programming, the restrict declaration of an array or pointer variable prompts the compiler that the storage area pointed to by the variable will not overlap with the storage area pointed to by other variables. .mdep pseudo-instruction: used to explicitly declare memory dependencies. .no_mdep pseudo-instruction: tells the assembly optimizer that no memory dependencies appear in the function body. *Do not confuse the concepts of "storage alias ambiguity (memory dependency)" and "storage bank conflict", which have different meanings and impacts. Alias ambiguity affects the correctness of the program (of course, it may also affect performance), and storage bank conflict affects the performance of the program. Memory dependencies have a greater impact on instruction scheduling than storage bank conflicts.

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list