Handle gcc __builtin_strcmp using 128/256 bit vectors with sse4.1, avx/avx2
[valgrind.git] / coregrind / m_dispatch / dispatch-ppc64le-linux.S
blobe790ae84cdf81d85782c948e2d6cc630036f41d7
2 /*--------------------------------------------------------------------*/
3 /*--- The core dispatch loop, for jumping to a code address.       ---*/
4 /*---                                       dispatch-ppc64-linux.S ---*/
5 /*--------------------------------------------------------------------*/
7 /*
8   This file is part of Valgrind, a dynamic binary instrumentation
9   framework.
11   Copyright (C) 2005-2017 Cerion Armour-Brown <cerion@open-works.co.uk>
13   This program is free software; you can redistribute it and/or
14   modify it under the terms of the GNU General Public License as
15   published by the Free Software Foundation; either version 2 of the
16   License, or (at your option) any later version.
18   This program is distributed in the hope that it will be useful, but
19   WITHOUT ANY WARRANTY; without even the implied warranty of
20   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21   General Public License for more details.
23   You should have received a copy of the GNU General Public License
24   along with this program; if not, see <http://www.gnu.org/licenses/>.
26   The GNU General Public License is contained in the file COPYING.
29 #include "pub_core_basics_asm.h"
31 #if  defined(VGP_ppc64le_linux)
33 #include "pub_core_dispatch_asm.h"
34 #include "pub_core_transtab_asm.h"
35 #include "libvex_guest_offsets.h"       /* for OFFSET_ppc64_CIA */
37 /* NOTE: PPC64 supports Big Endian and Little Endian.  It also supports the
38         ELF version 1 and ELF version 2 APIs.
40         Currently LE uses ELF version 2 and BE uses ELF version 1.  However,
41         BE and LE may support the other ELF version in the future.  So, the
42         _CALL_ELF is used in the assembly function to enable code for a
43         specific ELF version independently of the Enianess of the machine.
44         The test "#if  _CALL_ELF == 2" checks if ELF version 2 is being used.
47 /* References to globals via the TOC */
50         .globl  vgPlain_tt_fast
51         .lcomm  vgPlain_tt_fast,4,4
52         .type   vgPlain_tt_fast, @object
54 .section ".toc","aw"
56 .tocent__vgPlain_tt_fast:
57         .tc vgPlain_tt_fast[TC],vgPlain_tt_fast
59 .tocent__vgPlain_stats__n_xIndirs_32:
60         .tc vgPlain_stats__n_xIndirs_32[TC], vgPlain_stats__n_xIndirs_32
62 .tocent__vgPlain_stats__n_xIndir_hits1_32:
63         .tc vgPlain_stats__n_xIndir_hits1_32[TC], vgPlain_stats__n_xIndir_hits1_32
65 .tocent__vgPlain_stats__n_xIndir_hits2_32:
66         .tc vgPlain_stats__n_xIndir_hits2_32[TC], vgPlain_stats__n_xIndir_hits2_32
68 .tocent__vgPlain_stats__n_xIndir_hits3_32:
69         .tc vgPlain_stats__n_xIndir_hits3_32[TC], vgPlain_stats__n_xIndir_hits3_32
71 .tocent__vgPlain_stats__n_xIndir_misses_32:
72         .tc vgPlain_stats__n_xIndir_misses_32[TC], vgPlain_stats__n_xIndir_misses_32
74 .tocent__vgPlain_machine_ppc64_has_VMX:
75         .tc vgPlain_machine_ppc64_has_VMX[TC], vgPlain_machine_ppc64_has_VMX
77 /*------------------------------------------------------------*/
78 /*---                                                      ---*/
79 /*--- The dispatch loop.  VG_(disp_run_translations) is    ---*/
80 /*--- used to run all translations,                        ---*/
81 /*--- including no-redir ones.                             ---*/
82 /*---                                                      ---*/
83 /*------------------------------------------------------------*/
85 /*----------------------------------------------------*/
86 /*--- Entry and preamble (set everything up)       ---*/
87 /*----------------------------------------------------*/
89 /* signature:
90 void VG_(disp_run_translations)( UWord* two_words,
91                                  void*  guest_state,
92                                  Addr   host_addr );
95 .section ".text"
96 .align   2
97 .globl   VG_(disp_run_translations)
98 #if _CALL_ELF == 2
99 .type VG_(disp_run_translations),@function
100 VG_(disp_run_translations):
101 .type    .VG_(disp_run_translations),@function
102 #else
103 .section ".opd","aw"
104 .align   3
105 VG_(disp_run_translations):
106 .quad    .VG_(disp_run_translations),.TOC.@tocbase,0
107 .previous
108 .type    .VG_(disp_run_translations),@function
109 #endif
110 .globl   .VG_(disp_run_translations)
111 .VG_(disp_run_translations):
112 #if  _CALL_ELF == 2
113 0:      addis 2, 12,.TOC.-0b@ha
114         addi  2,2,.TOC.-0b@l
115         .localentry VG_(disp_run_translations), .-VG_(disp_run_translations)
116 #endif
118         /* r3 holds two_words */
119         /* r4 holds guest_state */
120         /* r5 holds host_addr */
122         /* ----- entry point to VG_(disp_run_translations) ----- */
123         /* PPC64 ABI saves LR->16(prt_sp), CR->8(prt_sp)) */
125         /* Save lr, cr */
126         mflr    6
127         std     6,16(1)
128         mfcr    6
129         std     6,8(1)
131         /* New stack frame */
132         stdu    1,-624(1)  /* sp should maintain 16-byte alignment */
134         /* General reg save area : 152 bytes */
135         std     31,472(1)
136         std     30,464(1)
137         std     29,456(1)
138         std     28,448(1)
139         std     27,440(1)
140         std     26,432(1)
141         std     25,424(1)
142         std     24,416(1)
143         std     23,408(1)
144         std     22,400(1)
145         std     21,392(1)
146         std     20,384(1)
147         std     19,376(1)
148         std     18,368(1)
149         std     17,360(1)
150         std     16,352(1)
151         std     15,344(1)
152         std     14,336(1)
153         std     13,328(1)
154         std     3,104(1)  /* save two_words for later */
156         /* Save callee-saved registers... */
157         /* Floating-point reg save area : 144 bytes */
158         stfd    31,616(1)
159         stfd    30,608(1)
160         stfd    29,600(1)
161         stfd    28,592(1)
162         stfd    27,584(1)
163         stfd    26,576(1)
164         stfd    25,568(1)
165         stfd    24,560(1)
166         stfd    23,552(1)
167         stfd    22,544(1)
168         stfd    21,536(1)
169         stfd    20,528(1)
170         stfd    19,520(1)
171         stfd    18,512(1)
172         stfd    17,504(1)
173         stfd    16,496(1)
174         stfd    15,488(1)
175         stfd    14,480(1)
177         /* It's necessary to save/restore VRSAVE in the AIX / Darwin ABI.
178            The Linux kernel might not actually use VRSAVE for its intended
179            purpose, but it should be harmless to preserve anyway. */
180         /* r3, r4, r5 are live here, so use r6 */
181         ld      6,.tocent__vgPlain_machine_ppc64_has_VMX@toc(2)
182         ld      6,0(6)
183         cmpldi  6,0
184         beq     .LafterVMX1
186         /* VRSAVE save word : 32 bytes */
187         mfspr   6,256         /* vrsave reg is spr number 256 */
188         stw     6,324(1)
190         /* Alignment padding : 4 bytes */
192         /* Vector reg save area (quadword aligned) : 192 bytes */
193         li      6,304
194         stvx    31,6,1
195         li      6,288
196         stvx    30,6,1
197         li      6,272
198         stvx    29,6,1
199         li      6,256
200         stvx    28,6,1
201         li      6,240
202         stvx    27,6,1
203         li      6,224
204         stvx    26,6,1
205         li      6,208
206         stvx    25,6,1
207         li      6,192
208         stvx    24,6,1
209         li      6,176
210         stvx    23,6,1
211         li      6,160
212         stvx    22,6,1
213         li      6,144
214         stvx    21,6,1
215         li      6,128
216         stvx    20,6,1
217 .LafterVMX1:
219         /* Local variable space... */
221         /* r3 holds two_words */
222         /* r4 holds guest_state */
223         /* r5 holds host_addr */
225         /* 96(sp) used later to check FPSCR[RM] */
226         /* 88(sp) used later to load fpscr with zero */
227         /* 48:87(sp) free */
228         
229         /* Linkage Area (reserved)  BE ABI
230            40(sp) : TOC
231            32(sp) : link editor doubleword
232            24(sp) : compiler doubleword
233            16(sp) : LR
234            8(sp)  : CR
235            0(sp)  : back-chain
236         */
238         /* set host FPU control word to the default mode expected 
239            by VEX-generated code.  See comments in libvex.h for
240            more info. */
241         /* => get zero into f3 (tedious)
242            fsub 3,3,3 is not a reliable way to do this, since if
243            f3 holds a NaN or similar then we don't necessarily
244            wind up with zero. */
245         li      6,0
246         stw     6,88(1)
247         lfs     3,88(1)
248         mtfsf   0xFF,3   /* fpscr = lo32 of f3 */
250         /* set host AltiVec control word to the default mode expected 
251            by VEX-generated code. */
252         ld      6,.tocent__vgPlain_machine_ppc64_has_VMX@toc(2)
253         ld      6,0(6)
254         cmpldi  6,0
255         beq     .LafterVMX2
257         vspltisw 3,0x0  /* generate zero */
258         mtvscr  3       /* sets VSCR[NJ]=0 */
260 .LafterVMX2:
262         /* make a stack frame for the code we are calling */
263         stdu    1,-48(1)
265         /* Set up the guest state ptr */
266         mr      31,4      /* r31 (generated code gsp) = r4 */
267 #if  _CALL_ELF == 2
268 /*  for the LE ABI need to setup r2 and r12 */
269 0:      addis 2, 12,.TOC.-0b@ha
270         addi  2,2,.TOC.-0b@l
271 #endif
273         /* and jump into the code cache.  Chained translations in
274            the code cache run, until for whatever reason, they can't
275            continue.  When that happens, the translation in question
276            will jump (or call) to one of the continuation points
277            VG_(cp_...) below. */
278         mtctr   5
279         bctr
280         /*NOTREACHED*/
282 /*----------------------------------------------------*/
283 /*--- Postamble and exit.                          ---*/
284 /*----------------------------------------------------*/
286 .postamble:
287         /* At this point, r6 and r7 contain two
288            words to be returned to the caller.  r6
289            holds a TRC value, and r7 optionally may
290            hold another word (for CHAIN_ME exits, the
291            address of the place to patch.) */
293         /* undo the "make a stack frame for the code we are calling" */
294         addi    1,1,48
296         /* We're leaving.  Check that nobody messed with
297            VSCR or FPSCR in ways we don't expect. */
298         /* Using r11 - value used again further on, so don't trash! */
299         ld      11,.tocent__vgPlain_machine_ppc64_has_VMX@toc(2)
300         ld      11,0(11)
302         /* Set fpscr back to a known state, since vex-generated code
303            may have messed with fpscr[rm]. */
304         li      5,0
305         addi    1,1,-16
306         stw     5,0(1)
307         lfs     3,0(1)
308         addi    1,1,16
309         mtfsf   0xFF,3   /* fpscr = f3 */
310         
311         cmpldi  11,0    /* Do we have altivec? */
312         beq     .LafterVMX8
314         /* Expect VSCR[NJ] to be 0, call invariant_violation if
315            VSCR[NJ] == 1 . */
316         /* first generate 4x 0x00010000 */
317         vspltisw  4,0x1                   /* 4x 0x00000001 */
318         vspltisw  5,0x0                   /* zero */
319         vsldoi    6,4,5,0x2               /* <<2*8 => 4x 0x00010000 */
320         /* retrieve VSCR and mask wanted bits */
321         mfvscr    7
322         vand      7,7,6                   /* gives NJ flag */
323         vspltw    7,7,0x3                 /* flags-word to all lanes */
324         vcmpequw. 8,6,7                   /* CR[24] = 1 if v6 == v7 */
325         bt        24,.invariant_violation /* branch if all_equal, i.e. NJ=1 */
327 .LafterVMX8:
328         /* otherwise we're OK */
329         b       .remove_frame
331 .invariant_violation:
332         li      6,VG_TRC_INVARIANT_FAILED
333         li      7,0
334         /* fall through */
336 .remove_frame:
337         /* r11 already holds VG_(machine_ppc32_has_VMX) value */
338         cmplwi  11,0
339         beq     .LafterVMX9
341         /* Restore Altivec regs.
342            Use r5 as scratch since r6/r7 are live. */
343         /* VRSAVE */
344         lwz     5,324(1)
345         mfspr   5,256         /* VRSAVE reg is spr number 256 */
347         /* Vector regs */
348         li      5,304
349         lvx     31,5,1
350         li      5,288
351         lvx     30,5,1
352         li      5,272
353         lvx     29,5,1
354         li      5,256
355         lvx     28,5,1
356         li      5,240
357         lvx     27,5,1
358         li      5,224
359         lvx     26,5,1
360         li      5,208
361         lvx     25,5,1
362         li      5,192
363         lvx     24,5,1
364         li      5,176
365         lvx     23,5,1
366         li      5,160
367         lvx     22,5,1
368         li      5,144
369         lvx     21,5,1
370         li      5,128
371         lvx     20,5,1
372 .LafterVMX9:
374         /* Restore FP regs */
375         /* Floating-point regs */
376         lfd     31,616(1)
377         lfd     30,608(1)
378         lfd     29,600(1)
379         lfd     28,592(1)
380         lfd     27,584(1)
381         lfd     26,576(1)
382         lfd     25,568(1)
383         lfd     24,560(1)
384         lfd     23,552(1)
385         lfd     22,544(1)
386         lfd     21,536(1)
387         lfd     20,528(1)
388         lfd     19,520(1)
389         lfd     18,512(1)
390         lfd     17,504(1)
391         lfd     16,496(1)
392         lfd     15,488(1)
393         lfd     14,480(1)
395         /* restore int regs, including importantly r3 (two_words) */
396         ld      31,472(1)
397         ld      30,464(1)
398         ld      29,456(1)
399         ld      28,448(1)
400         ld      27,440(1)
401         ld      26,432(1)
402         ld      25,424(1)
403         ld      24,416(1)
404         ld      23,408(1)
405         ld      22,400(1)
406         ld      21,392(1)
407         ld      20,384(1)
408         ld      19,376(1)
409         ld      18,368(1)
410         ld      17,360(1)
411         ld      16,352(1)
412         ld      15,344(1)
413         ld      14,336(1)
414         ld      13,328(1)
415         ld      3,104(1)
416         /* Stash return values */
417         std     6,0(3)
418         std     7,8(3)
420         /* restore lr & sp, and leave */
421         ld      0,632(1)  /* stack_size + 8 */
422         mtcr    0
423         ld      0,640(1)  /* stack_size + 16 */
424         mtlr    0
425         addi    1,1,624   /* stack_size */
426         blr
427 #if _CALL_ELF == 2
428         .size VG_(disp_run_translations),.-VG_(disp_run_translations)
429 #endif
432 /*----------------------------------------------------*/
433 /*--- Continuation points                          ---*/
434 /*----------------------------------------------------*/
436 /* ------ Chain me to slow entry point ------ */
437         .section ".text"
438         .align   2
439         .globl   VG_(disp_cp_chain_me_to_slowEP)
440 #if  _CALL_ELF == 2
441         .type VG_(disp_cp_chain_me_to_slowEP),@function
442         VG_(disp_cp_chain_me_to_slowEP):
443 #else
444         .section ".opd","aw"
445         .align   3
446 VG_(disp_cp_chain_me_to_slowEP):
447         .quad    .VG_(disp_cp_chain_me_to_slowEP),.TOC.@tocbase,0
448         .previous
449 #endif
450         .type    .VG_(disp_cp_chain_me_to_slowEP),@function
451         .globl   .VG_(disp_cp_chain_me_to_slowEP)
452 .VG_(disp_cp_chain_me_to_slowEP):
453 #if  _CALL_ELF == 2
454 0:      addis 2, 12,.TOC.-0b@ha
455         addi  2,2,.TOC.-0b@l
456         .localentry VG_(disp_cp_chain_me_to_slowEP), .-VG_(disp_cp_chain_me_to_slowEP)
457 #endif
458         /* We got called.  The return address indicates
459            where the patching needs to happen.  Collect
460            the return address and, exit back to C land,
461            handing the caller the pair (Chain_me_S, RA) */
462         li   6, VG_TRC_CHAIN_ME_TO_SLOW_EP
463         mflr 7
464         /* 20 = imm64-fixed5 r30, disp_cp_chain_me_to_slowEP
465            4  = mtctr r30
466            4  = btctr
467         */
468         subi 7,7,20+4+4
469         b    .postamble
470 #if  _CALL_ELF == 2
471         .size VG_(disp_cp_chain_me_to_slowEP),.-VG_(disp_cp_chain_me_to_slowEP)
472 #endif
474 /* ------ Chain me to fast entry point ------ */
475         .section ".text"
476         .align   2
477         .globl   VG_(disp_cp_chain_me_to_fastEP)
478 #if  _CALL_ELF == 2
479         .type VG_(disp_cp_chain_me_to_fastEP),@function
480 VG_(disp_cp_chain_me_to_fastEP):
481 #else
482         .section ".opd","aw"
483         .align   3
484 VG_(disp_cp_chain_me_to_fastEP):
485         .quad    .VG_(disp_cp_chain_me_to_fastEP),.TOC.@tocbase,0
486         .previous
487 #endif
488         .type    .VG_(disp_cp_chain_me_to_fastEP),@function
489         .globl   .VG_(disp_cp_chain_me_to_fastEP)
490 .VG_(disp_cp_chain_me_to_fastEP):
491 #if  _CALL_ELF == 2
492 0:      addis 2, 12,.TOC.-0b@ha
493         addi  2,2,.TOC.-0b@l
494         .localentry VG_(disp_cp_chain_me_to_fastEP), .-VG_(disp_cp_chain_me_to_fastEP)
495 #endif
496         /* We got called.  The return address indicates
497            where the patching needs to happen.  Collect
498            the return address and, exit back to C land,
499            handing the caller the pair (Chain_me_S, RA) */
500         li   6, VG_TRC_CHAIN_ME_TO_FAST_EP
501         mflr 7
502         /* 20 = imm64-fixed5 r30, disp_cp_chain_me_to_fastEP
503            4  = mtctr r30
504            4  = btctr
505         */
506         subi 7,7,20+4+4
507         b    .postamble
508 #if _CALL_ELF == 2
509         .size VG_(disp_cp_chain_me_to_fastEP),.-VG_(disp_cp_chain_me_to_fastEP)
510 #endif
512 /* ------ Indirect but boring jump ------ */
513         .section ".text"
514         .align   2
515         .globl   VG_(disp_cp_xindir)
516 #if _CALL_ELF == 2
517         .type VG_(disp_cp_xindir),@function
518 VG_(disp_cp_xindir):
519 #else
520         .section ".opd","aw"
521         .align   3
522 VG_(disp_cp_xindir):
523         .quad    .VG_(disp_cp_xindir),.TOC.@tocbase,0
524         .previous
525 #endif
526         .type    .VG_(disp_cp_xindir),@function
527         .globl   .VG_(disp_cp_xindir)
528 .VG_(disp_cp_xindir):
529 #if  _CALL_ELF == 2
530 0:      addis 2, 12,.TOC.-0b@ha
531         addi  2,2,.TOC.-0b@l
532         .localentry VG_(disp_cp_xindir), .-VG_(disp_cp_xindir)
533 #endif
534         /* Where are we going? */
535         ld    20, OFFSET_ppc64_CIA(31)
537         /* stats only */
538         ld    24, .tocent__vgPlain_stats__n_xIndirs_32@toc(2)
539         lwz   25, 0(24)
540         addi  25, 25, 1
541         stw   25, 0(24)
543         // LIVE: r31 (guest state ptr), r20 (guest address to go to).
544         // We use 6 temporaries:
545         //   r26 (to point at the relevant FastCacheSet),
546         //   r21, r22, r23 (scratch, for swapping entries within a set)
547         //   r24, r25 (other scratch)
549         /* Try a fast lookup in the translation cache.  This is pretty much
550            a handcoded version of VG_(lookupInFastCache). */
552         // Compute r26 = VG_TT_FAST_HASH(guest)
553         srdi  26, 20, 2                       // g2 = guest >> 2
554         srdi  25, 20, (VG_TT_FAST_BITS + 2)   // (g2 >> VG_TT_FAST_BITS)
555         xor   26, 26, 25                      // (g2 >> VG_TT_FAST_BITS) ^ g2
556         andi. 26, 26, VG_TT_FAST_MASK         // setNo
558         // Compute r6 = &VG_(tt_fast)[r6]
559         ld    25, .tocent__vgPlain_tt_fast@toc(2)
560         sldi  26, 26, VG_FAST_CACHE_SET_BITS
561         add   26, 26, 25
563         // LIVE: r31 (guest state ptr), r20 (guest addr), r26 (cache set)
564         // try way 0
565         ld    24, FCS_g0(26)   // .guest0
566         ld    25, FCS_h0(26)   // .host0
567         cmpd  24, 20  // cmp against .guest0
568         bne   1f
569         // hit at way 0
570         // goto .host0
571         mtctr 25
572         bctr
573         /*NOTREACHED*/
575 1:      // try way 1
576         ld    24, FCS_g1(26)
577         cmpd  24, 20  // cmp against .guest1
578         bne   2f
579         // hit at way 1; swap upwards
580         ld    21, FCS_g0(26)   // 21 = old .guest0
581         ld    22, FCS_h0(26)   // 22 = old .host0
582         ld    23, FCS_h1(26)   // 23 = old .host1
583         std   20, FCS_g0(26)   // new .guest0 = guest
584         std   23, FCS_h0(26)   // new .host0 = old .host1
585         std   21, FCS_g1(26)   // new .guest1 = old .guest0
586         std   22, FCS_h1(26)   // new .host1 = old .host0
587         // stats only
588         ld    24, .tocent__vgPlain_stats__n_xIndir_hits1_32@toc(2)
589         lwz   25, 0(24)
590         addi  25, 25, 1
591         stw   25, 0(24)
592         // goto old .host1 a.k.a. new .host0
593         mtctr 23
594         bctr
595         /*NOTREACHED*/
597 2:      // try way 2
598         ld    24, FCS_g2(26)
599         cmpd  24, 20   // cmp against .guest2
600         bne   3f
601         // hit at way 2; swap upwards
602         ld    21, FCS_g1(26)
603         ld    22, FCS_h1(26)
604         ld    23, FCS_h2(26)
605         std   20, FCS_g1(26)
606         std   23, FCS_h1(26)
607         std   21, FCS_g2(26)
608         std   22, FCS_h2(26)
609         // stats only
610         ld    24, .tocent__vgPlain_stats__n_xIndir_hits2_32@toc(2)
611         lwz   25, 0(24)
612         addi  25, 25, 1
613         stw   25, 0(24)
614         // goto old .host2 a.k.a. new .host1
615         mtctr 23
616         bctr
617         /*NOTREACHED*/
619 3:      // try way 3
620         ld    24, FCS_g3(26)
621         cmpd  24, 20   // cmp against .guest3
622         bne   4f
623         // hit at way 3; swap upwards
624         ld    21, FCS_g2(26)
625         ld    22, FCS_h2(26)
626         ld    23, FCS_h3(26)
627         std   20, FCS_g2(26)
628         std   23, FCS_h2(26)
629         std   21, FCS_g3(26)
630         std   22, FCS_h3(26)
631         // stats only
632         ld    24, .tocent__vgPlain_stats__n_xIndir_hits3_32@toc(2)
633         lwz   25, 0(24)
634         addi  25, 25, 1
635         stw   25, 0(24)
636         // goto old .host3 a.k.a. new .host2
637         mtctr 23
638         bctr
639         /*NOTREACHED*/
641 4:      // fast lookup failed:
642         /* stats only */
643         ld    24, .tocent__vgPlain_stats__n_xIndir_misses_32@toc(2)
644         lwz   25, 0(24)
645         addi  25 ,25, 1
646         stw   25 ,0(24)
648         li    6,VG_TRC_INNER_FASTMISS
649         li    7,0
650         b     .postamble
651         /*NOTREACHED*/
652 #if _CALL_ELF == 2
653         .size VG_(disp_cp_xindir),.-VG_(disp_cp_xindir)
654 #endif
656 /* ------ Assisted jump ------ */
657 .section ".text"
658         .align   2
659         .globl   VG_(disp_cp_xassisted)
660 #if _CALL_ELF == 2
661         .type VG_(disp_cp_xassisted),@function
662 VG_(disp_cp_xassisted):
663 #else
664         .section ".opd","aw"
665         .align   3
666 VG_(disp_cp_xassisted):
667         .quad    .VG_(disp_cp_xassisted),.TOC.@tocbase,0
668         .previous
669 #endif
670 #if  _CALL_ELF == 2
671 0:      addis 2, 12,.TOC.-0b@ha
672         addi  2,2,.TOC.-0b@l
673         .localentry VG_(disp_cp_xassisted), .-VG_(disp_cp_xassisted)
674 #endif
675         .type    .VG_(disp_cp_xassisted),@function
676         .globl   .VG_(disp_cp_xassisted)
677 .VG_(disp_cp_xassisted):
678         /* r31 contains the TRC */
679         mr      6,31
680         li      7,0
681         b       .postamble
682 #if _CALL_ELF == 2
683         .size VG_(disp_cp_xassisted),.-VG_(disp_cp_xassisted)
684 #endif
686 /* ------ Event check failed ------ */
687         .section ".text"
688         .align   2
689         .globl   VG_(disp_cp_evcheck_fail)
690 #if _CALL_ELF == 2
691         .type VG_(disp_cp_evcheck_fail),@function
692 VG_(disp_cp_evcheck_fail):
693 #else
694         .section ".opd","aw"
695         .align   3
696 VG_(disp_cp_evcheck_fail):
697         .quad    .VG_(disp_cp_evcheck_fail),.TOC.@tocbase,0
698         .previous
699 #endif
700 #if  _CALL_ELF == 2
701 0:      addis 2, 12,.TOC.-0b@ha
702         addi  2,2,.TOC.-0b@l
703         .localentry VG_(disp_cp_evcheck_fail), .-VG_(disp_cp_evcheck_fail)
704 #endif
705         .type    .VG_(disp_cp_evcheck_fail),@function
706         .globl   .VG_(disp_cp_evcheck_fail)
707 .VG_(disp_cp_evcheck_fail):
708         li      6,VG_TRC_INNER_COUNTERZERO
709         li      7,0
710         b       .postamble
711 #if  _CALL_ELF == 2
712        .size VG_(disp_cp_evcheck_fail),.-VG_(disp_cp_evcheck_fail)
713 #endif
715 .size .VG_(disp_run_translations), .-.VG_(disp_run_translations)
717 #endif // defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
719 /* Let the linker know we don't need an executable stack */
720 MARK_STACK_NO_EXEC
722 /*--------------------------------------------------------------------*/
723 /*--- end                                                          ---*/
724 /*--------------------------------------------------------------------*/