145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro export 1+.nolist
245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[export %1]
345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org; Raw exception handling operations
645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro proc_frame 1+.nolist
745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%1:
845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[proc_frame %1]
945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
1045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
1145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org; Disable these as they're too closely named to the macroized ones.
1245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org; MASM needs a preceding . to use these, so it seems reasonable for
1345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org; us to similarly require the [].
1445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;
1545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%imacro pushreg 1.nolist
1645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;[pushreg %1]
1745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%endmacro
1845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;
1945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%imacro setframe 1-2.nolist
2045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;[setframe %1 %2]
2145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%endmacro
2245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;
2345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%imacro allocstack 1.nolist
2445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;[allocstack %1]
2545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%endmacro
2645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;
2745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%imacro savereg 2.nolist
2845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;[savereg %1 %2]
2945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%endmacro
3045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;
3145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%imacro savexmm128 2.nolist
3245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;[savexmm128 %1 %2]
3345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%endmacro
3445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;
3545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%imacro pushframe 0-1.nolist
3645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;[pushframe %1]
3745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%endmacro
3845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;
3945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%imacro endprolog 0.nolist
4045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;[endprolog]
4145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;%endmacro
4245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org;
4345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
4445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro endproc_frame 0.nolist
4545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[endproc_frame]
4645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
4745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
4845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org; Complex (macro) exception handling operations
4945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org; Mimics many macros provided by MASM's macamd64.inc
5045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro push_reg 1
5145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgpush %1
5245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[pushreg %1]
5345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
5445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
5545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro rex_push_reg 1
5645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgdb 0x48
5745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgpush %1
5845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[pushreg %1]
5945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
6045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
6145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro push_eflags 0
6245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgpushfq
6345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[allocstack 8]
6445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
6545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
6645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro rex_push_eflags 0
6745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgdb 0x48
6845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgpushfq
6945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[allocstack 8]
7045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
7145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
7245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro alloc_stack 1
7345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgsub rsp, %1
7445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[allocstack %1]
7545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
7645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
7745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro save_reg 2
7845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgmov [rsp+%2], %1
7945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[savereg %1 %2]
8045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
8145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
8245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro save_xmm128 2
8345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgmovdqa [rsp+%2], %1
8445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[savexmm128 %1 %2]
8545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
8645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
8745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro push_frame 0-1.nolist
8845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[pushframe %1]
8945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
9045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
9145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro set_frame 1-2
9245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%if %0==1
9345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgmov %1, rsp
9445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%else
9545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orglea %1, [rsp+%2]
9645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endif
9745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[setframe %1 %2]
9845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
9945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
10045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro end_prolog 0.nolist
10145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[endprolog]
10245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
10345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
10445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%imacro end_prologue 0.nolist
10545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org[endprolog]
10645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org%endmacro
107