gpt4 book ai didi

visual-studio - masm 指令选项序言 :none has no effect

转载 作者:行者123 更新时间:2023-12-05 04:30:08 25 4
gpt4 key购买 nike

我正在学习如何使用 MS 的官方文档来使用 masm,但是 option 指令(https://learn.microsoft.com/en-us/cpp/assembler/masm/option-masm?view=msvc-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

最佳答案

确实文档不足,但您的代码是否没有混合版本/环境?。我从网络的不同角落挖掘了以下信息。

关于.ENDPROLOG

Signals the end of the prologue declarations.It is an error to use any of the prologue declarations outside of the region between PROC FRAME and .ENDPROLOG.


关于NESTED_ENTRY

A NESTED_ENTRY must have an associated PROLOG_END (SH-4) and ENTRY_END (SH-4).

关于PROLOG_END

This macro must appear following a NESTED_ENTRY (SH-4) or LEAF_ENTRY (SH-4) macro.
It appears after the prolog area and before the matching ENTRY_END (SH-4) macro.

关于ENTRY_END

This macro ends the current routine specified by NESTED_ENTRY (SH-4) or LEAF_ENTRY (SH-4).
Syntax ENTRY_END[Name]
Name should be the same name used in the NESTED_ENTRY or LEAF_ENTRY macros.
The ENTRY_END (SH-4) macro currently ignores Name.


您没有使用 PROLOG_END,而是编写了 NESTED_END 而不是 ENTRY_END

为什么要使用短语option PROLOGUE:NONE, EPILOGUE:NONE?也许只是将其删除...

关于visual-studio - masm 指令选项序言 :none has no effect,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72138920/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com