![]() |
|
||||||||||||||
| | 首页 | 新闻 | 文库 | 方案 | 技术 | 独家 | 座谈 | 下载 | 图库 | 开发板 | 仿真器 | 邮购 | VIP | 芯片 | 客户评价 | 论坛 | | ||
|
||
|
|||||
| uclinux-2008R1-RC8(bf561)到VDSP5的移植(49):kernel_thread_helper的问题 | |||||
作者:快乐虾 文章来源:http://blog.csdn.net/lights_joy 点击数: 更新时间:2008-7-7 ![]() |
|||||
|
在arch/blackfin/kernel/process.c中有这样一个函数:
/*
* This gets run with P1 containing the
* function to call, and R1 containing
* the "args". Note P0 is clobbered on the way here.
*/
void kernel_thread_helper(void);
__asm__(".section .text\n"
".align 4\n"
"_kernel_thread_helper:\n\t"
"\tsp += -12;\n\t"
"\tr0 = r1;\n\t" "\tcall (p1);\n\t" "\tcall _do_exit;\n" ".previous");
它将引发一个错误:
[Error ea5004] "c:\temp\acc06a8ef03000\acc06a8ef03001.s":67 Syntax Error in :
.align 2;
syntax error is at or near text '.align'.
Attempting error recovery by ignoring text until the ';'
Previous errors prevent assembly
Assembler totals: 1 error(s) and 0 warning(s)
cc3089: fatal error: Assembler failed
怎么看都找不到.align 2这行语句。
逐行屏蔽这些汇编语句后发现,问题出在".previous"这行上,查了下.previous:
The .PREVIOUS directive instructs the assembler to set the current section in memory to the section described immediately before the current one. The .PREVIOUS directive operates on a stack.
Syntax:
.PREVIOUS;
The following examples provide valid and invalid cases of the use of the consecutive .PREVIOUS directives.
嘿嘿,原来少了个分号,影响到下面的C程序的生成了。
改为".previous;"后搞定。
|
|||||
| 文章录入:admin 责任编辑:admin | |||||
| 【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 | |||||
| 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
| | 本站介绍 | 合作联络 | 欢迎投稿 | 广告业务 | 网站地图 | 设为首页 | 加入收藏 | 友情链接 | 网站公告 | 联系我们 | | |||
|