SH4 inline assemble
2013-03-12 15:19
190 查看
转自:http://msdn.microsoft.com/zh-cn/library/aa448670.aspx
SH4 对于MSVS编译器来说目前并不支持内联汇编
Limitations of the __asm Keyword in SH-4 Inline Assembly (Windows CE 5.0)
Windows CE 5.0此主题尚未评级 - 评价此主题
Send
Feedback
Source code that uses the __asm instruction cannot be compiled with the /GL - Enable Link-Time Code Generation option.
Unlike other target architectures, the SH4 treats the __asm instruction as a special function call; the string containing the instruction is treated as an argument to the function.
Furthermore, the SH-4 front-end treats any function that begins with the __asm string in this way. For example, the following code examples both define inline-asm functions that follow the standard SH4 call conventions.
int asm_int(const char *); float asm_float(const char *);
In the preceding examples, the SH-4 assumes that any return value of __asm_int() is an integer in R0. Similarly, SH-4 assumes the return value for __asm_float() is a floating point number in fr0. Thus,
the SH-4 user can have multiple __asm functions that interface with any other code in a predictable manner.
This strategy causes difficulties for Link-time Code Generation (LTCG), because the compiler back-end, which processes the __asmcalls, is invoked after the linker is invoked.
The linker treats all the __asm calls as simply another function call and attempts to resolve all __asm function calls to their definitions.
However, because __asm is not a conventional function, it has no definition: the compiler back-end replaces an __asm function call with SH-4 instructions. Thus, if the user attempts LTCG, the linker generates a linker error
that indicates the symbol __asm is not defined.
相关文章推荐
- 正确使用GCC inline assemble 中的 clobber
- Android NDK inline函数只有第一个实例化的会生效
- C/C++: Inline function, calloc vs malloc
- paste in vim command line
- display:inline、block、inline-block的区别
- 【PAT1014】 Waiting in Line (30) queue模拟排队
- ownCloud10BUG问题 – PHP is apparently set up to strip inline doc blocks...
- Python: Catch multiple exceptions in one line (except block)
- 为什么会出现Notice: Undefined index: submit in D:\xampp\htdocs\test.php on line 19
- Uva 216 - Getting in Line
- Fatal error: Maximum execution time of 60 seconds exceeded in *.php on line...
- 检测和恢复SSDT HOOK,INLINE SSDT HOOK
- a missing vtable usually means the first non-inline virtual member function 问题
- inline 定义普通函数和类的成员函…
- 算法竞赛入门经典第六章例题6-5 Boxes in a Line UVA - 12657
- 内联函数---Inline Function
- SSDT Hook的妙用-对抗ring0 inline hook
- dijit.InlineEditBox
- 深入display:inline-block
- 让IE6区块元素具备display:inline-block属性