[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
// This test checks that the SEH directives emit the correct unwind data.
|
2018-12-19 06:10:17 +08:00
|
|
|
|
2020-08-20 15:38:17 +08:00
|
|
|
// RUN: llvm-mc -triple aarch64-pc-win32 -filetype=obj %s | llvm-readobj -S -r -u - | FileCheck %s
|
2018-12-19 06:10:17 +08:00
|
|
|
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
// Check that the output assembler directives also can be parsed, and
|
|
|
|
// that they produce equivalent output:
|
|
|
|
|
|
|
|
// RUN: llvm-mc -triple aarch64-pc-win32 -filetype=asm %s | llvm-mc -triple aarch64-pc-win32 -filetype=obj - | llvm-readobj -S -r -u - | FileCheck %s
|
|
|
|
|
2018-12-19 06:10:17 +08:00
|
|
|
// CHECK: Sections [
|
|
|
|
// CHECK: Section {
|
|
|
|
// CHECK: Name: .text
|
|
|
|
// CHECK: RelocationCount: 0
|
|
|
|
// CHECK: Characteristics [
|
|
|
|
// CHECK-NEXT: ALIGN_4BYTES
|
|
|
|
// CHECK-NEXT: CNT_CODE
|
|
|
|
// CHECK-NEXT: MEM_EXECUTE
|
|
|
|
// CHECK-NEXT: MEM_READ
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK: Section {
|
|
|
|
// CHECK: Name: .xdata
|
2020-09-08 05:00:07 +08:00
|
|
|
// CHECK: RawDataSize: 52
|
2018-12-19 06:10:17 +08:00
|
|
|
// CHECK: RelocationCount: 1
|
|
|
|
// CHECK: Characteristics [
|
|
|
|
// CHECK-NEXT: ALIGN_4BYTES
|
|
|
|
// CHECK-NEXT: CNT_INITIALIZED_DATA
|
|
|
|
// CHECK-NEXT: MEM_READ
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK: Section {
|
|
|
|
// CHECK: Name: .pdata
|
2020-08-20 15:38:17 +08:00
|
|
|
// CHECK: RelocationCount: 2
|
2018-12-19 06:10:17 +08:00
|
|
|
// CHECK: Characteristics [
|
|
|
|
// CHECK-NEXT: ALIGN_4BYTES
|
|
|
|
// CHECK-NEXT: CNT_INITIALIZED_DATA
|
|
|
|
// CHECK-NEXT: MEM_READ
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
|
|
|
|
// CHECK-NEXT: Relocations [
|
|
|
|
// CHECK-NEXT: Section (4) .xdata {
|
2020-09-08 05:00:07 +08:00
|
|
|
// CHECK-NEXT: 0x28 IMAGE_REL_ARM64_ADDR32NB __C_specific_handler
|
2018-12-19 06:10:17 +08:00
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Section (5) .pdata {
|
2021-09-07 19:56:43 +08:00
|
|
|
// CHECK-NEXT: 0x0 IMAGE_REL_ARM64_ADDR32NB .text
|
2018-12-19 06:10:17 +08:00
|
|
|
// CHECK-NEXT: 0x4 IMAGE_REL_ARM64_ADDR32NB .xdata
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
|
2020-08-20 16:39:25 +08:00
|
|
|
// CHECK-NEXT: UnwindInformation [
|
|
|
|
// CHECK-NEXT: RuntimeFunction {
|
|
|
|
// CHECK-NEXT: Function: func
|
|
|
|
// CHECK-NEXT: ExceptionRecord: .xdata
|
|
|
|
// CHECK-NEXT: ExceptionData {
|
2020-08-16 05:26:24 +08:00
|
|
|
// CHECK-NEXT: FunctionLength: 100
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
// CHECK: Prologue [
|
2020-08-16 05:26:24 +08:00
|
|
|
// CHECK-NEXT: 0xec ; clear unwound to call
|
|
|
|
// CHECK-NEXT: 0xea ; context
|
|
|
|
// CHECK-NEXT: 0xe9 ; machine frame
|
|
|
|
// CHECK-NEXT: 0xe8 ; trap frame
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
// CHECK-NEXT: 0xe3 ; nop
|
|
|
|
// CHECK-NEXT: 0xe202 ; add fp, sp, #16
|
|
|
|
// CHECK-NEXT: 0xdd41 ; str d13, [sp, #8]
|
|
|
|
// CHECK-NEXT: 0xde83 ; str d12, [sp, #-32]!
|
2020-09-07 19:45:37 +08:00
|
|
|
// CHECK-NEXT: 0xd884 ; stp d10, d11, [sp, #32]
|
|
|
|
// CHECK-NEXT: 0xda05 ; stp d8, d9, [sp, #-48]!
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
// CHECK-NEXT: 0x83 ; stp x29, x30, [sp, #-32]!
|
|
|
|
// CHECK-NEXT: 0x46 ; stp x29, x30, [sp, #48]
|
|
|
|
// CHECK-NEXT: 0xd141 ; str x24, [sp, #8]
|
|
|
|
// CHECK-NEXT: 0xd483 ; str x23, [sp, #-32]!
|
2020-08-16 05:26:24 +08:00
|
|
|
// CHECK-NEXT: 0xe6 ; save next
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
// CHECK-NEXT: 0xc882 ; stp x21, x22, [sp, #16]
|
2020-08-16 05:26:24 +08:00
|
|
|
// CHECK-NEXT: 0xd6c2 ; stp x25, lr, [sp, #16]
|
|
|
|
// CHECK-NEXT: 0x24 ; stp x19, x20, [sp, #-32]!
|
2020-09-07 19:45:37 +08:00
|
|
|
// CHECK-NEXT: 0xcc83 ; stp x21, x22, [sp, #-32]!
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
// CHECK-NEXT: 0x83 ; stp x29, x30, [sp, #-32]!
|
|
|
|
// CHECK-NEXT: 0xe1 ; mov fp, sp
|
|
|
|
// CHECK-NEXT: 0x01 ; sub sp, #16
|
|
|
|
// CHECK-NEXT: 0xe4 ; end
|
|
|
|
// CHECK-NEXT: ]
|
2020-09-08 05:00:07 +08:00
|
|
|
// CHECK-NEXT: Epilogue [
|
|
|
|
// CHECK-NEXT: 0x01 ; add sp, #16
|
|
|
|
// CHECK-NEXT: 0xe4 ; end
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: ExceptionHandler [
|
|
|
|
// CHECK-NEXT: Routine: __C_specific_handler (0x0)
|
|
|
|
// CHECK-NEXT: Parameter: 0x0
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
|
2018-12-19 06:10:17 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
.globl func
|
|
|
|
.def func
|
|
|
|
.scl 2
|
|
|
|
.type 32
|
|
|
|
.endef
|
|
|
|
.seh_proc func
|
|
|
|
func:
|
|
|
|
sub sp, sp, #24
|
|
|
|
.seh_stackalloc 24
|
|
|
|
mov x29, sp
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
.seh_set_fp
|
|
|
|
stp x29, x30, [sp, #-32]!
|
|
|
|
.seh_save_fplr_x 32
|
2020-09-07 19:45:37 +08:00
|
|
|
stp x21, x22, [sp, #-32]!
|
|
|
|
.seh_save_regp_x x21, 32
|
2020-08-16 05:26:24 +08:00
|
|
|
stp x19, x20, [sp, #-32]!
|
|
|
|
.seh_save_r19r20_x 32
|
|
|
|
stp x25, x30, [sp, #16]
|
|
|
|
.seh_save_lrpair x25, 16
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
stp x21, x22, [sp, #16]
|
|
|
|
.seh_save_regp x21, 16
|
2020-08-16 05:26:24 +08:00
|
|
|
stp x23, x24, [sp, #32]
|
|
|
|
.seh_save_next
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
str x23, [sp, #-32]!
|
|
|
|
.seh_save_reg_x x23, 32
|
|
|
|
str x24, [sp, #8]
|
|
|
|
.seh_save_reg x24, 8
|
|
|
|
stp x29, x30, [sp, #48]
|
|
|
|
.seh_save_fplr 48
|
|
|
|
stp x29, x30, [sp, #-32]!
|
|
|
|
.seh_save_fplr_x 32
|
2020-09-07 19:45:37 +08:00
|
|
|
stp d8, d9, [sp, #-48]!
|
|
|
|
.seh_save_fregp_x d8, 48
|
|
|
|
stp d10, d11, [sp, #32]
|
|
|
|
.seh_save_fregp d10, 32
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
str d12, [sp, #-32]!
|
|
|
|
.seh_save_freg_x d12, 32
|
|
|
|
str d13, [sp, #8]
|
|
|
|
.seh_save_freg d13, 8
|
|
|
|
add x29, sp, #16
|
|
|
|
.seh_add_fp 16
|
|
|
|
nop
|
|
|
|
.seh_nop
|
2020-08-16 05:26:24 +08:00
|
|
|
nop
|
|
|
|
.seh_trap_frame
|
|
|
|
nop
|
|
|
|
.seh_pushframe
|
|
|
|
nop
|
|
|
|
.seh_context
|
|
|
|
nop
|
|
|
|
.seh_clear_unwound_to_call
|
2018-12-19 06:10:17 +08:00
|
|
|
.seh_endprologue
|
[AArch64] Generate and parse SEH assembly directives
This ensures that you get the same output regardless if generating
code directly to an object file or if generating assembly and
assembling that.
Add implementations of the EmitARM64WinCFI*() methods in
AArch64TargetAsmStreamer, and fill in one blank in MCAsmStreamer.
Add corresponding directive handlers in AArch64AsmParser and
COFFAsmParser.
Some SEH directive names have been picked to match the prior art
for SEH assembly directives for x86_64, e.g. the spelling of
".seh_startepilogue" matching the preexisting ".seh_endprologue".
For the directives for saving registers, the exact spelling
from the arm64 documentation is picked, e.g. ".seh_save_reg" (to follow
that naming for all the other ones, e.g. ".seh_save_fregp_x"), while
the corresponding one for x86_64 is plain ".seh_savereg" without the
second underscore.
Directives in the epilogues have the same names as in prologues,
e.g. .seh_savereg, even though the registers are restored, not
saved, at that point.
Differential Revision: https://reviews.llvm.org/D86529
2020-08-07 17:44:48 +08:00
|
|
|
nop
|
|
|
|
.seh_startepilogue
|
|
|
|
add sp, sp, #24
|
|
|
|
.seh_stackalloc 24
|
|
|
|
.seh_endepilogue
|
|
|
|
ret
|
2018-12-19 06:10:17 +08:00
|
|
|
.seh_handler __C_specific_handler, @except
|
|
|
|
.seh_handlerdata
|
|
|
|
.long 0
|
|
|
|
.text
|
|
|
|
.seh_endproc
|
|
|
|
|
2020-08-20 15:38:17 +08:00
|
|
|
// Function with no .seh directives; no pdata/xdata entries are
|
|
|
|
// generated.
|
2018-12-19 06:10:17 +08:00
|
|
|
.globl smallFunc
|
|
|
|
.def smallFunc
|
|
|
|
.scl 2
|
|
|
|
.type 32
|
|
|
|
.endef
|
|
|
|
.seh_proc smallFunc
|
|
|
|
smallFunc:
|
|
|
|
ret
|
|
|
|
.seh_endproc
|
2020-08-20 15:38:17 +08:00
|
|
|
|
|
|
|
// Function with no .seh directives, but with .seh_handlerdata.
|
|
|
|
// No xdata/pdata entries are generated, but the custom handler data
|
|
|
|
// (the .long after .seh_handlerdata) is left orphaned in the xdata
|
|
|
|
// section.
|
|
|
|
.globl handlerFunc
|
|
|
|
.def handlerFunc
|
|
|
|
.scl 2
|
|
|
|
.type 32
|
|
|
|
.endef
|
|
|
|
.seh_proc handlerFunc
|
|
|
|
handlerFunc:
|
|
|
|
ret
|
|
|
|
.seh_handler __C_specific_handler, @except
|
|
|
|
.seh_handlerdata
|
|
|
|
.long 0
|
|
|
|
.text
|
|
|
|
.seh_endproc
|