MASM指令选项序言:无效
我正在学习如何使用MSM的官方文档使用MASM,但是option> option>指令( https://learn.microsoft.com/en-us/cpp/cpp/assembler/masm/masm/masm/poption-mast-mast 170 )。它被用于
memcpy
的标准库实现中,它似乎可以正常工作
我的代码:
title entry - general purpose testing ground for asm operations
include ksamd64.inc
subttl "entry"
NESTED_ENTRY entry, _TEXT
option PROLOGUE:NONE, EPILOGUE:NONE
; error here: "A2220 Missing .ENDPROLOGUE"
cvtpi2ps xmm0, qword ptr[rcx]
rsqrtps xmm1, xmm0
movaps xmmword ptr[rcx], xmm1
cvtpi2ps xmm0, qword ptr[rcx+8]
rsqrtps xmm1, xmm0
movups xmmword ptr[rcx+8], xmm1
.beginepilog
ret
NESTED_END entry, _TEXT
end
I'm learning how to use masm using MS's official docs, but there's almost nothing written on the option
directive (https://learn.microsoft.com/en-us/cpp/assembler/masm/option-masm?view=msvc-170). It was used in the standard library implementation of memcpy
where it seems to work properly
my code:
title entry - general purpose testing ground for asm operations
include ksamd64.inc
subttl "entry"
NESTED_ENTRY entry, _TEXT
option PROLOGUE:NONE, EPILOGUE:NONE
; error here: "A2220 Missing .ENDPROLOGUE"
cvtpi2ps xmm0, qword ptr[rcx]
rsqrtps xmm1, xmm0
movaps xmmword ptr[rcx], xmm1
cvtpi2ps xmm0, qword ptr[rcx+8]
rsqrtps xmm1, xmm0
movups xmmword ptr[rcx+8], xmm1
.beginepilog
ret
NESTED_END entry, _TEXT
end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确实记录了很差,但是您的代码不是混合版本/环境吗?我从 的不同角落挖出了以下信息。
大约代码>
大约
大约
大约
您没有使用
prolog_end
,而是写nested_end
而不是entry> entry_end_end
。为什么您使用短语
选项序言:无,结语:无
?也许只是将其删除...Indeed poorly documented, but is your code not mixing versions/environments?. I have dug up following info from different corners of the web.
About
.ENDPROLOG
About
NESTED_ENTRY
About
PROLOG_END
About
ENTRY_END
You didn't use
PROLOG_END
and you wroteNESTED_END
instead ofENTRY_END
.Why do you use the phrase
option PROLOGUE:NONE, EPILOGUE:NONE
? Perhaps simply remove it...