1# RUN: llc -o - %s -mtriple=aarch64-windows -start-after=prologepilog \ 2# RUN: -filetype=obj | llvm-readobj --unwind - | FileCheck %s 3# Test that the pre/post increment save of a flating point register is correct. 4 5# CHECK: ExceptionData { 6# CHECK-NEXT: FunctionLength: 144 7# CHECK-NEXT: Version: 0 8# CHECK-NEXT: ExceptionData: No 9# CHECK-NEXT: EpiloguePacked: No 10# CHECK-NEXT: EpilogueScopes: 1 11# CHECK-NEXT: ByteCodeLength: 40 12# CHECK-NEXT: Prologue [ 13# CHECK-NEXT: 0xc80e ; stp x19, x20, [sp, #112] 14# CHECK-NEXT: 0xc88c ; stp x21, x22, [sp, #96] 15# CHECK-NEXT: 0xc90a ; stp x23, x24, [sp, #80] 16# CHECK-NEXT: 0xc988 ; stp x25, x26, [sp, #64] 17# CHECK-NEXT: 0xca06 ; stp x27, x28, [sp, #48] 18# CHECK-NEXT: 0xdc45 ; str d9, [sp, #40] 19# CHECK-NEXT: 0xdc04 ; str d8, [sp, #32] 20# CHECK-NEXT: 0xd882 ; stp d10, d11, [sp, #16] 21# CHECK-NEXT: 0xde8f ; str d12, [sp, #-128]! 22# CHECK-NEXT: 0xe4 ; end 23# CHECK-NEXT: ] 24# CHECK-NEXT: EpilogueScopes [ 25# CHECK-NEXT: EpilogueScope { 26# CHECK-NEXT: StartOffset: 26 27# CHECK-NEXT: EpilogueStartIndex: 19 28# CHECK-NEXT: Opcodes [ 29# CHECK-NEXT: 0xc80e ; ldp x19, x20, [sp, #112] 30# CHECK-NEXT: 0xc88c ; ldp x21, x22, [sp, #96] 31# CHECK-NEXT: 0xc90a ; ldp x23, x24, [sp, #80] 32# CHECK-NEXT: 0xc988 ; ldp x25, x26, [sp, #64] 33# CHECK-NEXT: 0xca06 ; ldp x27, x28, [sp, #48] 34# CHECK-NEXT: 0xdc04 ; ldr d8, [sp, #32] 35# CHECK-NEXT: 0xdc45 ; ldr d9, [sp, #40] 36# CHECK-NEXT: 0xd882 ; ldp d10, d11, [sp, #16] 37# CHECK-NEXT: 0xde8f ; ldr d12, [sp], #128 38# CHECK-NEXT: 0xe4 ; end 39# CHECK-NEXT: ] 40# CHECK-NEXT: } 41# CHECK-NEXT: ] 42# CHECK-NEXT: } 43... 44--- 45name: test 46alignment: 4 47exposesReturnsTwice: false 48legalized: false 49regBankSelected: false 50selected: false 51failedISel: false 52tracksRegLiveness: true 53hasWinCFI: true 54registers: 55liveins: 56 - { reg: '$w0', virtual-reg: '' } 57frameInfo: 58 isFrameAddressTaken: false 59 isReturnAddressTaken: false 60 hasStackMap: false 61 hasPatchPoint: false 62 stackSize: 128 63 offsetAdjustment: 0 64 maxAlignment: 16 65 adjustsStack: false 66 hasCalls: false 67 stackProtector: '' 68 maxCallFrameSize: 0 69 hasOpaqueSPAdjustment: true 70 hasVAStart: false 71 hasMustTailInVarArgFunc: false 72 localFrameSize: 0 73 savePoint: '' 74 restorePoint: '' 75fixedStack: 76stack: 77 - { id: 0, name: '', type: spill-slot, offset: -8, size: 8, alignment: 8, 78 stack-id: default, callee-saved-register: '$x19', callee-saved-restored: true, 79 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 80 - { id: 1, name: '', type: spill-slot, offset: -16, size: 8, alignment: 8, 81 stack-id: default, callee-saved-register: '$x20', callee-saved-restored: true, 82 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 83 - { id: 2, name: '', type: spill-slot, offset: -24, size: 8, alignment: 8, 84 stack-id: default, callee-saved-register: '$x21', callee-saved-restored: true, 85 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 86 - { id: 3, name: '', type: spill-slot, offset: -32, size: 8, alignment: 8, 87 stack-id: default, callee-saved-register: '$x22', callee-saved-restored: true, 88 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 89 - { id: 4, name: '', type: spill-slot, offset: -40, size: 8, alignment: 8, 90 stack-id: default, callee-saved-register: '$x23', callee-saved-restored: true, 91 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 92 - { id: 5, name: '', type: spill-slot, offset: -48, size: 8, alignment: 8, 93 stack-id: default, callee-saved-register: '$x24', callee-saved-restored: true, 94 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 95 - { id: 6, name: '', type: spill-slot, offset: -56, size: 8, alignment: 8, 96 stack-id: default, callee-saved-register: '$x25', callee-saved-restored: true, 97 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 98 - { id: 7, name: '', type: spill-slot, offset: -64, size: 8, alignment: 8, 99 stack-id: default, callee-saved-register: '$x26', callee-saved-restored: true, 100 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 101 - { id: 8, name: '', type: spill-slot, offset: -72, size: 8, alignment: 8, 102 stack-id: default, callee-saved-register: '$x27', callee-saved-restored: true, 103 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 104 - { id: 9, name: '', type: spill-slot, offset: -80, size: 8, alignment: 8, 105 stack-id: default, callee-saved-register: '$x28', callee-saved-restored: true, 106 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 107 - { id: 10, name: '', type: spill-slot, offset: -88, size: 8, alignment: 8, 108 stack-id: default, callee-saved-register: '$d8', callee-saved-restored: true, 109 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 110 - { id: 11, name: '', type: spill-slot, offset: -96, size: 8, alignment: 8, 111 stack-id: default, callee-saved-register: '$d9', callee-saved-restored: true, 112 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 113 - { id: 12, name: '', type: spill-slot, offset: -104, size: 8, alignment: 8, 114 stack-id: default, callee-saved-register: '$d10', callee-saved-restored: true, 115 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 116 - { id: 13, name: '', type: spill-slot, offset: -112, size: 8, alignment: 8, 117 stack-id: default, callee-saved-register: '$d11', callee-saved-restored: true, 118 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 119 - { id: 14, name: '', type: spill-slot, offset: -128, size: 8, alignment: 16, 120 stack-id: default, callee-saved-register: '$d12', callee-saved-restored: true, 121 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 122constants: 123body: | 124 bb.0.entry: 125 liveins: $x0, $x1, $d0, $d1, $d8, $d9, $d10, $d11, $d12, $x19, $x20, $x21, $x22, $x23, $x24, $x25, $x26, $x27, $x28 126 127 early-clobber $sp = frame-setup STRDpre killed $d12, $sp, -128 :: (store 8 into %stack.14) 128 frame-setup SEH_SaveFReg_X 12, -128 129 frame-setup STPDi killed $d10, killed $d11, $sp, 2 :: (store 8 into %stack.12), (store 8 into %stack.13) 130 frame-setup SEH_SaveFRegP 10, 11, 16 131 frame-setup STRDui killed $d8, $sp, 4 :: (store 8 into %stack.10) 132 frame-setup SEH_SaveFReg 8, 32 133 frame-setup STRDui killed $d9, $sp, 5 :: (store 8 into %stack.11) 134 frame-setup SEH_SaveFReg 9, 40 135 frame-setup STPXi killed $x27, killed $x28, $sp, 6 :: (store 8 into %stack.8), (store 8 into %stack.9) 136 frame-setup SEH_SaveRegP 27, 28, 48 137 frame-setup STPXi killed $x25, killed $x26, $sp, 8 :: (store 8 into %stack.6), (store 8 into %stack.7) 138 frame-setup SEH_SaveRegP 25, 26, 64 139 frame-setup STPXi killed $x23, killed $x24, $sp, 10 :: (store 8 into %stack.4), (store 8 into %stack.5) 140 frame-setup SEH_SaveRegP 23, 24, 80 141 frame-setup STPXi killed $x21, killed $x22, $sp, 12 :: (store 8 into %stack.2), (store 8 into %stack.3) 142 frame-setup SEH_SaveRegP 21, 22, 96 143 frame-setup STPXi killed $x19, killed $x20, $sp, 14 :: (store 8 into %stack.0), (store 8 into %stack.1) 144 frame-setup SEH_SaveRegP 19, 20, 112 145 frame-setup SEH_PrologEnd 146 $x19 = ADDXrr $x0, killed $x1 147 $d8 = FADDDrr killed $d0, $d1 148 $d9 = FADDDrr $d8, $d1 149 $d10 = FADDDrr $d9, $d8 150 $d11 = FADDDrr killed $d9, $d10 151 $d12 = FADDDrr killed $d10, killed $d11 152 $x20 = ADDXrr $x19, killed $x0 153 $x21 = ADDXrr $x20, killed $x19 154 $x22 = ADDXrr $x21, killed $x20 155 $x23 = ADDXrr $x22, killed $x21 156 $x24 = ADDXrr $x23, killed $x22 157 $x25 = ADDXrr $x24, killed $x23 158 $x26 = ADDXrr $x25, killed $x24 159 $x27 = ADDXrr $x26, killed $x25 160 $x28 = ADDXrr $x27, killed $x26 161 $x0 = COPY $d12 162 $x0 = ADDXrr $x0, killed $x28 163 frame-destroy SEH_EpilogStart 164 $x19, $x20 = frame-destroy LDPXi $sp, 14 :: (load 8 from %stack.0), (load 8 from %stack.1) 165 frame-destroy SEH_SaveRegP 19, 20, 112 166 $x21, $x22 = frame-destroy LDPXi $sp, 12 :: (load 8 from %stack.2), (load 8 from %stack.3) 167 frame-destroy SEH_SaveRegP 21, 22, 96 168 $x23, $x24 = frame-destroy LDPXi $sp, 10 :: (load 8 from %stack.4), (load 8 from %stack.5) 169 frame-destroy SEH_SaveRegP 23, 24, 80 170 $x25, $x26 = frame-destroy LDPXi $sp, 8 :: (load 8 from %stack.6), (load 8 from %stack.7) 171 frame-destroy SEH_SaveRegP 25, 26, 64 172 $x27, $x28 = frame-destroy LDPXi $sp, 6 :: (load 8 from %stack.8), (load 8 from %stack.9) 173 frame-destroy SEH_SaveRegP 27, 28, 48 174 $d8 = frame-destroy LDRDui $sp, 4 :: (load 8 from %stack.10) 175 frame-destroy SEH_SaveFReg 8, 32 176 $d9 = frame-destroy LDRDui $sp, 5 :: (load 8 from %stack.11) 177 frame-destroy SEH_SaveFReg 9, 40 178 $d10, $d11 = frame-destroy LDPDi $sp, 2 :: (load 8 from %stack.12), (load 8 from %stack.13) 179 frame-destroy SEH_SaveFRegP 10, 11, 16 180 early-clobber $sp, $d12 = frame-destroy LDRDpost $sp, 128 :: (load 8 from %stack.14) 181 frame-destroy SEH_SaveFReg_X 12, -128 182 frame-destroy SEH_EpilogEnd 183 RET_ReallyLR implicit $x0 184 185... 186