57
57
58
58
# CHECK: bb.0.entry:
59
59
# CHECK-NEXT: $sp = frame-setup STRXpre killed $[[SCRATCH:[a-z0-9]+]], $sp, -16
60
- # CHECK-NEXT: $fp = frame-setup ADDXri $sp, 0, 0
61
60
# CHECK-NEXT: $sp = frame-setup ADDVL_XXI $sp, -2
62
61
# CHECK-NEXT: $sp = frame-setup SUBXri $sp, 16, 0
63
62
# CHECK-COUNT-2: frame-setup CFI_INSTRUCTION
68
67
# CHECK-NEXT: RET_ReallyLR
69
68
70
69
# ASM-LABEL: test_allocate_sve:
71
- # ASM: .cfi_offset w29, -16
70
+ # ASM: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x20, 0x22, 0x11, 0x10, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 32 + 16 * VG
71
+ # ASM-NEXT: .cfi_offset w29, -16
72
72
#
73
- # UNWINDINFO: DW_CFA_offset: reg29 -16
73
+ # UNWINDINFO: DW_CFA_def_cfa_expression: DW_OP_breg31 +0, DW_OP_consts +32, DW_OP_plus, DW_OP_consts +16, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
74
+ # UNWINDINFO-NEXT: DW_CFA_offset: reg29 -16
74
75
name : test_allocate_sve
75
76
stack :
76
77
- { id: 0, stack-id: scalable-vector, size: 18, alignment: 2 }
@@ -95,7 +96,6 @@ body: |
95
96
# CHECK: bb.0.entry:
96
97
# CHECK-NEXT: $sp = frame-setup STRXpre killed $[[SCRATCH:[a-z0-9]+]], $sp, -32
97
98
# CHECK-NEXT: frame-setup STPXi killed $x21, killed $x20, $sp, 2
98
- # CHECK-NEXT: $fp = frame-setup ADDXri $sp, 0, 0
99
99
# CHECK-NEXT: $sp = frame-setup ADDVL_XXI $sp, -2
100
100
# CHECK-NEXT: $sp = frame-setup SUBXri $sp, 16, 0
101
101
# CHECK-COUNT-4: frame-setup CFI_INSTRUCTION
@@ -109,11 +109,13 @@ body: |
109
109
# CHECK-NEXT: RET_ReallyLR
110
110
#
111
111
# ASM-LABEL: test_allocate_sve_gpr_callee_saves:
112
- # ASM: .cfi_offset w20, -8
112
+ # ASM: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x30, 0x22, 0x11, 0x10, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 48 + 16 * VG
113
+ # ASM-NEXT: .cfi_offset w20, -8
113
114
# ASM-NEXT: .cfi_offset w21, -16
114
115
# ASM-NEXT: .cfi_offset w29, -32
115
116
#
116
- # UNWINDINFO: DW_CFA_offset: reg20 -8
117
+ # UNWINDINFO: DW_CFA_def_cfa_expression: DW_OP_breg31 +0, DW_OP_consts +48, DW_OP_plus, DW_OP_consts +16, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
118
+ # UNWINDINFO-NEXT: DW_CFA_offset: reg20 -8
117
119
# UNWINDINFO-NEXT: DW_CFA_offset: reg21 -16
118
120
# UNWINDINFO-NEXT: DW_CFA_offset: reg29 -32
119
121
name : test_allocate_sve_gpr_callee_saves
@@ -182,24 +184,28 @@ body: |
182
184
183
185
# CHECK: bb.0.entry:
184
186
# CHECK-NEXT: $sp = frame-setup STRXpre killed $[[SCRATCH:[a-z0-9]+]], $sp, -16
185
- # CHECK-NEXT: $fp = frame-setup ADDXri $sp, 0, 0
186
187
# CHECK-NEXT: $sp = frame-setup ADDVL_XXI $sp, -3
187
188
# CHECK-NEXT: $sp = frame-setup SUBXri $sp, 16, 0
188
189
# CHECK-COUNT-2: frame-setup CFI_INSTRUCTION
189
190
190
- # CHECK-NEXT: STR_ZXI $z0, $fp, -1
191
- # CHECK-NEXT: STR_ZXI $z1, $fp, -2
192
- # CHECK-NEXT: STR_PXI $p0, $fp, -17
191
+ # CHECK-NEXT: $[[TMP:x[0-9]+]] = ADDXri $sp, 16
192
+ # CHECK-NEXT: STR_ZXI $z0, killed $[[TMP]], 2
193
+ # CHECK-NEXT: $[[TMP:x[0-9]+]] = ADDXri $sp, 16
194
+ # CHECK-NEXT: STR_ZXI $z1, killed $[[TMP]], 1
195
+ # CHECK-NEXT: $[[TMP:x[0-9]+]] = ADDXri $sp, 16
196
+ # CHECK-NEXT: STR_PXI $p0, killed $[[TMP]], 7
193
197
194
198
# CHECK-NEXT: $sp = frame-destroy ADDVL_XXI $sp, 3
195
199
# CHECK-NEXT: $sp = frame-destroy ADDXri $sp, 16, 0
196
200
# CHECK-NEXT: $sp, $[[SCRATCH]] = frame-destroy LDRXpost $sp, 16
197
201
# CHECK-NEXT: RET_ReallyLR
198
202
#
199
203
# ASM-LABEL: test_address_sve:
200
- # ASM: .cfi_offset w29, -16
204
+ # ASM: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x20, 0x22, 0x11, 0x18, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 32 + 24 * VG
205
+ # ASM-NEXT: .cfi_offset w29, -16
201
206
#
202
- # UNWINDINFO: DW_CFA_offset: reg29 -16
207
+ # UNWINDINFO: DW_CFA_def_cfa_expression: DW_OP_breg31 +0, DW_OP_consts +32, DW_OP_plus, DW_OP_consts +24, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
208
+ # UNWINDINFO-NEXT: DW_CFA_offset: reg29 -16
203
209
204
210
name : test_address_sve
205
211
frameInfo :
@@ -292,22 +298,24 @@ body: |
292
298
293
299
# CHECK: bb.0.entry:
294
300
# CHECK-NEXT: $sp = frame-setup STRXpre killed $[[SCRATCH:[a-z0-9]+]], $sp, -16
295
- # CHECK-NEXT: $fp = frame-setup ADDXri $sp, 0, 0
296
301
# CHECK-NEXT: $sp = frame-setup ADDVL_XXI $sp, -1
297
302
# CHECK-NEXT: $sp = frame-setup SUBXri $sp, 16, 0
298
303
# CHECK-COUNT-2: frame-setup CFI_INSTRUCTION
299
304
300
- # CHECK-NEXT: $x0 = LDRXui $fp, 2
305
+ # CHECK: $[[TMP:x[0-9]+]] = ADDVL_XXI $sp, 1
306
+ # CHECK-NEXT: $x0 = LDRXui killed $[[TMP]], 4
301
307
302
308
# CHECK-NEXT: $sp = frame-destroy ADDVL_XXI $sp, 1
303
309
# CHECK-NEXT: $sp = frame-destroy ADDXri $sp, 16, 0
304
310
# CHECK-NEXT: $sp, $[[SCRATCH]] = frame-destroy LDRXpost $sp, 16
305
311
# CHECK-NEXT: RET_ReallyLR
306
312
#
307
313
# ASM-LABEL: test_stack_arg_sve:
308
- # ASM: .cfi_offset w29, -16
314
+ # ASM: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x20, 0x22, 0x11, 0x08, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 32 + 8 * VG
315
+ # ASM-NEXT: .cfi_offset w29, -16
309
316
#
310
- # UNWINDINFO: DW_CFA_offset: reg29 -16
317
+ # UNWINDINFO: DW_CFA_def_cfa_expression: DW_OP_breg31 +0, DW_OP_consts +32, DW_OP_plus, DW_OP_consts +8, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
318
+ # UNWINDINFO-NEXT: DW_CFA_offset: reg29 -16
311
319
312
320
name : test_stack_arg_sve
313
321
fixedStack :
@@ -452,9 +460,11 @@ body: |
452
460
# CHECK: RET_ReallyLR
453
461
#
454
462
# ASM-LABEL: save_restore_pregs_sve:
455
- # ASM: .cfi_offset w29, -16
463
+ # ASM: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x30, 0x22, 0x11, 0x08, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 48 + 8 * VG
464
+ # ASM-NEXT: .cfi_offset w29, -16
456
465
#
457
- # UNWINDINFO: DW_CFA_offset: reg29 -16
466
+ # UNWINDINFO: DW_CFA_def_cfa_expression: DW_OP_breg31 +0, DW_OP_consts +48, DW_OP_plus, DW_OP_consts +8, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
467
+ # UNWINDINFO-NEXT: DW_CFA_offset: reg29 -16
458
468
name : save_restore_pregs_sve
459
469
stack :
460
470
- { id: 0, stack-id: default, size: 32, alignment: 16 }
@@ -470,7 +480,6 @@ body: |
470
480
...
471
481
# CHECK-LABEL: name: save_restore_zregs_sve
472
482
# CHECK: $sp = frame-setup STRXpre killed $fp, $sp, -16
473
- # CHECK-NEXT: $fp = frame-setup ADDXri $sp, 0, 0
474
483
# CHECK-NEXT: $sp = frame-setup ADDVL_XXI $sp, -3
475
484
# CHECK-NEXT: frame-setup STR_ZXI killed $z10, $sp, 0
476
485
# CHECK-NEXT: frame-setup STR_ZXI killed $z9, $sp, 1
@@ -487,11 +496,13 @@ body: |
487
496
# CHECK-NEXT: RET_ReallyLR
488
497
#
489
498
# ASM-LABEL: save_restore_zregs_sve:
490
- # ASM: .cfi_escape 0x10, 0x48, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x78, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d8 @ cfa - 16 - 8 * VG
499
+ # ASM: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x30, 0x22, 0x11, 0x18, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 48 + 24 * VG
500
+ # ASM-NEXT: .cfi_escape 0x10, 0x48, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x78, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d8 @ cfa - 16 - 8 * VG
491
501
# ASM-NEXT: .cfi_escape 0x10, 0x49, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x70, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d9 @ cfa - 16 - 16 * VG
492
502
# ASM-NEXT: .cfi_escape 0x10, 0x4a, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x68, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d10 @ cfa - 16 - 24 * VG
493
503
494
- # UNWINDINFO: DW_CFA_expression: reg72 DW_OP_consts -16, DW_OP_plus, DW_OP_consts -8, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
504
+ # UNWINDINFO: DW_CFA_def_cfa_expression: DW_OP_breg31 +0, DW_OP_consts +48, DW_OP_plus, DW_OP_consts +24, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
505
+ # UNWINDINFO-NEXT: DW_CFA_expression: reg72 DW_OP_consts -16, DW_OP_plus, DW_OP_consts -8, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
495
506
# UNWINDINFO-NEXT: DW_CFA_expression: reg73 DW_OP_consts -16, DW_OP_plus, DW_OP_consts -16, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
496
507
# UNWINDINFO-NEXT: DW_CFA_expression: reg74 DW_OP_consts -16, DW_OP_plus, DW_OP_consts -24, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
497
508
# UNWINDINFO-NEXT: DW_CFA_offset: reg29 -16
@@ -547,7 +558,8 @@ body: |
547
558
# CHECK: RET_ReallyLR
548
559
#
549
560
# ASM-LABEL: save_restore_sve:
550
- # ASM: .cfi_escape 0x10, 0x48, 0x0a, 0x11, 0x60, 0x22, 0x11, 0x78, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d8 @ cfa - 32 - 8 * VG
561
+ # ASM: .cfi_escape 0x0f, 0x0e, 0x8f, 0x00, 0x11, 0xc0, 0x00, 0x22, 0x11, 0x98, 0x01, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 64 + 152 * VG
562
+ # ASM-NEXT: .cfi_escape 0x10, 0x48, 0x0a, 0x11, 0x60, 0x22, 0x11, 0x78, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d8 @ cfa - 32 - 8 * VG
551
563
# ASM-NEXT: .cfi_escape 0x10, 0x49, 0x0a, 0x11, 0x60, 0x22, 0x11, 0x70, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d9 @ cfa - 32 - 16 * VG
552
564
# ASM-NEXT: .cfi_escape 0x10, 0x4a, 0x0a, 0x11, 0x60, 0x22, 0x11, 0x68, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d10 @ cfa - 32 - 24 * VG
553
565
# ASM-NEXT: .cfi_escape 0x10, 0x4b, 0x0a, 0x11, 0x60, 0x22, 0x11, 0x60, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d11 @ cfa - 32 - 32 * VG
@@ -560,7 +572,8 @@ body: |
560
572
# ASM-NEXT: .cfi_offset w21, -24
561
573
# ASM-NEXT: .cfi_offset w29, -32
562
574
#
563
- # UNWINDINFO: DW_CFA_expression: reg72 DW_OP_consts -32, DW_OP_plus, DW_OP_consts -8, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
575
+ # UNWINDINFO: DW_CFA_def_cfa_expression: DW_OP_breg31 +0, DW_OP_consts +64, DW_OP_plus, DW_OP_consts +152, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
576
+ # UNWINDINFO-NEXT: DW_CFA_expression: reg72 DW_OP_consts -32, DW_OP_plus, DW_OP_consts -8, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
564
577
# UNWINDINFO-NEXT: DW_CFA_expression: reg73 DW_OP_consts -32, DW_OP_plus, DW_OP_consts -16, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
565
578
# UNWINDINFO-NEXT: DW_CFA_expression: reg74 DW_OP_consts -32, DW_OP_plus, DW_OP_consts -24, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
566
579
# UNWINDINFO-NEXT: DW_CFA_expression: reg75 DW_OP_consts -32, DW_OP_plus, DW_OP_consts -32, DW_OP_bregx 0x2e +0, DW_OP_mul, DW_OP_plus
0 commit comments