打印

Illegal opcode (xxxxxxxx) at pc = yyyyyyyy

[复制链接]
3295|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
extreme001|  楼主 | 2007-8-29 15:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
现在写了一个函数,是一个480*640的二重循环,处理图象的

按F10单部运行的时候经常跑飞掉,然后提示Illegal opcode (xxxxxxxx) at pc = yyyyyyyy,xxxxxxxx是yyyyyyyy地址处的操作码,用Mixed ASM/Source查看,发现此处的汇编语句变成了 .word xxxxxxxx

不知道这个语句是干什么的,总之到了这里就出错了

我的编译选项完全没有修改,保持了 -g ,没有选择 -oN(N=1,2,3)

=================================

该函数代码如下

void GaussianFilter3x3
(
WORD pR1[ ][IMAGEWIDTH],
WORD pG1[ ][IMAGEWIDTH],
WORD pB1[ ][IMAGEWIDTH],
WORD WR1[ ][IMAGEWIDTH],
WORD WG1[ ][IMAGEWIDTH],
WORD WB1[ ][IMAGEWIDTH]
)
{
    volatile int i,j;
    unsigned int temp;


    for(j=1;j<479;j++)
        for(i=1;i<639;i++  )
        {  
            //if(pR1[j] == 0)// skip暗点
            if(pR1[j] < MIN)
            {
                continue;
            }
            else
            {
                temp
                =
                pR1[j-1][i-1]*Table_Gau3x3[0][0]
                +pR1[j-1]*Table_Gau3x3[0][1]
                +pR1[j-1][i+1]*Table_Gau3x3[0][2]
                +pR1[j][i-1]*Table_Gau3x3[1][0]
                +pR1[j]*Table_Gau3x3[1][1]
                +pR1[j][i+1]*Table_Gau3x3[1][2]
                +pR1[j+1][i-1]*Table_Gau3x3[2][0]
                +pR1[j+1]*Table_Gau3x3[2][1]
                +pR1[j+1][i+1]*Table_Gau3x3[2][2];

                WR1[j]=temp>>16;
                
                temp
                =
                pG1[j-1][i-1]*Table_Gau3x3[0][0]
                +pG1[j-1]*Table_Gau3x3[0][1]
                +pG1[j-1][i+1]*Table_Gau3x3[0][2]
                +pG1[j][i-1]*Table_Gau3x3[1][0]
                +pG1[j]*Table_Gau3x3[1][1]
                +pG1[j][i+1]*Table_Gau3x3[1][2]
                +pG1[j+1][i-1]*Table_Gau3x3[2][0]
                +pG1[j+1]*Table_Gau3x3[2][1]
                +pG1[j+1][i+1]*Table_Gau3x3[2][2];    

                WG1[j]=temp>>16;

                temp
                =
                pB1[j-1][i-1]*Table_Gau3x3[0][0]
                +pB1[j-1]*Table_Gau3x3[0][1]
                +pB1[j-1][i+1]*Table_Gau3x3[0][2]
                +pB1[j][i-1]*Table_Gau3x3[1][0]
                +pB1[j]*Table_Gau3x3[1][1]
                +pB1[j][i+1]*Table_Gau3x3[1][2]
                +pB1[j+1][i-1]*Table_Gau3x3[2][0]
                +pB1[j+1]*Table_Gau3x3[2][1]
                +pB1[j+1][i+1]*Table_Gau3x3[2][2];

                WB1[j]=temp>>16;
            }
        }
}
就是一个3×3的Gaussian滤波器,请各位大侠帮助看一下吧,卡了好几天了啊

相关帖子

沙发
extreme001|  楼主 | 2007-8-30 10:28 | 只看该作者

帮帮忙啊!

老板下最后通牒了啊

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

6

主题

20

帖子

0

粉丝