本文转自http://blog.csdn.net/fangqu/archive/2008/10/22/3123041.aspx
编译zlib-1.2.3时发生错误:
inffas32.asm(594) : error A2070: invalid instruction operands
inffas32.asm(596) : error A2070: invalid instruction operands
inffas32.asm(610) : error A2070: invalid instruction operands
inffas32.asm(667) : error A2070: invalid instruction operands
上网一查,发现别人也遇到相同的问题:http://svn.haxx.se/dev/archive-2005-11/0942.shtml。原因在于
It (Microsoft Macro Assembler 8.0, included with Visual C++ 2005 Express ) refuses to assemble a MOVD instruction with a memory operand with an implied size, and requires that "dword ptr" prefix the memory operand.
微软说这是by design,不是bug:
解决办法是把inffas32.asm中的4处出错的地址前加上 dword ptr 关键字
比如:
movd mm4, [esp+0]
的汇编代码,添加dword ptr修饰符,改为
movd mm4,dword ptr [esp+0]
这样就能顺利编译、通过测试了。
发表于 @ 2008年10月22日 11:20:00 | 评论( 0 ) | 编辑| 举报| 收藏
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/fangqu/archive/2008/10/22/3123041.aspx