1 2 3# TEST-OPTIONS: unwind_test_main.c unwind_test_ppc.s -arch ppc -fexceptions -faltivec 4 5 .data 6.globl _unwind_tester_list 7_unwind_tester_list: 8 .long _test_v24_v31 9 .long _test_r29_r31 10 .long _test_f26_f31 11 .long _test_ccr2_ccr4_ctr 12 .long 0 13 14 15 .text 16 .align 2 17 .globl _test_r29_r31 18_test_r29_r31: 19LFB11: 20 mflr r0 21 stmw r29,-12(r1) 22 stw r0,8(r1) 23 stwu r1,-80(r1) 24LCFI10: 25 # trash non-volatile registers 26 li r31,0 27 li r30,0 28 li r29,0 29 # force unwind that should restore non-volatile register 30 bl _uwind_to_main 31 addi r1,r1,80 32 lwz r0,8(r1) 33 lmw r29,-12(r1) 34 mtlr r0 35 blr 36LFE11: 37 38 39 .text 40 .align 2 41 .globl _test_ccr2_ccr4_ctr 42_test_ccr2_ccr4_ctr: 43LFB11a: 44 mflr r0 45 stw r0,8(r1) 46 mfcr r0 47 stw r0,-12(r1) 48 stw r0,-8(r1) 49 mfctr r0 50 stw r0,-4(r1) 51 stwu r1,-80(r1) 52LCFI10a: 53 # trash non-volatile registers 54 li r3,0 55 mtocrf 40,r3 56 mtctr r3 57 # force unwind that should restore non-volatile register 58 bl _uwind_to_main 59 addi r1,r1,80 60 lwz r0,-4(r1) 61 mtctr r0 62 lwz r0,-8(r1) 63 mtocrf 4,r0 64 lwz r0,-12(r1) 65 mtocrf 128,r0 66 lwz r0,8(r1) 67 mtlr r0 68 blr 69LFE11a: 70 71 72 .align 2 73 .globl _test_f26_f31 74_test_f26_f31: 75LFB4: 76 mflr r0 77LCFI43: 78 bl saveFP+48 ; save f26-f31 79LCFI44: 80 stwu r1,-144(r1) 81LCFI45: 82 # trash non-volatile registers 83 fsub f31,f31,f31 84 fsub f30,f30,f30 85 fsub f29,f29,f29 86 fsub f28,f28,f28 87 fsub f27,f27,f27 88 fsub f26,f26,f26 89 # force unwind that should restore non-volatile register 90 bl _uwind_to_main 91 lwz r0,8(r1) 92 mtlr r0 93 b restFP+48 ; restore f26-f31 94LFE4: 95 .align 2 96 97 98 .align 2 99 .globl _test_v24_v31 100_test_v24_v31: 101LFB3: 102 mflr r0 103 stw r0,8(r1) 104 stwu r1,-352(r1) 105LCFI2: 106 li r0,208 107 stvx v24,r1,r0 108 li r0,224 109 stvx v25,r1,r0 110 li r0,240 111 stvx v26,r1,r0 112 li r0,256 113 stvx v27,r1,r0 114 li r0,272 115 stvx v28,r1,r0 116 li r0,288 117 stvx v29,r1,r0 118 li r0,304 119 stvx v30,r1,r0 120 li r0,320 121 stvx v31,r1,r0 122LCFI11: 123 mfspr r0,256 124 stw r0,348(r1) 125 oris r0,r0,0x3ff0 126 ori r0,r0,255 127 mtspr 256,r0 128 129 # trash non-volatile registers 130 vor v24,v20,v20 131 vor v25,v20,v20 132 vor v26,v20,v20 133 vor v27,v20,v20 134 vor v28,v20,v20 135 vor v29,v20,v20 136 vor v30,v20,v20 137 vor v31,v20,v20 138 139 # force unwind that should restore non-volatile register 140 bl _uwind_to_main 141 142 li r0,208 143 lwz r12,348(r1) 144 lvx v24,r1,r0 145 li r0,224 146 lvx v25,r1,r0 147 li r0,240 148 lvx v26,r1,r0 149 li r0,256 150 lvx v27,r1,r0 151 li r0,272 152 lvx v28,r1,r0 153 li r0,288 154 lvx v29,r1,r0 155 li r0,304 156 lvx v30,r1,r0 157 li r0,320 158 lvx v31,r1,r0 159 mtspr 256,r12 160 addi r1,r1,352 161 lwz r0,8(r1) 162 mtlr r0 163 blr 164LFE3: 165 166 167 168 .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support 169EH_frame1: 170 .set L$set$0,LECIE1-LSCIE1 171 .long L$set$0 ; Length of Common Information Entry 172LSCIE1: 173 .long 0x0 ; CIE Identifier Tag 174 .byte 0x1 ; CIE Version 175 .ascii "zR\0" ; CIE Augmentation 176 .byte 0x1 ; uleb128 0x1; CIE Code Alignment Factor 177 .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor 178 .byte 0x41 ; CIE RA Column 179 .byte 0x1 ; uleb128 0x1; Augmentation size 180 .byte 0x10 ; FDE Encoding (pcrel) 181 .byte 0xc ; DW_CFA_def_cfa 182 .byte 0x1 ; uleb128 0x1 183 .byte 0x0 ; uleb128 0x0 184 .align 2 185LECIE1: 186 187 188 .globl _test_r29_r31.eh 189_test_r29_r31.eh: 190LSFDE9: 191 .set L$set$7,LEFDE9-LASFDE9 192 .long L$set$7 ; FDE Length 193LASFDE9: 194 .long LASFDE9-EH_frame1 ; FDE CIE offset 195 .long LFB11-. ; FDE initial location 196 .set L$set$8,LFE11-LFB11 197 .long L$set$8 ; FDE address range 198 .byte 0x0 ; uleb128 0x0; Augmentation size 199 .byte 0x4 ; DW_CFA_advance_loc4 200 .set L$set$9,LCFI10-LFB11 201 .long L$set$9 202 .byte 0xe ; DW_CFA_def_cfa_offset 203 .byte 0x50 ; uleb128 0x50 204 .byte 0x9f ; DW_CFA_offset, column 0x1f 205 .byte 0x1 ; uleb128 0x1 206 .byte 0x9e ; DW_CFA_offset, column 0x1e 207 .byte 0x2 ; uleb128 0x2 208 .byte 0x9d ; DW_CFA_offset, column 0x1d 209 .byte 0x3 ; uleb128 0x3 210 .byte 0x11 ; DW_CFA_offset_extended_sf 211 .byte 0x41 ; uleb128 0x41 212 .byte 0x7e ; sleb128 -2 213 .align 2 214LEFDE9: 215 216 .globl _test_ccr2_ccr4_ctr.eh 217_test_ccr2_ccr4_ctr.eh: 218LSFDE9a: 219 .set L$set$7,LEFDE9a-LASFDE9a 220 .long L$set$7 ; FDE Length 221LASFDE9a: 222 .long LASFDE9a-EH_frame1 ; FDE CIE offset 223 .long LFB11a-. ; FDE initial location 224 .set L$set$8,LFE11a-LFB11a 225 .long L$set$8 ; FDE address range 226 .byte 0x0 ; uleb128 0x0; Augmentation size 227 .byte 0x4 ; DW_CFA_advance_loc4 228 .set L$set$9,LCFI10a-LFB11a 229 .long L$set$9 230 .byte 0xe ; DW_CFA_def_cfa_offset 231 .byte 0x50 ; uleb128 0x50 232 .byte 0x11 ; DW_CFA_offset_extended_sf 233 .byte 0x42 ; uleb128 0x42 234 .byte 0x01 ; sleb128 1 235 .byte 0x11 ; DW_CFA_offset_extended_sf 236 .byte 0x48 ; uleb128 0x48 237 .byte 0x02 ; sleb128 2 238 .byte 0x11 ; DW_CFA_offset_extended_sf 239 .byte 0x46 ; uleb128 0x46 240 .byte 0x03 ; sleb128 3 241 .byte 0x11 ; DW_CFA_offset_extended_sf 242 .byte 0x41 ; uleb128 0x41 243 .byte 0x7e ; sleb128 -2 244 .align 2 245LEFDE9a: 246 247 248 249 .globl _test_f26_f31 250_test_f26_f31.eh: 251LSFDE29: 252 .set L$set$34,LEFDE29-LASFDE29 253 .long L$set$34 ; FDE Length 254LASFDE29: 255 .long LASFDE29-EH_frame1 ; FDE CIE offset 256 .long LFB4-. ; FDE initial location 257 .set L$set$35,LFE4-LFB4 258 .long L$set$35 ; FDE address range 259 .byte 0x0 ; uleb128 0x0; Augmentation size 260 .byte 0x4 ; DW_CFA_advance_loc4 261 .set L$set$36,LCFI43-LFB4 262 .long L$set$36 263 .byte 0x9 ; DW_CFA_register 264 .byte 0x41 ; uleb128 0x41 265 .byte 0x0 ; uleb128 0x0 266 .byte 0x4 ; DW_CFA_advance_loc4 267 .set L$set$37,LCFI45-LCFI43 268 .long L$set$37 269 .byte 0xe ; DW_CFA_def_cfa_offset 270 .byte 0x90,0x1 ; uleb128 0x90 271 .byte 0x11 ; DW_CFA_offset_extended_sf 272 .byte 0x41 ; uleb128 0x41 273 .byte 0x7e ; sleb128 -2 274 .byte 0xbf ; DW_CFA_offset, column 0x3f 275 .byte 0x2 ; uleb128 0x2 276 .byte 0xbe ; DW_CFA_offset, column 0x3e 277 .byte 0x4 ; uleb128 0x4 278 .byte 0xbd ; DW_CFA_offset, column 0x3d 279 .byte 0x6 ; uleb128 0x6 280 .byte 0xbc ; DW_CFA_offset, column 0x3c 281 .byte 0x8 ; uleb128 0x8 282 .byte 0xbb ; DW_CFA_offset, column 0x3b 283 .byte 0xa ; uleb128 0xa 284 .byte 0xba ; DW_CFA_offset, column 0x3a 285 .byte 0xc ; uleb128 0xc 286 .align 2 287LEFDE29: 288 289 290 .globl _test_v24_v31.eh 291_test_v24_v31.eh: 292LSFDE3: 293 .set L$set$1,LEFDE3-LASFDE3 294 .long L$set$1 ; FDE Length 295LASFDE3: 296 .long LASFDE3-EH_frame1 ; FDE CIE offset 297 .long LFB3-. ; FDE initial location 298 .set L$set$2,LFE3-LFB3 299 .long L$set$2 ; FDE address range 300 .byte 0x0 ; uleb128 0x0; Augmentation size 301 .byte 0x4 ; DW_CFA_advance_loc4 302 .set L$set$3,LCFI2-LFB3 303 .long L$set$3 304 .byte 0xe ; DW_CFA_def_cfa_offset 305 .byte 0xe0,0x2 ; uleb128 0x160 306 .byte 0x4 ; DW_CFA_advance_loc4 307 .set L$set$4,LCFI11-LCFI2 308 .long L$set$4 309 .byte 0x5 ; DW_CFA_offset_extended 310 .byte 0x6c ; uleb128 0x6c 311 .byte 0x8 ; uleb128 0x8 312 .byte 0x5 ; DW_CFA_offset_extended 313 .byte 0x6b ; uleb128 0x6b 314 .byte 0xc ; uleb128 0xc 315 .byte 0x5 ; DW_CFA_offset_extended 316 .byte 0x6a ; uleb128 0x6a 317 .byte 0x10 ; uleb128 0x10 318 .byte 0x5 ; DW_CFA_offset_extended 319 .byte 0x69 ; uleb128 0x69 320 .byte 0x14 ; uleb128 0x14 321 .byte 0x5 ; DW_CFA_offset_extended 322 .byte 0x68 ; uleb128 0x68 323 .byte 0x18 ; uleb128 0x18 324 .byte 0x5 ; DW_CFA_offset_extended 325 .byte 0x67 ; uleb128 0x67 326 .byte 0x1c ; uleb128 0x1c 327 .byte 0x5 ; DW_CFA_offset_extended 328 .byte 0x66 ; uleb128 0x66 329 .byte 0x20 ; uleb128 0x20 330 .byte 0x5 ; DW_CFA_offset_extended 331 .byte 0x65 ; uleb128 0x65 332 .byte 0x24 ; uleb128 0x24 333 .byte 0x11 ; DW_CFA_offset_extended_sf 334 .byte 0x41 ; uleb128 0x41 335 .byte 0x7e ; sleb128 -2 336 .align 2 337LEFDE3: 338 339 340