5
lang/gcc/11 fix dlang fibers, unbreak powerpc64
source link: https://marc.info/?l=openbsd-ports&m=163391866107756&w=2
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
'lang/gcc/11 fix dlang fibers, unbreak powerpc64'
[prev in list] [next in list] [prev in thread] [next in thread] List: openbsd-ports Subject: lang/gcc/11 fix dlang fibers, unbreak powerpc64 From: George Koehler <kernigh () gmail ! com> Date: 2021-10-11 2:17:03 Message-ID: 20211010221703.fbb0d09bc5813148f474ec67 () gmail ! com [Download RAW message or body] Hello, This diff unbreaks lang/gcc/11 on powerpc64, adds dlang to powerpc64, and changes D's fibers on all archs; ok to commit? gcc 11 was broken in powerpc64 bulks, http://build-failures.rhaalovely.net/powerpc64/2021-09-27/lang/gcc/11,-c++.log Unbreak by adding gnu-user.h (patch-gcc_config_gcc). Also add PFRAG.powerpc64-main, to be like other archs; this PFRAG is still missing in gcc 8. The rest of this diff is for the D programming language, with parts for powerpc64, 32-bit powerpc, and all archs. Add powerpc64 to ONLY_FOR_ARCHS-dlang. Add enough PPC64 code to libphobos to complete the build. (I might be the 1st person to try D on powerpc64.) This PPC64 code is trivial, except the code for fibers (https://tour.dlang.org/tour/en/multithreading/fibers), where I wrote some powerpc64 asm. I found 2 other problems with fibers: 1. The fiber crashed SIGSEGV, because it didn't pass MAP_STACK to mmap(2). The fix is easy, and affects all archs. 2. The existing code for 32-bit powerpc was wrong; it saved the link register at 8(%r1), should be 4(%r1), and allowed signal handlers to clobber the values saved below %r1. I change almost every line of 32-bit asm as I add the 64-bit asm. The attachment "dfiber.d" is my fiber example. I can run it on macppc and powerpc64, and you should be able to run it on any dlang arch, $ egdc -o dfiber dfiber.d $ ./dfiber adder(1, 1, 1)() 1, 1, 3, 5, 9, 15, 25, 41, 67, 109, 177, 287, 465, 753 But on macppc, egdc works only with ld.bfd, $ ln -s /usr/bin/ld.bfd ld $ PATH=$PWD:$PATH $ egdc -o dfiber dfiber.d Bump REVISION-dlang for libphobos. Don't bump REVISION, because the other changes (patch-gcc_config_gcc, and %%powerpc64%% in PLIST-main) affect only powerpc64, which was broken. --George Index: Makefile =================================================================== RCS file: /cvs/ports/lang/gcc/11/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- Makefile 24 Aug 2021 18:13:19 -0000 1.3 +++ Makefile 10 Oct 2021 23:40:00 -0000 @@ -12,7 +12,7 @@ ONLY_FOR_ARCHS = aarch64 alpha amd64 arm powerpc powerpc64 sparc64 ONLY_FOR_ARCHS-ada = amd64 i386 mips64 powerpc -ONLY_FOR_ARCHS-dlang = aarch64 amd64 arm i386 powerpc +ONLY_FOR_ARCHS-dlang = aarch64 amd64 arm i386 powerpc powerpc64 DPB_PROPERTIES = parallel @@ -20,6 +20,7 @@ V = 11.2.0 FULL_VERSION = $V FULL_PKGVERSION = $V REVISION = 0 +REVISION-dlang = 1 ADASTRAP-amd64 = adastrap-amd64-$V-0.tar.xz ADASTRAP-arm = adastrap-arm-4.9.4-0.tar.xz Index: patches/patch-gcc_config_gcc =================================================================== RCS file: /cvs/ports/lang/gcc/11/patches/patch-gcc_config_gcc,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-gcc_config_gcc --- patches/patch-gcc_config_gcc 15 Aug 2021 18:42:10 -0000 1.1.1.1 +++ patches/patch-gcc_config_gcc 10 Oct 2021 23:40:00 -0000 @@ -123,7 +123,7 @@ Index: gcc/config.gcc + ;; +powerpc64*-*-openbsd*) + tm_defines="${tm_defines} DEFAULT_FLAG_PIE=2" -+ tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h \ openbsd-libpthread.h freebsd-spec.h rs6000/sysv4.h rs6000/default64.h \ rs6000/openbsd64.h" ++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h openbsd.h \ openbsd-stdint.h openbsd-libpthread.h freebsd-spec.h rs6000/sysv4.h \ rs6000/default64.h rs6000/openbsd64.h" + tmake_file="${tmake_file} \ rs6000/t-openbsd64" + extra_options="${extra_options} rs6000/sysv4.opt \ rs6000/linux64.opt openbsd.opt" + ;; Index: patches/patch-libphobos_configure =================================================================== RCS file: patches/patch-libphobos_configure diff -N patches/patch-libphobos_configure --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libphobos_configure 10 Oct 2021 23:40:00 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ + +Add fiber asm for powerpc64, to avoid +"configure: error: setcontext required but not found" + +Index: libphobos/configure +--- libphobos/configure.orig ++++ libphobos/configure +@@ -15196,7 +15196,7 @@ fi + aarch64* | \ + arm* | \ + i[34567]86|x86_64 | \ +- powerpc) ++ powerpc*) + druntime_fiber_asm_external=yes + ;; + esac Index: patches/patch-libphobos_libdruntime_config_powerpc_switchcontext_S =================================================================== RCS file: patches/patch-libphobos_libdruntime_config_powerpc_switchcontext_S diff -N patches/patch-libphobos_libdruntime_config_powerpc_switchcontext_S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libphobos_libdruntime_config_powerpc_switchcontext_S 10 Oct 2021 \ 23:40:00 -0000 @@ -0,0 +1,224 @@ +$OpenBSD$ + +Add fibers for powerpc64 ELFv2, and fix fibers for 32-bit powerpc ELF. +The old code was for some other platform (AIX?), not BSD nor Linux. +This patch fixes OpenBSD but might break the other platform. + +This patch doesn't save altivec registers v20..v31, because gcc +disables altivec by default. + +Index: libphobos/libdruntime/config/powerpc/switchcontext.S +--- libphobos/libdruntime/config/powerpc/switchcontext.S.orig ++++ libphobos/libdruntime/config/powerpc/switchcontext.S +@@ -24,7 +24,210 @@ see the files COPYING3 and COPYING.RUNTIME respectivel + + #include "../common/threadasm.S" + +-#if !defined(__PPC64__) && !defined(__MACH__) ++#if defined(__ELF__) ++ ++/** ++ * Performs a context switch. ++ * ++ * r3 - old context pointer ++ * r4 - new context pointer ++ * ++ */ ++ .text ++ .globl CSYM(fiber_switchContext) ++ .type CSYM(fiber_switchContext), @function ++ .align 2 ++CSYM(fiber_switchContext): ++ .cfi_startproc ++#ifdef __PPC64__ ++ /* ELF64 - Save linkage area */ ++ mflr 0 ++ mfcr 5 ++ std 0, 16(1) ++ stw 5, 8(1) ++ ++ /* Make room for 18 GPRs, 18 FPRs */ ++ addi 6, 1, -18 * 8 ++ addi 1, 6, -18 * 8 ++ ++ /* Save GPRs */ ++ std 31, (17 * 8)(6) ++ std 30, (16 * 8)(6) ++ std 29, (15 * 8)(6) ++ std 28, (14 * 8)(6) ++ std 27, (13 * 8)(6) ++ std 26, (12 * 8)(6) ++ std 25, (11 * 8)(6) ++ std 24, (10 * 8)(6) ++ std 23, (9 * 8)(6) ++ std 22, (8 * 8)(6) ++ std 21, (7 * 8)(6) ++ std 20, (6 * 8)(6) ++ std 19, (5 * 8)(6) ++ std 18, (4 * 8)(6) ++ std 17, (3 * 8)(6) ++ std 16, (2 * 8)(6) ++ std 15, (1 * 8)(6) ++ std 14, (0 * 8)(6) ++#else ++ /* ELF32 - Save linkage area */ ++ mflr 0 ++ mfcr 5 ++ stw 0, 4(1) ++ ++ /* Make room for 18 GPRs, CR, 18 FPRs; rounding up so r1 stays ++ 16-byte aligned. We must move r1, because ELF32 allows ++ signals to clobber below r1 (no red zone). */ ++ addi 6, 1, -20 * 4 ++ addi 1, 6, -18 * 8 ++ ++ /* Save GPRs */ ++ stw 31, (19 * 4)(6) ++ stw 30, (18 * 4)(6) ++ stw 29, (17 * 4)(6) ++ stw 28, (16 * 4)(6) ++ stw 27, (15 * 4)(6) ++ stw 26, (14 * 4)(6) ++ stw 25, (13 * 4)(6) ++ stw 24, (12 * 4)(6) ++ stw 23, (11 * 4)(6) ++ stw 22, (10 * 4)(6) ++ stw 21, (9 * 4)(6) ++ stw 20, (8 * 4)(6) ++ stw 19, (7 * 4)(6) ++ stw 18, (6 * 4)(6) ++ stw 17, (5 * 4)(6) ++ stw 16, (4 * 4)(6) ++ stw 15, (3 * 4)(6) ++ stw 14, (2 * 4)(6) ++ ++ /* Save condition register */ ++ stw 5, 0(6) ++#endif ++ ++ /* ELF32 and ELF64 - Save FPRs */ ++ stfd 31, (-1 * 8)(6) ++ stfd 30, (-2 * 8)(6) ++ stfd 29, (-3 * 8)(6) ++ stfd 28, (-4 * 8)(6) ++ stfd 27, (-5 * 8)(6) ++ stfd 26, (-6 * 8)(6) ++ stfd 25, (-7 * 8)(6) ++ stfd 24, (-8 * 8)(6) ++ stfd 23, (-9 * 8)(6) ++ stfd 22, (-10 * 8)(6) ++ stfd 21, (-11 * 8)(6) ++ stfd 20, (-12 * 8)(6) ++ stfd 19, (-13 * 8)(6) ++ stfd 18, (-14 * 8)(6) ++ stfd 17, (-15 * 8)(6) ++ stfd 16, (-16 * 8)(6) ++ stfd 15, (-17 * 8)(6) ++ stfd 14, (-18 * 8)(6) ++ ++ /* Save r6 in the old context, since we do not want the GC to ++ scan the floating point registers. */ ++ ++#ifdef __PPC64__ ++ /* ELF64 - Update the old stack pointer */ ++ std 6, 0(3) ++ ++ /* Set new stack pointer */ ++ addi 1, 4, -18 * 8 ++ ++ /* Set condition and link register. If lr is &fiber_entryPoint, ++ then ELFv2 ABI needs the same address in r12. */ ++ lwz 5, (18 * 8 + 8)(4) ++ ld 12, (18 * 8 + 16)(4) ++ mtcr 5 ++ mtlr 12 ++#else ++ /* ELF32 - Update the old stack pointer */ ++ stw 6, 0(3) ++ ++ /* Set new stack pointer */ ++ addi 1, 4, -18 * 8 ++ ++ /* Set condition and link register */ ++ lwz 5, 0(4) ++ lwz 12, (20 * 4 + 4)(4) ++ mtcr 5 ++ mtlr 12 ++#endif ++ ++ /* PPC32 and PPC64 - Restore FPRs */ ++ lfd 14, (-18 * 8)(4) ++ lfd 15, (-17 * 8)(4) ++ lfd 16, (-16 * 8)(4) ++ lfd 17, (-15 * 8)(4) ++ lfd 18, (-14 * 8)(4) ++ lfd 19, (-13 * 8)(4) ++ lfd 20, (-12 * 8)(4) ++ lfd 21, (-11 * 8)(4) ++ lfd 22, (-10 * 8)(4) ++ lfd 23, (-9 * 8)(4) ++ lfd 24, (-8 * 8)(4) ++ lfd 25, (-7 * 8)(4) ++ lfd 26, (-6 * 8)(4) ++ lfd 27, (-5 * 8)(4) ++ lfd 28, (-4 * 8)(4) ++ lfd 29, (-3 * 8)(4) ++ lfd 30, (-2 * 8)(4) ++ lfd 31, (-1 * 8)(4) ++ ++#ifdef __PPC64__ ++ /* PPC64 - Restore GPRs */ ++ ld 14, (0 * 8)(4) ++ ld 15, (1 * 8)(4) ++ ld 16, (2 * 8)(4) ++ ld 17, (3 * 8)(4) ++ ld 18, (4 * 8)(4) ++ ld 19, (5 * 8)(4) ++ ld 20, (6 * 8)(4) ++ ld 21, (7 * 8)(4) ++ ld 22, (8 * 8)(4) ++ ld 23, (9 * 8)(4) ++ ld 24, (10 * 8)(4) ++ ld 25, (11 * 8)(4) ++ ld 26, (12 * 8)(4) ++ ld 27, (13 * 8)(4) ++ ld 28, (14 * 8)(4) ++ ld 29, (15 * 8)(4) ++ ld 30, (16 * 8)(4) ++ ld 31, (17 * 8)(4) ++ ++ /* Return and switch context */ ++ addi 1, 4, 18 * 8 ++ blr ++#else ++ /* PPC32 - Restore GPRs */ ++ lwz 14, (2 * 4)(4) ++ lwz 15, (3 * 4)(4) ++ lwz 16, (4 * 4)(4) ++ lwz 17, (5 * 4)(4) ++ lwz 18, (6 * 4)(4) ++ lwz 19, (7 * 4)(4) ++ lwz 20, (8 * 4)(4) ++ lwz 21, (9 * 4)(4) ++ lwz 22, (10 * 4)(4) ++ lwz 23, (11 * 4)(4) ++ lwz 24, (12 * 4)(4) ++ lwz 25, (13 * 4)(4) ++ lwz 26, (14 * 4)(4) ++ lwz 27, (15 * 4)(4) ++ lwz 28, (16 * 4)(4) ++ lwz 29, (17 * 4)(4) ++ lwz 30, (18 * 4)(4) ++ lwz 31, (19 * 4)(4) ++ ++ /* Return and switch context */ ++ addi 1, 4, 20 * 4 ++ blr ++#endif ++ .cfi_endproc ++ .size CSYM(fiber_switchContext),.-CSYM(fiber_switchContext) ++ ++#elif !defined(__PPC64__) && !defined(__MACH__) + + /** + * Performs a context switch. Index: patches/patch-libphobos_libdruntime_core_sys_posix_config_d =================================================================== RCS file: patches/patch-libphobos_libdruntime_core_sys_posix_config_d diff -N patches/patch-libphobos_libdruntime_core_sys_posix_config_d --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libphobos_libdruntime_core_sys_posix_config_d 10 Oct 2021 23:40:00 \ -0000 @@ -0,0 +1,18 @@ +$OpenBSD$ + +Index: libphobos/libdruntime/core/sys/posix/config.d +--- libphobos/libdruntime/core/sys/posix/config.d.orig ++++ libphobos/libdruntime/core/sys/posix/config.d +@@ -169,6 +169,12 @@ else version (OpenBSD) + enum _STACKALIGNBYTES = 15; + enum _MAX_PAGE_SHIFT = 12; + } ++ else version (PPC64) ++ { ++ enum _ALIGNBYTES = 7; ++ enum _STACKALIGNBYTES = 15; ++ enum _MAX_PAGE_SHIFT = 12; ++ } + else version (SPARC64) + { + enum _ALIGNBYTES = 15; Index: patches/patch-libphobos_libdruntime_core_sys_posix_setjmp_d =================================================================== RCS file: /cvs/ports/lang/gcc/11/patches/patch-libphobos_libdruntime_core_sys_posix_setjmp_d,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-libphobos_libdruntime_core_sys_posix_setjmp_d --- patches/patch-libphobos_libdruntime_core_sys_posix_setjmp_d 15 Aug 2021 18:42:11 \ -0000 1.1.1.1 +++ patches/patch-libphobos_libdruntime_core_sys_posix_setjmp_d 10 Oct 2021 23:40:00 \ -0000 @@ -3,14 +3,25 @@ $OpenBSD: patch-libphobos_libdruntime_co Index: libphobos/libdruntime/core/sys/posix/setjmp.d --- libphobos/libdruntime/core/sys/posix/setjmp.d.orig +++ libphobos/libdruntime/core/sys/posix/setjmp.d -@@ -277,6 +277,10 @@ else version (OpenBSD) +@@ -265,6 +265,10 @@ else version (OpenBSD) { - enum _JBLEN = 14; + enum _JBLEN = 100; } ++ else version (PPC64) ++ { ++ enum _JBLEN = 208; ++ } + else version (MIPS64) + { + enum _JBLEN = 83; +@@ -276,6 +280,10 @@ else version (OpenBSD) + else version (SPARC64) + { + enum _JBLEN = 14; ++ } + else version (AArch64) + { + enum _JBLEN = 64; -+ } + } else static assert(0); - Index: patches/patch-libphobos_libdruntime_core_sys_posix_sys_mman_d =================================================================== RCS file: patches/patch-libphobos_libdruntime_core_sys_posix_sys_mman_d diff -N patches/patch-libphobos_libdruntime_core_sys_posix_sys_mman_d --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libphobos_libdruntime_core_sys_posix_sys_mman_d 10 Oct 2021 \ 23:40:00 -0000 @@ -0,0 +1,15 @@ +$OpenBSD$ + +Fiber needs mmap(2) MAP_STACK. + +Index: libphobos/libdruntime/core/sys/posix/sys/mman.d +--- libphobos/libdruntime/core/sys/posix/sys/mman.d.orig ++++ libphobos/libdruntime/core/sys/posix/sys/mman.d +@@ -460,6 +460,7 @@ else version (OpenBSD) + enum MAP_PRIVATE = 0x0002; + enum MAP_FIXED = 0x0010; + enum MAP_ANON = 0x1000; ++ enum MAP_STACK = 0x4000; + + enum MAP_FAILED = cast(void*)-1; + Index: patches/patch-libphobos_libdruntime_core_sys_posix_ucontext_d =================================================================== RCS file: patches/patch-libphobos_libdruntime_core_sys_posix_ucontext_d diff -N patches/patch-libphobos_libdruntime_core_sys_posix_ucontext_d --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libphobos_libdruntime_core_sys_posix_ucontext_d 10 Oct 2021 \ 23:40:00 -0000 @@ -0,0 +1,31 @@ +$OpenBSD$ + +Index: libphobos/libdruntime/core/sys/posix/ucontext.d +--- libphobos/libdruntime/core/sys/posix/ucontext.d.orig ++++ libphobos/libdruntime/core/sys/posix/ucontext.d +@@ -1381,6 +1381,25 @@ else version (OpenBSD) + trapframe sc_frame; + } + } ++ else version (PPC64) ++ { ++ struct sigcontext ++ { ++ c_long sc_cookie; ++ int sc_mask; ++ c_long[32] sc_reg; ++ c_long sc_lr; ++ c_long sc_cr; ++ c_long sc_xer; ++ c_long sc_ctr; ++ c_long sc_pc; ++ c_long sc_ps; ++ c_long sc_vrsave; ++ ulong[2][64] sc_vsx; // __uint128_t ++ ulong sc_fpscr; ++ ulong sc_vcsr; ++ } ++ } + else version (SPARC64) + { + struct sigcontext Index: patches/patch-libphobos_libdruntime_core_thread_fiber_d =================================================================== RCS file: patches/patch-libphobos_libdruntime_core_thread_fiber_d diff -N patches/patch-libphobos_libdruntime_core_thread_fiber_d --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libphobos_libdruntime_core_thread_fiber_d 10 Oct 2021 23:40:00 \ -0000 @@ -0,0 +1,82 @@ +$OpenBSD$ + +Fiber needs mmap(2) MAP_STACK. + +Add fibers for powerpc64 ELFv2, and fix fibers for 32-bit powerpc ELF. +The old code was for some other platform (AIX?), not BSD nor Linux. +This patch fixes OpenBSD but might break the other platform. + +Index: libphobos/libdruntime/core/thread/fiber.d +--- libphobos/libdruntime/core/thread/fiber.d.orig ++++ libphobos/libdruntime/core/thread/fiber.d +@@ -125,6 +125,7 @@ private + { + version = AsmPPC_Posix; + version = AsmExternal; ++ version = AlignFiberStackTo16Byte; + } + } + else version (PPC64) +@@ -137,6 +138,8 @@ private + } + else version (Posix) + { ++ version = AsmPPC_Posix; ++ version = AsmExternal; + version = AlignFiberStackTo16Byte; + } + } +@@ -1033,10 +1036,13 @@ class Fiber (private) + // Allocate more for the memory guard + sz += guardPageSize; + ++ int mmap_flags = MAP_PRIVATE | MAP_ANON; ++ version (OpenBSD) ++ mmap_flags |= MAP_STACK; + m_pmem = mmap( null, + sz, + PROT_READ | PROT_WRITE, +- MAP_PRIVATE | MAP_ANON, ++ mmap_flags, + -1, + 0 ); + if ( m_pmem == MAP_FAILED ) +@@ -1338,27 +1344,22 @@ class Fiber (private) + } + else version (AsmPPC_Posix) + { +- version (StackGrowsDown) +- { +- pstack -= int.sizeof * 5; +- } +- else +- { +- pstack += int.sizeof * 5; +- } ++ version (StackGrowsDown) {} else static assert (false); + +- push( cast(size_t) &fiber_entryPoint ); // link register +- push( 0x00000000 ); // control register +- push( 0x00000000 ); // old stack pointer +- +- // GPR values +- version (StackGrowsDown) ++ version (PPC64) + { +- pstack -= int.sizeof * 20; ++ pstack -= size_t.sizeof * 5; ++ push( cast(size_t) &fiber_entryPoint); // link register ++ push( 0x00000000_00000000 ); // condition register ++ push( 0x00000000_00000000 ); // old stack pointer ++ pstack -= size_t.sizeof * 18; // GPRs + } + else + { +- pstack += int.sizeof * 20; ++ pstack -= size_t.sizeof * 6; ++ push( cast(size_t) &fiber_entryPoint); // link register ++ push( 0x00000000 ); // old stack pointer ++ pstack -= size_t.sizeof * 20; // GPRs and CR + } + + assert( (cast(size_t) pstack & 0x0f) == 0 ); Index: pkg/PFRAG.powerpc64-main =================================================================== RCS file: pkg/PFRAG.powerpc64-main diff -N pkg/PFRAG.powerpc64-main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PFRAG.powerpc64-main 10 Oct 2021 23:40:00 -0000 @@ -0,0 +1,42 @@ +@comment $OpenBSD: PFRAG.powerpc-main,v 1.1.1.1 2021/08/15 18:42:12 pascal Exp $ +lib/gcc/${CONFIG}/${V}/include/altivec.h +lib/gcc/${CONFIG}/${V}/include/amo.h +lib/gcc/${CONFIG}/${V}/include/bmi2intrin.h +lib/gcc/${CONFIG}/${V}/include/bmiintrin.h +lib/gcc/${CONFIG}/${V}/include/emmintrin.h +lib/gcc/${CONFIG}/${V}/include/htmintrin.h +lib/gcc/${CONFIG}/${V}/include/htmxlintrin.h +lib/gcc/${CONFIG}/${V}/include/mm_malloc.h +lib/gcc/${CONFIG}/${V}/include/mmintrin.h +lib/gcc/${CONFIG}/${V}/include/pmmintrin.h +lib/gcc/${CONFIG}/${V}/include/ppc-asm.h +lib/gcc/${CONFIG}/${V}/include/ppu_intrinsics.h +lib/gcc/${CONFIG}/${V}/include/si2vmx.h +lib/gcc/${CONFIG}/${V}/include/smmintrin.h +lib/gcc/${CONFIG}/${V}/include/spu2vmx.h +lib/gcc/${CONFIG}/${V}/include/tgmath.h +lib/gcc/${CONFIG}/${V}/include/tmmintrin.h +lib/gcc/${CONFIG}/${V}/include/unwind.h +lib/gcc/${CONFIG}/${V}/include/vec_types.h +lib/gcc/${CONFIG}/${V}/include/x86intrin.h +lib/gcc/${CONFIG}/${V}/include/xmmintrin.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/dbxelf.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/elfos.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/freebsd-spec.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/gnu-user.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/initfini-array.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/openbsd-libpthread.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/openbsd-stdint.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/openbsd.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/ +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/default64.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/openbsd64.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/option-defaults.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/rs6000-builtin.def +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/rs6000-cpus.def +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/rs6000-modes.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/rs6000-opts.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/rs6000-protos.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/rs6000.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/rs6000/sysv4.h +lib/gcc/${CONFIG}/${V}/plugin/include/config/vxworks-dummy.h Index: pkg/PLIST-main =================================================================== RCS file: /cvs/ports/lang/gcc/11/pkg/PLIST-main,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 PLIST-main --- pkg/PLIST-main 15 Aug 2021 18:42:13 -0000 1.1.1.1 +++ pkg/PLIST-main 10 Oct 2021 23:40:00 -0000 @@ -109,6 +109,7 @@ lib/gcc/${CONFIG}/${V}/plugin/include/co %%mips64%% %%mips64el%% %%powerpc%% +%%powerpc64%% %%sparc64%% %%X86%% lib/gcc/${CONFIG}/${V}/plugin/include/configargs.h ["dfiber.d" (text/plain)] import core.thread.fiber; import std.algorithm; import std.range; import std.stdio; // Make an integer sequence a, b, a + b + c, ... int delegate() adder(int a, int b, int c) { int next; void yield(int i) { next = i; Fiber.yield(); } auto fib = new Fiber({ writefln("adder(%d, %d, %d)()", a, b, c); yield(a); yield(b); for (;;) { yield(next = a + b + c); a = b; b = next; } }); return {fib.call(); return next;}; } // Show the first 15 Leonardo numbers. void main() { auto leonardo = adder(1, 1, 1); writefln("%(%d, %)", iota(1, 15).map!(i => leonardo())); } [prev in list] [next in list] [prev in thread] [next in thread]
About | News | Add a list | Sponsored by KoreLogic
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK