Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Generates a two-register push unwind code entry for the specified register pair using the current offset in the prologue.
Syntax
.PUSH2REGregister1, register2
Parameters
register1
The first register to push. Must be a general-purpose 64-bit register.
register2
The second register to push. Must be a general-purpose 64-bit register.
register1 and register2 may each be one of:
RAX, RCX, RDX, RBX, RDI, RSI, RBP, R8, R9, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, R30, R31.
Remarks
Important
This directive is experimental and is subject to change. Enable Unwind Version 3 by using ml64.exe /unwindv3.
- Use
.PUSH2REGto specify how a frame function unwinds. You can only use this directive within the prologue, which extends from the PROCFRAMEdeclaration to the .ENDPROLOG directive. - These directives generate unwind metadata (
.xdataand.pdatasections) but don't produce executable code. In Unwind Version 3,.PUSH2REGmust appear before the instruction that actually implements the action to be unwound. To ensure agreement, it's a good practice to wrap both the unwind directives and the code they're meant to unwind in a macro. - If register1 and register2 are consecutive and in increasing order, MASM emits a
WOD_PUSH_CONSECUTIVE_2unwind code. Otherwise, MASM emits aWOD_PUSH2unwind code.
Note
In Unwind Version 1, the directive appears after the corresponding instruction. In Unwind Version 3, the directive appears before the instruction.
Example for unwindv3
; ml64 /unwindv3 ex1.asm /link /entry:Example1 /SUBSYSTEM:CONSOLE
_text SEGMENT
Example1 PROC FRAME
.push2reg r10, r11
push2 r10, r11
.push2reg rbx, rsi
push2 rbx, rsi
.endprolog
; rest of function ...
ret
Example1 ENDP
_text ENDS
END
See also
x64 Unwind Version 3 (experimental)
Directives Reference
.POP2REG
.PUSHREG
.ENDPROLOG
MASM BNF Grammar