| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // Test that the exception object is passed correctly from the personality |
| 10 | // to the landing pad even when there are wrappers around runtime function |
| 11 | // __xlc_exception_handle. This test is only for the legacy AIX xlclang |
| 12 | // compiler generated code. The test source consists of two C++ source files |
| 13 | // t1.cpp and t2.cpp which are compiled into assembly code by the legacy AIX |
| 14 | // xlclang++ compiler included in this file. This file tests for the 64-bit |
| 15 | // mode. |
| 16 | |
| 17 | # REQUIRES: target=powerpc64-ibm-aix{{.*}} |
| 18 | # UNSUPPORTED: no-exceptions |
| 19 | |
| 20 | // RUN: %{cxx} -c %s -o %t1_64.o -DT1_CPP_CODE %{flags} %{compile_flags} |
| 21 | // RUN: %{cxx} -c %s -o %t2_64.o -DT2_CPP_CODE %{flags} %{compile_flags} |
| 22 | // RUN: %{cxx} -o %t_64.exe %t1_64.o %t2_64.o %{flags} %{link_flags} |
| 23 | // RUN: %{exec} %t_64.exe |
| 24 | |
| 25 | #if defined(T1_CPP_CODE) |
| 26 | # |
| 27 | # This portion of assembly code is generated by IBM legacy xlclang++ compiler |
| 28 | # from the following C++ source file for 64-bit mode. |
| 29 | # |
| 30 | # t.cpp: |
| 31 | # |
| 32 | #extern "C" int printf(const char *, ...); |
| 33 | # |
| 34 | #extern "C" unsigned int * __xlc_exception_handle() __attribute__((weak, alias("wrap__xlc_exception_handle"))); |
| 35 | # |
| 36 | #void barf() __attribute__((noinline)); |
| 37 | # |
| 38 | #int main(void) { |
| 39 | # try { |
| 40 | # barf(); |
| 41 | # } catch(int) { |
| 42 | # printf("caught int\n"); |
| 43 | # } |
| 44 | # return 0; |
| 45 | #} |
| 46 | # |
| 47 | #void barf() { throw 42; } |
| 48 | |
| 49 | .set r0,0; .set SP,1; .set RTOC,2; .set r3,3; .set r4,4 |
| 50 | .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 |
| 51 | .set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 |
| 52 | .set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 |
| 53 | .set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 |
| 54 | .set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 |
| 55 | .set r30,30; .set r31,31 |
| 56 | .set fp0,0; .set fp1,1; .set fp2,2; .set fp3,3; .set fp4,4 |
| 57 | .set fp5,5; .set fp6,6; .set fp7,7; .set fp8,8; .set fp9,9 |
| 58 | .set fp10,10; .set fp11,11; .set fp12,12; .set fp13,13; .set fp14,14 |
| 59 | .set fp15,15; .set fp16,16; .set fp17,17; .set fp18,18; .set fp19,19 |
| 60 | .set fp20,20; .set fp21,21; .set fp22,22; .set fp23,23; .set fp24,24 |
| 61 | .set fp25,25; .set fp26,26; .set fp27,27; .set fp28,28; .set fp29,29 |
| 62 | .set fp30,30; .set fp31,31 |
| 63 | .set v0,0; .set v1,1; .set v2,2; .set v3,3; .set v4,4 |
| 64 | .set v5,5; .set v6,6; .set v7,7; .set v8,8; .set v9,9 |
| 65 | .set v10,10; .set v11,11; .set v12,12; .set v13,13; .set v14,14 |
| 66 | .set v15,15; .set v16,16; .set v17,17; .set v18,18; .set v19,19 |
| 67 | .set v20,20; .set v21,21; .set v22,22; .set v23,23; .set v24,24 |
| 68 | .set v25,25; .set v26,26; .set v27,27; .set v28,28; .set v29,29 |
| 69 | .set v30,30; .set v31,31 |
| 70 | .set x0,0; .set x1,1; .set x2,2; .set x3,3; .set x4,4 |
| 71 | .set x5,5; .set x6,6; .set x7,7; .set x8,8; .set x9,9 |
| 72 | .set x10,10; .set x11,11; .set x12,12; .set x13,13; .set x14,14 |
| 73 | .set x15,15; .set x16,16; .set x17,17; .set x18,18; .set x19,19 |
| 74 | .set x20,20; .set x21,21; .set x22,22; .set x23,23; .set x24,24 |
| 75 | .set x25,25; .set x26,26; .set x27,27; .set x28,28; .set x29,29 |
| 76 | .set x30,30; .set x31,31; .set x32,32; .set x33,33; .set x34,34 |
| 77 | .set x35,35; .set x36,36; .set x37,37; .set x38,38; .set x39,39 |
| 78 | .set x40,40; .set x41,41; .set x42,42; .set x43,43; .set x44,44 |
| 79 | .set x45,45; .set x46,46; .set x47,47; .set x48,48; .set x49,49 |
| 80 | .set x50,50; .set x51,51; .set x52,52; .set x53,53; .set x54,54 |
| 81 | .set x55,55; .set x56,56; .set x57,57; .set x58,58; .set x59,59 |
| 82 | .set x60,60; .set x61,61; .set x62,62; .set x63,63 |
| 83 | .set q0,0; .set q1,1; .set q2,2; .set q3,3; .set q4,4 |
| 84 | .set q5,5; .set q6,6; .set q7,7; .set q8,8; .set q9,9 |
| 85 | .set q10,10; .set q11,11; .set q12,12; .set q13,13; .set q14,14 |
| 86 | .set q15,15; .set q16,16; .set q17,17; .set q18,18; .set q19,19 |
| 87 | .set q20,20; .set q21,21; .set q22,22; .set q23,23; .set q24,24 |
| 88 | .set q25,25; .set q26,26; .set q27,27; .set q28,28; .set q29,29 |
| 89 | .set q30,30; .set q31,31 |
| 90 | .set MQ,0; .set XER,1; .set DSCR,3; .set FROM_RTCU,4; .set FROM_RTCL,5 |
| 91 | .set FROM_DEC,6; .set LR,8; .set CTR,9; .set AMR,13; .set TID,17; .set DSISR,18 |
| 92 | .set DAR,19; .set TO_RTCU,20; .set TO_RTCL,21; .set TO_DEC,22; .set SDR_0,24 |
| 93 | .set SDR_1,25; .set SRR_0,26; .set SRR_1,27 |
| 94 | .set BO_dCTR_NZERO_AND_NOT,0; .set BO_dCTR_NZERO_AND_NOT_1,1 |
| 95 | .set BO_dCTR_ZERO_AND_NOT,2; .set BO_dCTR_ZERO_AND_NOT_1,3 |
| 96 | .set BO_IF_NOT,4; .set BO_IF_NOT_1,5; .set BO_IF_NOT_2,6 |
| 97 | .set BO_IF_NOT_3,7; .set BO_dCTR_NZERO_AND,8; .set BO_dCTR_NZERO_AND_1,9 |
| 98 | .set BO_dCTR_ZERO_AND,10; .set BO_dCTR_ZERO_AND_1,11; .set BO_IF,12 |
| 99 | .set BO_IF_1,13; .set BO_IF_2,14; .set BO_IF_3,15; .set BO_dCTR_NZERO,16 |
| 100 | .set BO_dCTR_NZERO_1,17; .set BO_dCTR_ZERO,18; .set BO_dCTR_ZERO_1,19 |
| 101 | .set BO_ALWAYS,20; .set BO_ALWAYS_1,21; .set BO_ALWAYS_2,22 |
| 102 | .set BO_ALWAYS_3,23; .set BO_dCTR_NZERO_8,24; .set BO_dCTR_NZERO_9,25 |
| 103 | .set BO_dCTR_ZERO_8,26; .set BO_dCTR_ZERO_9,27; .set BO_ALWAYS_8,28 |
| 104 | .set BO_ALWAYS_9,29; .set BO_ALWAYS_10,30; .set BO_ALWAYS_11,31 |
| 105 | .set CR0_LT,0; .set CR0_GT,1; .set CR0_EQ,2; .set CR0_SO,3 |
| 106 | .set CR1_FX,4; .set CR1_FEX,5; .set CR1_VX,6; .set CR1_OX,7 |
| 107 | .set CR2_LT,8; .set CR2_GT,9; .set CR2_EQ,10; .set CR2_SO,11 |
| 108 | .set CR3_LT,12; .set CR3_GT,13; .set CR3_EQ,14; .set CR3_SO,15 |
| 109 | .set CR4_LT,16; .set CR4_GT,17; .set CR4_EQ,18; .set CR4_SO,19 |
| 110 | .set CR5_LT,20; .set CR5_GT,21; .set CR5_EQ,22; .set CR5_SO,23 |
| 111 | .set CR6_LT,24; .set CR6_GT,25; .set CR6_EQ,26; .set CR6_SO,27 |
| 112 | .set CR7_LT,28; .set CR7_GT,29; .set CR7_EQ,30; .set CR7_SO,31 |
| 113 | .set TO_LT,16; .set TO_GT,8; .set TO_EQ,4; .set TO_LLT,2; .set TO_LGT,1 |
| 114 | |
| 115 | .rename H.4.NO_SYMBOL{PR},"" |
| 116 | .rename H.10..__4,".__4" |
| 117 | .rename H.12..__8,".__8" |
| 118 | .rename H.14..__3,".__3" |
| 119 | .rename H.18.NO_SYMBOL{TC},"" |
| 120 | .rename H.20.NO_SYMBOL{RO},"" |
| 121 | .rename E.22.__STATIC{RW},"_$STATIC" |
| 122 | .rename H.24.__STATIC{TC},"_$STATIC" |
| 123 | .rename H.28.__4{TC},"__4" |
| 124 | .rename H.32.__8{TC},"__8" |
| 125 | .rename H.36.__3{TC},"__3" |
| 126 | .rename H.40._Z4barfv{TC},"_Z4barfv" |
| 127 | .rename H.44._ZTIi{TC},"_ZTIi" |
| 128 | .rename H.48.main{TC},"main" |
| 129 | |
| 130 | .lglobl H.4.NO_SYMBOL{PR} |
| 131 | .globl ._Z4barfv |
| 132 | .globl .main |
| 133 | .lglobl H.10..__4 |
| 134 | .lglobl H.12..__8 |
| 135 | .lglobl H.14..__3 |
| 136 | .lglobl H.20.NO_SYMBOL{RO} |
| 137 | .lglobl E.22.__STATIC{RW} |
| 138 | .lglobl __4{DS} |
| 139 | .lglobl __8{DS} |
| 140 | .lglobl __3{DS} |
| 141 | .globl _Z4barfv{DS} |
| 142 | .extern _ZTIi{UA} |
| 143 | .globl main{DS} |
| 144 | .extern .__cxa_allocate_exception{PR} |
| 145 | .extern .__cxa_throw{PR} |
| 146 | .extern .wrap__xlc_exception_handle{PR} |
| 147 | .extern .__xlc_catch_matchv2{PR} |
| 148 | .extern .__cxa_begin_catch{PR} |
| 149 | .extern .printf{PR} |
| 150 | .extern .__cxa_end_catch{PR} |
| 151 | .extern ._Unwind_Resume{PR} |
| 152 | .extern .__cxa_rethrow{PR} |
| 153 | .extern ._ZSt9terminatev{PR} |
| 154 | |
| 155 | |
| 156 | # .text section |
| 157 | .file "t.cpp" ,"Mon Jan 30 13:42:03 2023 " ,"IBM XL C/C++ for AIX, Version 16.1.0.13" |
| 158 | .machine "ppc64" |
| 159 | |
| 160 | |
| 161 | .csect H.4.NO_SYMBOL{PR}, 7 |
| 162 | ._Z4barfv: # 0x0000000000000000 (H.4.NO_SYMBOL) |
| 163 | mfspr r0,LR |
| 164 | stdu SP,-128(SP) |
| 165 | std r0,144(SP) |
| 166 | addi r3,r0,4 |
| 167 | bl .__cxa_allocate_exception{PR} |
| 168 | ori r0,r0,0x0000 |
| 169 | ori r4,r3,0x0000 |
| 170 | std r4,112(SP) |
| 171 | addi r3,r0,42 |
| 172 | stw r3,0(r4) |
| 173 | ld r3,112(SP) |
| 174 | ld r4,T.44._ZTIi(RTOC) |
| 175 | addi r5,r0,0 |
| 176 | bl .__cxa_throw{PR} |
| 177 | ori r0,r0,0x0000 |
| 178 | ld r0,144(SP) |
| 179 | mtspr LR,r0 |
| 180 | addi SP,SP,128 |
| 181 | bclr BO_ALWAYS,CR0_LT |
| 182 | .long 0x00000000 |
| 183 | # traceback table |
| 184 | .byte 0x00 # VERSION=0 |
| 185 | .byte 0x09 # LANG=TB_CPLUSPLUS |
| 186 | .byte 0x20 # IS_GL=0,IS_EPROL=0,HAS_TBOFF=1 |
| 187 | # INT_PROC=0,HAS_CTL=0,TOCLESS=0 |
| 188 | # FP_PRESENT=0,LOG_ABORT=0 |
| 189 | .byte 0x41 # INT_HNDL=0,NAME_PRESENT=1 |
| 190 | # USES_ALLOCA=0,CL_DIS_INV=WALK_ONCOND |
| 191 | # SAVES_CR=0,SAVES_LR=1 |
| 192 | .byte 0x80 # STORES_BC=1,FPR_SAVED=0 |
| 193 | .byte 0x00 # GPR_SAVED=0 |
| 194 | .byte 0x00 # FIXEDPARMS=0 |
| 195 | .byte 0x01 # FLOATPARMS=0,PARMSONSTK=1 |
| 196 | .long 0x0000004c # TB_OFFSET |
| 197 | .short 8 # NAME_LEN |
| 198 | .byte "_Z4barfv" # NAME |
| 199 | |
| 200 | .byte 0 # padding |
| 201 | .byte 0 # padding |
| 202 | # End of traceback table |
| 203 | .long 0x00000000 # "\0\0\0\0" |
| 204 | .long 0x00000000 # "\0\0\0\0" |
| 205 | .long 0x00000000 # "\0\0\0\0" |
| 206 | .long 0x00000000 # "\0\0\0\0" |
| 207 | .long 0x00000000 # "\0\0\0\0" |
| 208 | .long 0x00000000 # "\0\0\0\0" |
| 209 | .main: # 0x0000000000000080 (H.4.NO_SYMBOL+0x080) |
| 210 | mfspr r0,LR |
| 211 | std r31,-8(SP) |
| 212 | std r30,-16(SP) |
| 213 | std r29,-24(SP) |
| 214 | std r0,16(SP) |
| 215 | stdu SP,-208(SP) |
| 216 | ori r30,SP,0x0000 |
| 217 | ld r31,T.24.__STATIC(RTOC) |
| 218 | ld r29,T.18.NO_SYMBOL(RTOC) |
| 219 | addi r3,r0,0 |
| 220 | stw r3,112(r30) |
| 221 | ori r4,r31,0x0000 |
| 222 | std r4,120(r30) |
| 223 | std r3,128(r30) |
| 224 | stw r3,136(r30) |
| 225 | addi r3,r0,1 |
| 226 | stb r3,115(r30) |
| 227 | bl ._Z4barfv |
| 228 | addi r3,r0,0 |
| 229 | stb r3,115(r30) |
| 230 | b __L188 |
| 231 | __Ld4: # 0x00000000000000d4 (H.4.NO_SYMBOL+0x0d4) |
| 232 | ld r31,T.24.__STATIC(RTOC) |
| 233 | ld r29,T.18.NO_SYMBOL(RTOC) |
| 234 | addi r3,r0,2 |
| 235 | stb r3,115(r30) |
| 236 | bl .wrap__xlc_exception_handle{PR} |
| 237 | ori r0,r0,0x0000 |
| 238 | std r3,144(r30) |
| 239 | ld r4,T.44._ZTIi(RTOC) |
| 240 | addi r5,r30,152 |
| 241 | bl .__xlc_catch_matchv2{PR} |
| 242 | ori r0,r0,0x0000 |
| 243 | cmpli 0,0,r3,0x0000 |
| 244 | bc BO_IF_NOT,CR0_EQ,__L10c |
| 245 | b __L164 |
| 246 | __L10c: # 0x000000000000010c (H.4.NO_SYMBOL+0x010c) |
| 247 | ld r3,144(r30) |
| 248 | bl .__cxa_begin_catch{PR} |
| 249 | ori r0,r0,0x0000 |
| 250 | ori r3,r29,0x0000 |
| 251 | bl .printf{PR} |
| 252 | ori r0,r0,0x0000 |
| 253 | bl .__cxa_end_catch{PR} |
| 254 | ori r0,r0,0x0000 |
| 255 | addi r3,r0,0 |
| 256 | stb r3,115(r30) |
| 257 | b __L188 |
| 258 | __L138: # 0x0000000000000138 (H.4.NO_SYMBOL+0x0138) |
| 259 | ld r31,T.24.__STATIC(RTOC) |
| 260 | ld r29,T.18.NO_SYMBOL(RTOC) |
| 261 | bl .__cxa_end_catch{PR} |
| 262 | ori r0,r0,0x0000 |
| 263 | addi r3,r0,0 |
| 264 | stb r3,115(r30) |
| 265 | bl .wrap__xlc_exception_handle{PR} |
| 266 | ori r0,r0,0x0000 |
| 267 | std r3,160(r30) |
| 268 | bl ._Unwind_Resume{PR} |
| 269 | ori r0,r0,0x0000 |
| 270 | __L164: # 0x0000000000000164 (H.4.NO_SYMBOL+0x0164) |
| 271 | addi r3,r0,2 |
| 272 | stb r3,115(r30) |
| 273 | bl .wrap__xlc_exception_handle{PR} |
| 274 | ori r0,r0,0x0000 |
| 275 | std r3,168(r30) |
| 276 | bl .__cxa_begin_catch{PR} |
| 277 | ori r0,r0,0x0000 |
| 278 | bl .__cxa_rethrow{PR} |
| 279 | ori r0,r0,0x0000 |
| 280 | __L188: # 0x0000000000000188 (H.4.NO_SYMBOL+0x0188) |
| 281 | addi r3,r0,0 |
| 282 | b __L1b8 |
| 283 | __L190: # 0x0000000000000190 (H.4.NO_SYMBOL+0x0190) |
| 284 | bl .wrap__xlc_exception_handle{PR} |
| 285 | ori r0,r0,0x0000 |
| 286 | std r3,176(r30) |
| 287 | bl ._Unwind_Resume{PR} |
| 288 | ori r0,r0,0x0000 |
| 289 | __L1a4: # 0x00000000000001a4 (H.4.NO_SYMBOL+0x01a4) |
| 290 | ld r31,T.24.__STATIC(RTOC) |
| 291 | ld r29,T.18.NO_SYMBOL(RTOC) |
| 292 | bl ._ZSt9terminatev{PR} |
| 293 | ori r0,r0,0x0000 |
| 294 | b __L190 |
| 295 | __L1b8: # 0x00000000000001b8 (H.4.NO_SYMBOL+0x01b8) |
| 296 | ld SP,0(SP) |
| 297 | ld r29,-24(SP) |
| 298 | ld r30,-16(SP) |
| 299 | ld r31,-8(SP) |
| 300 | ld r0,16(SP) |
| 301 | mtspr LR,r0 |
| 302 | bclr BO_ALWAYS,CR0_LT |
| 303 | .long 0x00000000 |
| 304 | # traceback table |
| 305 | .byte 0x00 # VERSION=0 |
| 306 | .byte 0x09 # LANG=TB_CPLUSPLUS |
| 307 | .byte 0x28 # IS_GL=0,IS_EPROL=0,HAS_TBOFF=1 |
| 308 | # INT_PROC=0,HAS_CTL=1,TOCLESS=0 |
| 309 | # FP_PRESENT=0,LOG_ABORT=0 |
| 310 | .byte 0x61 # INT_HNDL=0,NAME_PRESENT=1 |
| 311 | # USES_ALLOCA=1,CL_DIS_INV=WALK_ONCOND |
| 312 | # SAVES_CR=0,SAVES_LR=1 |
| 313 | .byte 0x80 # STORES_BC=1,FPR_SAVED=0 |
| 314 | .byte 0x03 # GPR_SAVED=3 |
| 315 | .byte 0x00 # FIXEDPARMS=0 |
| 316 | .byte 0x01 # FLOATPARMS=0,PARMSONSTK=1 |
| 317 | .long 0x00000154 # TB_OFFSET |
| 318 | .long 0x00000001 # NUM_CTL_INFO |
| 319 | .long 0x00000070 # ctl_info_disp[0] |
| 320 | .short 4 # NAME_LEN |
| 321 | .byte "main" # NAME |
| 322 | |
| 323 | .byte 30 # ALLOCA_REG |
| 324 | .byte 0 # padding |
| 325 | # End of traceback table |
| 326 | .long 0x00000000 # "\0\0\0\0" |
| 327 | .long 0x00000000 # "\0\0\0\0" |
| 328 | .long 0x00000000 # "\0\0\0\0" |
| 329 | H.10..__4: # 0x0000000000000200 (H.4.NO_SYMBOL+0x0200) |
| 330 | b __L1a4 |
| 331 | bclr BO_ALWAYS,CR0_LT |
| 332 | .long 0x00000000 |
| 333 | # traceback table |
| 334 | .byte 0x00 # VERSION=0 |
| 335 | .byte 0x09 # LANG=TB_CPLUSPLUS |
| 336 | .byte 0x20 # IS_GL=0,IS_EPROL=0,HAS_TBOFF=1 |
| 337 | # INT_PROC=0,HAS_CTL=0,TOCLESS=0 |
| 338 | # FP_PRESENT=0,LOG_ABORT=0 |
| 339 | .byte 0x40 # INT_HNDL=0,NAME_PRESENT=1 |
| 340 | # USES_ALLOCA=0,CL_DIS_INV=WALK_ONCOND |
| 341 | # SAVES_CR=0,SAVES_LR=0 |
| 342 | .byte 0x00 # STORES_BC=0,FPR_SAVED=0 |
| 343 | .byte 0x00 # GPR_SAVED=0 |
| 344 | .byte 0x00 # FIXEDPARMS=0 |
| 345 | .byte 0x01 # FLOATPARMS=0,PARMSONSTK=1 |
| 346 | .long 0x00000008 # TB_OFFSET |
| 347 | .short 3 # NAME_LEN |
| 348 | .byte "__4" # NAME |
| 349 | |
| 350 | .byte 0 # padding |
| 351 | .byte 0 # padding |
| 352 | .byte 0 # padding |
| 353 | # End of traceback table |
| 354 | H.12..__8: # 0x0000000000000220 (H.4.NO_SYMBOL+0x0220) |
| 355 | b __L138 |
| 356 | bclr BO_ALWAYS,CR0_LT |
| 357 | .long 0x00000000 |
| 358 | # traceback table |
| 359 | .byte 0x00 # VERSION=0 |
| 360 | .byte 0x09 # LANG=TB_CPLUSPLUS |
| 361 | .byte 0x20 # IS_GL=0,IS_EPROL=0,HAS_TBOFF=1 |
| 362 | # INT_PROC=0,HAS_CTL=0,TOCLESS=0 |
| 363 | # FP_PRESENT=0,LOG_ABORT=0 |
| 364 | .byte 0x40 # INT_HNDL=0,NAME_PRESENT=1 |
| 365 | # USES_ALLOCA=0,CL_DIS_INV=WALK_ONCOND |
| 366 | # SAVES_CR=0,SAVES_LR=0 |
| 367 | .byte 0x00 # STORES_BC=0,FPR_SAVED=0 |
| 368 | .byte 0x00 # GPR_SAVED=0 |
| 369 | .byte 0x00 # FIXEDPARMS=0 |
| 370 | .byte 0x01 # FLOATPARMS=0,PARMSONSTK=1 |
| 371 | .long 0x00000008 # TB_OFFSET |
| 372 | .short 3 # NAME_LEN |
| 373 | .byte "__8" # NAME |
| 374 | |
| 375 | .byte 0 # padding |
| 376 | .byte 0 # padding |
| 377 | .byte 0 # padding |
| 378 | # End of traceback table |
| 379 | H.14..__3: # 0x0000000000000240 (H.4.NO_SYMBOL+0x0240) |
| 380 | b __Ld4 |
| 381 | bclr BO_ALWAYS,CR0_LT |
| 382 | .long 0x00000000 |
| 383 | # traceback table |
| 384 | .byte 0x00 # VERSION=0 |
| 385 | .byte 0x09 # LANG=TB_CPLUSPLUS |
| 386 | .byte 0x20 # IS_GL=0,IS_EPROL=0,HAS_TBOFF=1 |
| 387 | # INT_PROC=0,HAS_CTL=0,TOCLESS=0 |
| 388 | # FP_PRESENT=0,LOG_ABORT=0 |
| 389 | .byte 0x40 # INT_HNDL=0,NAME_PRESENT=1 |
| 390 | # USES_ALLOCA=0,CL_DIS_INV=WALK_ONCOND |
| 391 | # SAVES_CR=0,SAVES_LR=0 |
| 392 | .byte 0x00 # STORES_BC=0,FPR_SAVED=0 |
| 393 | .byte 0x00 # GPR_SAVED=0 |
| 394 | .byte 0x00 # FIXEDPARMS=0 |
| 395 | .byte 0x01 # FLOATPARMS=0,PARMSONSTK=1 |
| 396 | .long 0x00000008 # TB_OFFSET |
| 397 | .short 3 # NAME_LEN |
| 398 | .byte "__3" # NAME |
| 399 | |
| 400 | .byte 0 # padding |
| 401 | .byte 0 # padding |
| 402 | .byte 0 # padding |
| 403 | # End of traceback table |
| 404 | .long 0x00000000 # "\0\0\0\0" |
| 405 | .long 0x00000000 # "\0\0\0\0" |
| 406 | .long 0x00000000 # "\0\0\0\0" |
| 407 | .long 0x00000000 # "\0\0\0\0" |
| 408 | .long 0x00000000 # "\0\0\0\0" |
| 409 | .long 0x00000000 # "\0\0\0\0" |
| 410 | .long 0x00000000 # "\0\0\0\0" |
| 411 | .long 0x00000000 # "\0\0\0\0" |
| 412 | # End csect H.4.NO_SYMBOL{PR} |
| 413 | |
| 414 | # .data section |
| 415 | |
| 416 | |
| 417 | .toc # 0x0000000000000280 |
| 418 | T.40._Z4barfv: |
| 419 | .tc H.40._Z4barfv{TC},_Z4barfv{DS} |
| 420 | T.44._ZTIi: |
| 421 | .tc H.44._ZTIi{TC},_ZTIi{UA} |
| 422 | T.48.main: |
| 423 | .tc H.48.main{TC},main{DS} |
| 424 | T.24.__STATIC: |
| 425 | .tc H.24.__STATIC{TC},E.22.__STATIC{RW} |
| 426 | T.18.NO_SYMBOL: |
| 427 | .tc H.18.NO_SYMBOL{TC},H.20.NO_SYMBOL{RO} |
| 428 | T.28.__4: |
| 429 | .tc H.28.__4{TC},__4{DS} |
| 430 | T.32.__8: |
| 431 | .tc H.32.__8{TC},__8{DS} |
| 432 | T.36.__3: |
| 433 | .tc H.36.__3{TC},__3{DS} |
| 434 | |
| 435 | |
| 436 | .csect _Z4barfv{DS}, 3 |
| 437 | .llong ._Z4barfv # "\0\0\0\0\0\0\0\0" |
| 438 | .llong TOC{TC0} # "\0\0\0\0\0\0\002\200" |
| 439 | .long 0x00000000 # "\0\0\0\0" |
| 440 | .long 0x00000000 # "\0\0\0\0" |
| 441 | # End csect _Z4barfv{DS} |
| 442 | |
| 443 | |
| 444 | .csect main{DS}, 3 |
| 445 | .llong .main # "\0\0\0\0\0\0\0\200" |
| 446 | .llong TOC{TC0} # "\0\0\0\0\0\0\002\200" |
| 447 | .long 0x00000000 # "\0\0\0\0" |
| 448 | .long 0x00000000 # "\0\0\0\0" |
| 449 | # End csect main{DS} |
| 450 | |
| 451 | |
| 452 | .csect __4{DS}, 3 |
| 453 | .llong H.10..__4 # "\0\0\0\0\0\0\002\0" |
| 454 | .llong TOC{TC0} # "\0\0\0\0\0\0\002\200" |
| 455 | .long 0x00000000 # "\0\0\0\0" |
| 456 | .long 0x00000000 # "\0\0\0\0" |
| 457 | # End csect __4{DS} |
| 458 | |
| 459 | |
| 460 | .csect __8{DS}, 3 |
| 461 | .llong H.12..__8 # "\0\0\0\0\0\0\002 " |
| 462 | .llong TOC{TC0} # "\0\0\0\0\0\0\002\200" |
| 463 | .long 0x00000000 # "\0\0\0\0" |
| 464 | .long 0x00000000 # "\0\0\0\0" |
| 465 | # End csect __8{DS} |
| 466 | |
| 467 | |
| 468 | .csect __3{DS}, 3 |
| 469 | .llong H.14..__3 # "\0\0\0\0\0\0\002@" |
| 470 | .llong TOC{TC0} # "\0\0\0\0\0\0\002\200" |
| 471 | .long 0x00000000 # "\0\0\0\0" |
| 472 | .long 0x00000000 # "\0\0\0\0" |
| 473 | # End csect __3{DS} |
| 474 | |
| 475 | |
| 476 | .csect E.22.__STATIC{RW}, 3 |
| 477 | .long 0x1cedbeef # "\034\355\276\357" |
| 478 | .long 0x00000003 # "\0\0\0\003" |
| 479 | .long 0x00000000 # "\0\0\0\0" |
| 480 | .long 0x00000000 # "\0\0\0\0" |
| 481 | .llong __3{DS} # "\0\0\0\0\0\0\003 " |
| 482 | .long 0xffffffff # "\377\377\377\377" |
| 483 | .long 0xffffffff # "\377\377\377\377" |
| 484 | .long 0x00000000 # "\0\0\0\0" |
| 485 | .long 0x00000000 # "\0\0\0\0" |
| 486 | .long 0x00000000 # "\0\0\0\0" |
| 487 | .long 0x00000000 # "\0\0\0\0" |
| 488 | .long 0x00000000 # "\0\0\0\0" |
| 489 | .long 0x00000000 # "\0\0\0\0" |
| 490 | .llong __8{DS} # "\0\0\0\0\0\0\003\b" |
| 491 | .long 0xffffffff # "\377\377\377\377" |
| 492 | .long 0xfffffffe # "\377\377\377\376" |
| 493 | .long 0x00000000 # "\0\0\0\0" |
| 494 | .long 0x00000000 # "\0\0\0\0" |
| 495 | .long 0x00000000 # "\0\0\0\0" |
| 496 | .long 0x00000000 # "\0\0\0\0" |
| 497 | .long 0x00000000 # "\0\0\0\0" |
| 498 | .long 0x00000000 # "\0\0\0\0" |
| 499 | .llong __4{DS} # "\0\0\0\0\0\0\002\360" |
| 500 | .long 0xffffffff # "\377\377\377\377" |
| 501 | .long 0xfffffffc # "\377\377\377\374" |
| 502 | .long 0x00000000 # "\0\0\0\0" |
| 503 | .long 0x00000000 # "\0\0\0\0" |
| 504 | .long 0x00000000 # "\0\0\0\0" |
| 505 | .long 0x00000000 # "\0\0\0\0" |
| 506 | # End csect E.22.__STATIC{RW} |
| 507 | |
| 508 | |
| 509 | .csect H.20.NO_SYMBOL{RO}, 3 |
| 510 | .long 0x63617567 # "caug" |
| 511 | .long 0x68742069 # "ht i" |
| 512 | .long 0x6e740a00 # "nt\n\0" |
| 513 | # End csect H.20.NO_SYMBOL{RO} |
| 514 | .long 0x00000000 # "\0\0\0\0" |
| 515 | |
| 516 | |
| 517 | |
| 518 | # .bss section |
| 519 | |
| 520 | |
| 521 | # dwarf sections |
| 522 | |
| 523 | # end dwarf sections |
| 524 | #endif // defined(T1_CPP_CODE) |
| 525 | |
| 526 | #if defined(T2_CPP_CODE) |
| 527 | # |
| 528 | # This portion of assembly code is generated by IBM legacy xlclang++ compiler |
| 529 | # from the following C++ source file for 64-bit mode. |
| 530 | # |
| 531 | # t2.cpp |
| 532 | # |
| 533 | #extern "C" int printf(const char *, ...); |
| 534 | # |
| 535 | #extern "C" unsigned int * __xlc_exception_handle(); |
| 536 | # |
| 537 | #extern "C" unsigned int * wrap__xlc_exception_handle() { |
| 538 | # printf("wrap__xlc_exception_handle called\n"); |
| 539 | # return __xlc_exception_handle(); |
| 540 | #} |
| 541 | # |
| 542 | .set r0,0; .set SP,1; .set RTOC,2; .set r3,3; .set r4,4 |
| 543 | .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 |
| 544 | .set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 |
| 545 | .set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 |
| 546 | .set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 |
| 547 | .set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 |
| 548 | .set r30,30; .set r31,31 |
| 549 | .set fp0,0; .set fp1,1; .set fp2,2; .set fp3,3; .set fp4,4 |
| 550 | .set fp5,5; .set fp6,6; .set fp7,7; .set fp8,8; .set fp9,9 |
| 551 | .set fp10,10; .set fp11,11; .set fp12,12; .set fp13,13; .set fp14,14 |
| 552 | .set fp15,15; .set fp16,16; .set fp17,17; .set fp18,18; .set fp19,19 |
| 553 | .set fp20,20; .set fp21,21; .set fp22,22; .set fp23,23; .set fp24,24 |
| 554 | .set fp25,25; .set fp26,26; .set fp27,27; .set fp28,28; .set fp29,29 |
| 555 | .set fp30,30; .set fp31,31 |
| 556 | .set v0,0; .set v1,1; .set v2,2; .set v3,3; .set v4,4 |
| 557 | .set v5,5; .set v6,6; .set v7,7; .set v8,8; .set v9,9 |
| 558 | .set v10,10; .set v11,11; .set v12,12; .set v13,13; .set v14,14 |
| 559 | .set v15,15; .set v16,16; .set v17,17; .set v18,18; .set v19,19 |
| 560 | .set v20,20; .set v21,21; .set v22,22; .set v23,23; .set v24,24 |
| 561 | .set v25,25; .set v26,26; .set v27,27; .set v28,28; .set v29,29 |
| 562 | .set v30,30; .set v31,31 |
| 563 | .set x0,0; .set x1,1; .set x2,2; .set x3,3; .set x4,4 |
| 564 | .set x5,5; .set x6,6; .set x7,7; .set x8,8; .set x9,9 |
| 565 | .set x10,10; .set x11,11; .set x12,12; .set x13,13; .set x14,14 |
| 566 | .set x15,15; .set x16,16; .set x17,17; .set x18,18; .set x19,19 |
| 567 | .set x20,20; .set x21,21; .set x22,22; .set x23,23; .set x24,24 |
| 568 | .set x25,25; .set x26,26; .set x27,27; .set x28,28; .set x29,29 |
| 569 | .set x30,30; .set x31,31; .set x32,32; .set x33,33; .set x34,34 |
| 570 | .set x35,35; .set x36,36; .set x37,37; .set x38,38; .set x39,39 |
| 571 | .set x40,40; .set x41,41; .set x42,42; .set x43,43; .set x44,44 |
| 572 | .set x45,45; .set x46,46; .set x47,47; .set x48,48; .set x49,49 |
| 573 | .set x50,50; .set x51,51; .set x52,52; .set x53,53; .set x54,54 |
| 574 | .set x55,55; .set x56,56; .set x57,57; .set x58,58; .set x59,59 |
| 575 | .set x60,60; .set x61,61; .set x62,62; .set x63,63 |
| 576 | .set q0,0; .set q1,1; .set q2,2; .set q3,3; .set q4,4 |
| 577 | .set q5,5; .set q6,6; .set q7,7; .set q8,8; .set q9,9 |
| 578 | .set q10,10; .set q11,11; .set q12,12; .set q13,13; .set q14,14 |
| 579 | .set q15,15; .set q16,16; .set q17,17; .set q18,18; .set q19,19 |
| 580 | .set q20,20; .set q21,21; .set q22,22; .set q23,23; .set q24,24 |
| 581 | .set q25,25; .set q26,26; .set q27,27; .set q28,28; .set q29,29 |
| 582 | .set q30,30; .set q31,31 |
| 583 | .set MQ,0; .set XER,1; .set DSCR,3; .set FROM_RTCU,4; .set FROM_RTCL,5 |
| 584 | .set FROM_DEC,6; .set LR,8; .set CTR,9; .set AMR,13; .set TID,17; .set DSISR,18 |
| 585 | .set DAR,19; .set TO_RTCU,20; .set TO_RTCL,21; .set TO_DEC,22; .set SDR_0,24 |
| 586 | .set SDR_1,25; .set SRR_0,26; .set SRR_1,27 |
| 587 | .set BO_dCTR_NZERO_AND_NOT,0; .set BO_dCTR_NZERO_AND_NOT_1,1 |
| 588 | .set BO_dCTR_ZERO_AND_NOT,2; .set BO_dCTR_ZERO_AND_NOT_1,3 |
| 589 | .set BO_IF_NOT,4; .set BO_IF_NOT_1,5; .set BO_IF_NOT_2,6 |
| 590 | .set BO_IF_NOT_3,7; .set BO_dCTR_NZERO_AND,8; .set BO_dCTR_NZERO_AND_1,9 |
| 591 | .set BO_dCTR_ZERO_AND,10; .set BO_dCTR_ZERO_AND_1,11; .set BO_IF,12 |
| 592 | .set BO_IF_1,13; .set BO_IF_2,14; .set BO_IF_3,15; .set BO_dCTR_NZERO,16 |
| 593 | .set BO_dCTR_NZERO_1,17; .set BO_dCTR_ZERO,18; .set BO_dCTR_ZERO_1,19 |
| 594 | .set BO_ALWAYS,20; .set BO_ALWAYS_1,21; .set BO_ALWAYS_2,22 |
| 595 | .set BO_ALWAYS_3,23; .set BO_dCTR_NZERO_8,24; .set BO_dCTR_NZERO_9,25 |
| 596 | .set BO_dCTR_ZERO_8,26; .set BO_dCTR_ZERO_9,27; .set BO_ALWAYS_8,28 |
| 597 | .set BO_ALWAYS_9,29; .set BO_ALWAYS_10,30; .set BO_ALWAYS_11,31 |
| 598 | .set CR0_LT,0; .set CR0_GT,1; .set CR0_EQ,2; .set CR0_SO,3 |
| 599 | .set CR1_FX,4; .set CR1_FEX,5; .set CR1_VX,6; .set CR1_OX,7 |
| 600 | .set CR2_LT,8; .set CR2_GT,9; .set CR2_EQ,10; .set CR2_SO,11 |
| 601 | .set CR3_LT,12; .set CR3_GT,13; .set CR3_EQ,14; .set CR3_SO,15 |
| 602 | .set CR4_LT,16; .set CR4_GT,17; .set CR4_EQ,18; .set CR4_SO,19 |
| 603 | .set CR5_LT,20; .set CR5_GT,21; .set CR5_EQ,22; .set CR5_SO,23 |
| 604 | .set CR6_LT,24; .set CR6_GT,25; .set CR6_EQ,26; .set CR6_SO,27 |
| 605 | .set CR7_LT,28; .set CR7_GT,29; .set CR7_EQ,30; .set CR7_SO,31 |
| 606 | .set TO_LT,16; .set TO_GT,8; .set TO_EQ,4; .set TO_LLT,2; .set TO_LGT,1 |
| 607 | |
| 608 | .rename H.4.NO_SYMBOL{PR},"" |
| 609 | .rename H.10.NO_SYMBOL{TC},"" |
| 610 | .rename H.12.NO_SYMBOL{RO},"" |
| 611 | .rename H.16.wrap__xlc_exception_handle{TC},"wrap__xlc_exception_handle" |
| 612 | |
| 613 | .lglobl H.4.NO_SYMBOL{PR} |
| 614 | .globl .wrap__xlc_exception_handle |
| 615 | .lglobl H.12.NO_SYMBOL{RO} |
| 616 | .globl wrap__xlc_exception_handle{DS} |
| 617 | .extern .printf{PR} |
| 618 | .extern .__xlc_exception_handle{PR} |
| 619 | |
| 620 | |
| 621 | # .text section |
| 622 | .file "t2.cpp" ,"Mon Jan 30 13:41:54 2023 " ,"IBM XL C/C++ for AIX, Version 16.1.0.13" |
| 623 | .machine "ppc64" |
| 624 | |
| 625 | |
| 626 | .csect H.4.NO_SYMBOL{PR}, 7 |
| 627 | .wrap__xlc_exception_handle: # 0x0000000000000000 (H.4.NO_SYMBOL) |
| 628 | mfspr r0,LR |
| 629 | std r31,-8(SP) |
| 630 | std r0,16(SP) |
| 631 | stdu SP,-128(SP) |
| 632 | ld r31,T.10.NO_SYMBOL(RTOC) |
| 633 | ori r3,r31,0x0000 |
| 634 | bl .printf{PR} |
| 635 | ori r0,r0,0x0000 |
| 636 | bl .__xlc_exception_handle{PR} |
| 637 | ori r0,r0,0x0000 |
| 638 | ld r0,144(SP) |
| 639 | mtspr LR,r0 |
| 640 | addi SP,SP,128 |
| 641 | ld r31,-8(SP) |
| 642 | bclr BO_ALWAYS,CR0_LT |
| 643 | .long 0x00000000 |
| 644 | # traceback table |
| 645 | .byte 0x00 # VERSION=0 |
| 646 | .byte 0x09 # LANG=TB_CPLUSPLUS |
| 647 | .byte 0x20 # IS_GL=0,IS_EPROL=0,HAS_TBOFF=1 |
| 648 | # INT_PROC=0,HAS_CTL=0,TOCLESS=0 |
| 649 | # FP_PRESENT=0,LOG_ABORT=0 |
| 650 | .byte 0x41 # INT_HNDL=0,NAME_PRESENT=1 |
| 651 | # USES_ALLOCA=0,CL_DIS_INV=WALK_ONCOND |
| 652 | # SAVES_CR=0,SAVES_LR=1 |
| 653 | .byte 0x80 # STORES_BC=1,FPR_SAVED=0 |
| 654 | .byte 0x01 # GPR_SAVED=1 |
| 655 | .byte 0x00 # FIXEDPARMS=0 |
| 656 | .byte 0x01 # FLOATPARMS=0,PARMSONSTK=1 |
| 657 | .long 0x0000003c # TB_OFFSET |
| 658 | .short 26 # NAME_LEN |
| 659 | .byte "wrap__xlc_exception_handle" # NAME |
| 660 | |
| 661 | # End of traceback table |
| 662 | .long 0x00000000 # "\0\0\0\0" |
| 663 | .long 0x00000000 # "\0\0\0\0" |
| 664 | .long 0x00000000 # "\0\0\0\0" |
| 665 | .long 0x00000000 # "\0\0\0\0" |
| 666 | .long 0x00000000 # "\0\0\0\0" |
| 667 | .long 0x00000000 # "\0\0\0\0" |
| 668 | # End csect H.4.NO_SYMBOL{PR} |
| 669 | |
| 670 | # .data section |
| 671 | |
| 672 | |
| 673 | .toc # 0x0000000000000080 |
| 674 | T.16.wrap__xlc_exception_handle: |
| 675 | .tc H.16.wrap__xlc_exception_handle{TC},wrap__xlc_exception_handle{DS} |
| 676 | T.10.NO_SYMBOL: |
| 677 | .tc H.10.NO_SYMBOL{TC},H.12.NO_SYMBOL{RO} |
| 678 | |
| 679 | |
| 680 | .csect wrap__xlc_exception_handle{DS}, 3 |
| 681 | .llong .wrap__xlc_exception_handle# "\0\0\0\0\0\0\0\0" |
| 682 | .llong TOC{TC0} # "\0\0\0\0\0\0\0\200" |
| 683 | .long 0x00000000 # "\0\0\0\0" |
| 684 | .long 0x00000000 # "\0\0\0\0" |
| 685 | # End csect wrap__xlc_exception_handle{DS} |
| 686 | |
| 687 | |
| 688 | .csect H.12.NO_SYMBOL{RO}, 3 |
| 689 | .long 0x77726170 # "wrap" |
| 690 | .long 0x5f5f786c # "__xl" |
| 691 | .long 0x635f6578 # "c_ex" |
| 692 | .long 0x63657074 # "cept" |
| 693 | .long 0x696f6e5f # "ion_" |
| 694 | .long 0x68616e64 # "hand" |
| 695 | .long 0x6c652063 # "le c" |
| 696 | .long 0x616c6c65 # "alle" |
| 697 | # End csect H.12.NO_SYMBOL{RO} |
| 698 | .long 0x640a0000 # "d\n\0\0" |
| 699 | .long 0x00000000 # "\0\0\0\0" |
| 700 | |
| 701 | |
| 702 | |
| 703 | # .bss section |
| 704 | |
| 705 | |
| 706 | # dwarf sections |
| 707 | |
| 708 | # end dwarf sections |
| 709 | |
| 710 | #endif // defined(T2_CPP_CODE) |
| 711 | |