pkubaj commented on code in PR #3696: URL: https://github.com/apache/brpc/pull/3696#discussion_r4501293225
########## src/bthread/context.cpp: ########## @@ -1012,3 +1012,253 @@ __asm ( " call _exit\n" ); #endif + +#if defined(BTHREAD_CONTEXT_PLATFORM_linux_ppc64) && defined(BTHREAD_CONTEXT_COMPILER_gcc) +__asm ( +".text\n" +".align 2\n" +".globl bthread_jump_fcontext\n" +".type bthread_jump_fcontext, @function\n" +"bthread_jump_fcontext:\n" +" addis %r2, %r12, .TOC.-bthread_jump_fcontext@ha\n" +" addi %r2, %r2, .TOC.-bthread_jump_fcontext@l\n" +" .localentry bthread_jump_fcontext, . - bthread_jump_fcontext\n" +" # reserve space on stack\n" +" subi %r1, %r1, 528\n" +" std %r14, 352(%r1)\n" +" std %r15, 360(%r1)\n" +" std %r16, 368(%r1)\n" +" std %r17, 376(%r1)\n" +" std %r18, 384(%r1)\n" +" std %r19, 392(%r1)\n" +" std %r20, 400(%r1)\n" +" std %r21, 408(%r1)\n" +" std %r22, 416(%r1)\n" +" std %r23, 424(%r1)\n" +" std %r24, 432(%r1)\n" +" std %r25, 440(%r1)\n" +" std %r26, 448(%r1)\n" +" std %r27, 456(%r1)\n" +" std %r28, 464(%r1)\n" +" std %r29, 472(%r1)\n" +" std %r30, 480(%r1)\n" +" std %r31, 488(%r1)\n" +" # save CR\n" +" mfcr %r0\n" +" std %r0, 496(%r1)\n" +" # save LR, and LR as PC\n" +" mflr %r0\n" +" std %r0, 504(%r1)\n" +" std %r0, 512(%r1)\n" +" # the fourth argument (preserve_fpu) is ignored: the compiler may keep\n" +" # any value in the non-volatile FPRs/VRs across the call\n" +" stfd %f14, 200(%r1)\n" +" stfd %f15, 208(%r1)\n" +" stfd %f16, 216(%r1)\n" +" stfd %f17, 224(%r1)\n" +" stfd %f18, 232(%r1)\n" +" stfd %f19, 240(%r1)\n" +" stfd %f20, 248(%r1)\n" +" stfd %f21, 256(%r1)\n" +" stfd %f22, 264(%r1)\n" +" stfd %f23, 272(%r1)\n" +" stfd %f24, 280(%r1)\n" +" stfd %f25, 288(%r1)\n" +" stfd %f26, 296(%r1)\n" +" stfd %f27, 304(%r1)\n" +" stfd %f28, 312(%r1)\n" +" stfd %f29, 320(%r1)\n" +" stfd %f30, 328(%r1)\n" +" stfd %f31, 336(%r1)\n" +" mffs %f0\n" +" stfd %f0, 344(%r1)\n" +#ifdef __ALTIVEC__ Review Comment: Done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
