网站公告列表

  没有公告

加入收藏
设为首页
联系本站
您现在的位置: AnalogCN安诺电子 >> 文章 >> 技术交流 >> 文章正文
  uclinux-2008R1-RC8(bf561)到VDSP5的移植(49):kernel_thread_helper的问题           ★★★ 【字体:
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 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    对比ADI两代TD-SCDMA射频IC得
    [结尾篇]ADSP-TS20XS系列DSP
    一种基于DDS的幅值可调信号发
    基于ADSP2181的CAN总线通讯设
    一种采用单片机控制AD9854为
    在vs2008下使用ffmpeg(5):
    在vs2008下使用ffmpeg(4):
    在vs2008下使用ffmpeg(3):
    ADI AD8275电平转换16位ADC驱
    Boot在ADSP-BF533上的移植
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    版权所有:AnalogCN安诺电子 湘ICP备06016315号