Porting GHC to Barrelfish: rts.patch
| File rts.patch, 105.1 KB (added by rmcilroy, 3 years ago) |
|---|
-
aclocal.m4
Wed Aug 11 10:54:01 BST 2010 rmcilroy@microsoft.com * Checkpoint GHC on Barrelfish work Now at the stage where we can build and run a helloworld Haskell application on Barrelfish. Mon Aug 9 13:42:43 BST 2010 rmcilroy@microsoft.com * missing files from previous checkpoint of barrelfish port Mon Aug 9 10:49:02 BST 2010 rmcilroy@microsoft.com * Checkpoint Barrelfish compatability changes Thu Jul 29 14:53:26 BST 2010 rmcilroy@microsoft.com * Changes to get ghc building against Barrelfish diff -rN -u old-ghc_bf/aclocal.m4 new-ghc_bf-2/aclocal.m4
old new 1045 1045 AC_DEFUN([FP_CHECK_TIMER_CREATE], 1046 1046 [AC_CACHE_CHECK([for a working timer_create(CLOCK_REALTIME)], 1047 1047 [fptools_cv_timer_create_works], 1048 [AC_ TRY_RUN([1048 [AC_RUN_IFELSE([ 1049 1049 #include <stdio.h> 1050 1050 #ifdef HAVE_STDLIB_H 1051 1051 #include <stdlib.h> … … 1160 1160 } 1161 1161 ], 1162 1162 [fptools_cv_timer_create_works=yes], 1163 [fptools_cv_timer_create_works=no], 1163 1164 [fptools_cv_timer_create_works=no]) 1164 1165 ]) 1165 1166 case $fptools_cv_timer_create_works in … … 1344 1345 $2="linux" 1345 1346 ;; 1346 1347 # As far as I'm aware, none of these have relevant variants 1347 freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku )1348 freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku|barrelfish) 1348 1349 $2="$1" 1349 1350 ;; 1350 1351 *) -
compiler/main/DriverPipeline.hs
diff -rN -u old-ghc_bf/compiler/main/DriverPipeline.hs new-ghc_bf-2/compiler/main/DriverPipeline.hs
old new 1551 1551 1552 1552 let 1553 1553 thread_opts | WayThreaded `elem` ways = [ 1554 #if !defined(mingw32_TARGET_OS) && !defined(freebsd_TARGET_OS) && !defined(haiku_TARGET_OS) 1554 #if !defined(mingw32_TARGET_OS) && !defined(freebsd_TARGET_OS) && !defined(haiku_TARGET_OS) && !defined(barrelfish_TARGET_OS) 1555 1555 "-lpthread" 1556 1556 #endif 1557 1557 #if defined(osf3_TARGET_OS) -
config.sub
diff -rN -u old-ghc_bf/config.sub new-ghc_bf-2/config.sub
old new 4 4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 5 5 # Free Software Foundation, Inc. 6 6 7 timestamp='20 08-09-08'7 timestamp='2010-07-22' 8 8 9 9 # This file is (in principle) common to ALL GNU software. 10 10 # The presence of a machine in this file suggests that SOME GNU software … … 1407 1407 -dicos*) 1408 1408 os=-dicos 1409 1409 ;; 1410 -barrelfish*) 1411 os=-barrelfish 1412 ;; 1410 1413 -none) 1411 1414 ;; 1412 1415 *) -
configure.ac
diff -rN -u old-ghc_bf/configure.ac new-ghc_bf-2/configure.ac
old new 351 351 352 352 checkOS() { 353 353 case $1 in 354 linux|freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku )354 linux|freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku|barrelfish) 355 355 ;; 356 356 *) 357 357 echo "Unknown OS '$1'" … … 746 746 dnl ** The following have been verified to be used in ghc/, but might be used somewhere else, too. 747 747 AC_CHECK_FUNCS([getclock getrusage gettimeofday setitimer siginterrupt sysconf times ctime_r sched_setaffinity setlocale]) 748 748 749 AC_ TRY_RUN([749 AC_RUN_IFELSE([ 750 750 #include <sys/types.h> 751 751 #include <sys/time.h> 752 752 int main(void) { … … 756 756 tval.it_interval = tval.it_value; 757 757 return setitimer(ITIMER_VIRTUAL, &tval, (void*)0) != 0; 758 758 } 759 ],[AC_DEFINE([HAVE_SETITIMER_VIRTUAL], [1], [Define to 1 if setitimer accepts ITIMER_VIRTUAL, 0 else.])] )759 ],[AC_DEFINE([HAVE_SETITIMER_VIRTUAL], [1], [Define to 1 if setitimer accepts ITIMER_VIRTUAL, 0 else.])],[AC_DEFINE([HAVE_SETITIMER_VIRTUAL], [0], [Define to 1 if setitimer accepts ITIMER_VIRTUAL, 0 else.])],[AC_DEFINE([HAVE_SETITIMER_VIRTUAL], [0], [Define to 1 if setitimer accepts ITIMER_VIRTUAL, 0 else.])]) 760 760 761 761 dnl ** On OS X 10.4 (at least), time.h doesn't declare ctime_r if 762 762 dnl ** _POSIX_C_SOURCE is defined -
configure.bf
diff -rN -u old-ghc_bf/configure.bf new-ghc_bf-2/configure.bf
old new 1 #! /bin/bash 2 3 ./configure --build=x86_64-unknown-linux --host=x86_64-unknown-barrelfish --target=x86_64-unknown-barrelfish --x-includes=/home/rmcilroy/barrelfish.ghc/include/ --x-libraries=/home/rmcilroy/barrelfish.ghc/build/x86_64/lib/ CFLAGS="-fno-builtin -nostdinc -m64 -mno-red-zone -fPIE -fno-stack-protector -U__linux__ -imacros ${BF_ROOT}/include/deputy/nodeputy.h -DBARRELFISH -DMAX_CPUS=64 -DCONFIG_INTERCONNECT_DRIVER_LMP -DCONFIG_INTERCONNECT_DRIVER_UMP -DCONFIG_FLOUNDER_BACKEND_LMP -DCONFIG_FLOUNDER_BACKEND_UMP -g -I${BF_ROOT}/include -I${BF_ROOT}/include/arch/x86_64 -I${BF_BUILD_DIR}/include " CPPFLAGS="-fno-builtin -nostdinc -m64 -mno-red-zone -fPIE -fno-stack-protector -U__linux__ -imacros ${BF_ROOT}/include/deputy/nodeputy.h -DBARRELFISH -DMAX_CPUS=64 -DCONFIG_INTERCONNECT_DRIVER_LMP -DCONFIG_INTERCONNECT_DRIVER_UMP -DCONFIG_FLOUNDER_BACKEND_LMP -DCONFIG_FLOUNDER_BACKEND_UMP -g -I${BF_ROOT}/include -I${BF_ROOT}/include/arch/x86_64 -I${BF_BUILD_DIR}/include " LDFLAGS="${BF_BUILD_DIR}/lib/crt0.o ${BF_BUILD_DIR}/errors/errno.o -Wl,-section-start,.data.rel.ro=0x800000 -Wl,-z,max-page-size=0x1000 -fno-builtin -nostdlib -m64 -L${BF_BUILD_DIR}/lib/ -Wl,--start-group -lmsun -lposixcompat -lvfs -lnfs -llwip -ltimer -lbarrelfish -lc" -
ghc/ghc.mk
diff -rN -u old-ghc_bf/ghc/ghc.mk new-ghc_bf-2/ghc/ghc.mk
old new 70 70 ghc_stage1_HC_OPTS += -package $(compiler_PACKAGE)-$(compiler_stage1_VERSION) 71 71 ghc_stage2_HC_OPTS += -package $(compiler_PACKAGE)-$(compiler_stage2_VERSION) 72 72 ghc_stage3_HC_OPTS += -package $(compiler_PACKAGE)-$(compiler_stage3_VERSION) 73 ifneq "$(HostOS_CPP)" "barrelfish" 73 74 ghc_stage2_HC_OPTS += -package haskeline 74 75 ghc_stage3_HC_OPTS += -package haskeline 76 endif 75 77 76 78 ghc_language_extension_flags = -XCPP \ 77 79 -XPatternGuards \ -
ghc/ghc.wrapper
diff -rN -u old-ghc_bf/ghc/ghc.wrapper new-ghc_bf-2/ghc/ghc.wrapper
old new 1 exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" $ {1+"$@"}1 exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" $builtInArgs ${1+"$@"} -
ghc.mk
diff -rN -u old-ghc_bf/ghc.mk new-ghc_bf-2/ghc.mk
old new 338 338 $(eval $(call addPackage,utf8-string)) 339 339 $(eval $(call addPackage,xhtml)) 340 340 341 ifneq "$(HostOS_CPP)" "barrelfish" 341 342 $(eval $(call addPackage,terminfo,($$(Windows),NO))) 342 343 343 344 $(eval $(call addPackage,haskeline)) 345 endif 344 346 345 347 $(foreach pkg,$(EXTRA_PACKAGES),$(eval $(call addPackage,$(pkg)))) 346 348 -
includes/DerivedConstants.h.bf
diff -rN -u old-ghc_bf/includes/DerivedConstants.h.bf new-ghc_bf-2/includes/DerivedConstants.h.bf
old new 1 /* This file is created automatically. Do not edit by hand.*/ 2 3 #define STD_HDR_SIZE 1 4 #define PROF_HDR_SIZE 2 5 #define BLOCK_SIZE 4096 6 #define MBLOCK_SIZE 1048576 7 8 9 #define OFFSET_StgRegTable_rR1 0 10 #define OFFSET_StgRegTable_rR2 8 11 #define OFFSET_StgRegTable_rR3 16 12 #define OFFSET_StgRegTable_rR4 24 13 #define OFFSET_StgRegTable_rR5 32 14 #define OFFSET_StgRegTable_rR6 40 15 #define OFFSET_StgRegTable_rR7 48 16 #define OFFSET_StgRegTable_rR8 56 17 #define OFFSET_StgRegTable_rR9 64 18 #define OFFSET_StgRegTable_rR10 72 19 #define OFFSET_StgRegTable_rF1 80 20 #define OFFSET_StgRegTable_rF2 84 21 #define OFFSET_StgRegTable_rF3 88 22 #define OFFSET_StgRegTable_rF4 92 23 #define OFFSET_StgRegTable_rD1 96 24 #define OFFSET_StgRegTable_rD2 104 25 #define OFFSET_StgRegTable_rL1 112 26 #define OFFSET_StgRegTable_rSp 120 27 #define OFFSET_StgRegTable_rSpLim 128 28 #define OFFSET_StgRegTable_rHp 136 29 #define OFFSET_StgRegTable_rHpLim 144 30 #define OFFSET_StgRegTable_rCurrentTSO 152 31 #define OFFSET_StgRegTable_rCurrentNursery 168 32 #define OFFSET_StgRegTable_rHpAlloc 184 33 #define OFFSET_StgRegTable_rRet 192 34 #define REP_StgRegTable_rRet b64 35 #define StgRegTable_rRet(__ptr__) REP_StgRegTable_rRet[__ptr__+OFFSET_StgRegTable_rRet] 36 #define OFFSET_StgRegTable_rNursery 160 37 #define REP_StgRegTable_rNursery b64 38 #define StgRegTable_rNursery(__ptr__) REP_StgRegTable_rNursery[__ptr__+OFFSET_StgRegTable_rNursery] 39 #define OFFSET_stgEagerBlackholeInfo 18446744073709551592 40 #define OFFSET_stgGCEnter1 18446744073709551600 41 #define OFFSET_stgGCFun 18446744073709551608 42 #define OFFSET_Capability_r 24 43 #define OFFSET_Capability_lock 312 44 #define OFFSET_Capability_mut_lists 272 45 #define REP_Capability_mut_lists b64 46 #define Capability_mut_lists(__ptr__) REP_Capability_mut_lists[__ptr__+OFFSET_Capability_mut_lists] 47 #define OFFSET_Capability_context_switch 296 48 #define REP_Capability_context_switch b32 49 #define Capability_context_switch(__ptr__) REP_Capability_context_switch[__ptr__+OFFSET_Capability_context_switch] 50 #define OFFSET_Capability_sparks 368 51 #define REP_Capability_sparks b64 52 #define Capability_sparks(__ptr__) REP_Capability_sparks[__ptr__+OFFSET_Capability_sparks] 53 #define OFFSET_bdescr_start 0 54 #define REP_bdescr_start b64 55 #define bdescr_start(__ptr__) REP_bdescr_start[__ptr__+OFFSET_bdescr_start] 56 #define OFFSET_bdescr_free 8 57 #define REP_bdescr_free b64 58 #define bdescr_free(__ptr__) REP_bdescr_free[__ptr__+OFFSET_bdescr_free] 59 #define OFFSET_bdescr_blocks 48 60 #define REP_bdescr_blocks b32 61 #define bdescr_blocks(__ptr__) REP_bdescr_blocks[__ptr__+OFFSET_bdescr_blocks] 62 #define OFFSET_bdescr_gen_no 52 63 #define REP_bdescr_gen_no b16 64 #define bdescr_gen_no(__ptr__) REP_bdescr_gen_no[__ptr__+OFFSET_bdescr_gen_no] 65 #define OFFSET_bdescr_link 16 66 #define REP_bdescr_link b64 67 #define bdescr_link(__ptr__) REP_bdescr_link[__ptr__+OFFSET_bdescr_link] 68 #define SIZEOF_generation 312 69 #define OFFSET_generation_mut_list 48 70 #define REP_generation_mut_list b64 71 #define generation_mut_list(__ptr__) REP_generation_mut_list[__ptr__+OFFSET_generation_mut_list] 72 #define OFFSET_generation_n_new_large_blocks 36 73 #define REP_generation_n_new_large_blocks b32 74 #define generation_n_new_large_blocks(__ptr__) REP_generation_n_new_large_blocks[__ptr__+OFFSET_generation_n_new_large_blocks] 75 #define SIZEOF_CostCentreStack 88 76 #define OFFSET_CostCentreStack_ccsID 0 77 #define REP_CostCentreStack_ccsID b64 78 #define CostCentreStack_ccsID(__ptr__) REP_CostCentreStack_ccsID[__ptr__+OFFSET_CostCentreStack_ccsID] 79 #define OFFSET_CostCentreStack_mem_alloc 56 80 #define REP_CostCentreStack_mem_alloc b64 81 #define CostCentreStack_mem_alloc(__ptr__) REP_CostCentreStack_mem_alloc[__ptr__+OFFSET_CostCentreStack_mem_alloc] 82 #define OFFSET_CostCentreStack_scc_count 32 83 #define REP_CostCentreStack_scc_count b64 84 #define CostCentreStack_scc_count(__ptr__) REP_CostCentreStack_scc_count[__ptr__+OFFSET_CostCentreStack_scc_count] 85 #define OFFSET_CostCentreStack_prevStack 16 86 #define REP_CostCentreStack_prevStack b64 87 #define CostCentreStack_prevStack(__ptr__) REP_CostCentreStack_prevStack[__ptr__+OFFSET_CostCentreStack_prevStack] 88 #define OFFSET_CostCentre_ccID 0 89 #define REP_CostCentre_ccID b64 90 #define CostCentre_ccID(__ptr__) REP_CostCentre_ccID[__ptr__+OFFSET_CostCentre_ccID] 91 #define OFFSET_CostCentre_link 48 92 #define REP_CostCentre_link b64 93 #define CostCentre_link(__ptr__) REP_CostCentre_link[__ptr__+OFFSET_CostCentre_link] 94 #define OFFSET_StgHeader_info 0 95 #define REP_StgHeader_info b64 96 #define StgHeader_info(__ptr__) REP_StgHeader_info[__ptr__+OFFSET_StgHeader_info] 97 #define OFFSET_StgHeader_ccs 8 98 #define REP_StgHeader_ccs b64 99 #define StgHeader_ccs(__ptr__) REP_StgHeader_ccs[__ptr__+OFFSET_StgHeader_ccs] 100 #define OFFSET_StgHeader_ldvw 16 101 #define REP_StgHeader_ldvw b64 102 #define StgHeader_ldvw(__ptr__) REP_StgHeader_ldvw[__ptr__+OFFSET_StgHeader_ldvw] 103 #define SIZEOF_StgSMPThunkHeader 8 104 #define OFFSET_StgClosure_payload 0 105 #define StgClosure_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgClosure_payload + WDS(__ix__)] 106 #define OFFSET_StgEntCounter_allocs 48 107 #define REP_StgEntCounter_allocs b64 108 #define StgEntCounter_allocs(__ptr__) REP_StgEntCounter_allocs[__ptr__+OFFSET_StgEntCounter_allocs] 109 #define OFFSET_StgEntCounter_registeredp 0 110 #define REP_StgEntCounter_registeredp b64 111 #define StgEntCounter_registeredp(__ptr__) REP_StgEntCounter_registeredp[__ptr__+OFFSET_StgEntCounter_registeredp] 112 #define OFFSET_StgEntCounter_link 56 113 #define REP_StgEntCounter_link b64 114 #define StgEntCounter_link(__ptr__) REP_StgEntCounter_link[__ptr__+OFFSET_StgEntCounter_link] 115 #define OFFSET_StgEntCounter_entry_count 40 116 #define REP_StgEntCounter_entry_count b64 117 #define StgEntCounter_entry_count(__ptr__) REP_StgEntCounter_entry_count[__ptr__+OFFSET_StgEntCounter_entry_count] 118 #define SIZEOF_StgUpdateFrame_NoHdr 8 119 #define SIZEOF_StgUpdateFrame (SIZEOF_StgHeader+8) 120 #define SIZEOF_StgCatchFrame_NoHdr 16 121 #define SIZEOF_StgCatchFrame (SIZEOF_StgHeader+16) 122 #define SIZEOF_StgStopFrame_NoHdr 0 123 #define SIZEOF_StgStopFrame (SIZEOF_StgHeader+0) 124 #define SIZEOF_StgMutArrPtrs_NoHdr 16 125 #define SIZEOF_StgMutArrPtrs (SIZEOF_StgHeader+16) 126 #define OFFSET_StgMutArrPtrs_ptrs 0 127 #define REP_StgMutArrPtrs_ptrs b64 128 #define StgMutArrPtrs_ptrs(__ptr__) REP_StgMutArrPtrs_ptrs[__ptr__+SIZEOF_StgHeader+OFFSET_StgMutArrPtrs_ptrs] 129 #define OFFSET_StgMutArrPtrs_size 8 130 #define REP_StgMutArrPtrs_size b64 131 #define StgMutArrPtrs_size(__ptr__) REP_StgMutArrPtrs_size[__ptr__+SIZEOF_StgHeader+OFFSET_StgMutArrPtrs_size] 132 #define SIZEOF_StgArrWords_NoHdr 8 133 #define SIZEOF_StgArrWords (SIZEOF_StgHeader+8) 134 #define OFFSET_StgArrWords_bytes 0 135 #define REP_StgArrWords_bytes b64 136 #define StgArrWords_bytes(__ptr__) REP_StgArrWords_bytes[__ptr__+SIZEOF_StgHeader+OFFSET_StgArrWords_bytes] 137 #define OFFSET_StgArrWords_payload 8 138 #define StgArrWords_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgArrWords_payload + WDS(__ix__)] 139 #define OFFSET_StgTSO__link 0 140 #define REP_StgTSO__link b64 141 #define StgTSO__link(__ptr__) REP_StgTSO__link[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO__link] 142 #define OFFSET_StgTSO_global_link 8 143 #define REP_StgTSO_global_link b64 144 #define StgTSO_global_link(__ptr__) REP_StgTSO_global_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_global_link] 145 #define OFFSET_StgTSO_what_next 24 146 #define REP_StgTSO_what_next b16 147 #define StgTSO_what_next(__ptr__) REP_StgTSO_what_next[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_what_next] 148 #define OFFSET_StgTSO_why_blocked 26 149 #define REP_StgTSO_why_blocked b16 150 #define StgTSO_why_blocked(__ptr__) REP_StgTSO_why_blocked[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_why_blocked] 151 #define OFFSET_StgTSO_block_info 32 152 #define REP_StgTSO_block_info b64 153 #define StgTSO_block_info(__ptr__) REP_StgTSO_block_info[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_block_info] 154 #define OFFSET_StgTSO_blocked_exceptions 72 155 #define REP_StgTSO_blocked_exceptions b64 156 #define StgTSO_blocked_exceptions(__ptr__) REP_StgTSO_blocked_exceptions[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_blocked_exceptions] 157 #define OFFSET_StgTSO_id 40 158 #define REP_StgTSO_id b32 159 #define StgTSO_id(__ptr__) REP_StgTSO_id[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_id] 160 #define OFFSET_StgTSO_cap 56 161 #define REP_StgTSO_cap b64 162 #define StgTSO_cap(__ptr__) REP_StgTSO_cap[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_cap] 163 #define OFFSET_StgTSO_saved_errno 44 164 #define REP_StgTSO_saved_errno b32 165 #define StgTSO_saved_errno(__ptr__) REP_StgTSO_saved_errno[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_saved_errno] 166 #define OFFSET_StgTSO_trec 64 167 #define REP_StgTSO_trec b64 168 #define StgTSO_trec(__ptr__) REP_StgTSO_trec[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_trec] 169 #define OFFSET_StgTSO_flags 28 170 #define REP_StgTSO_flags b32 171 #define StgTSO_flags(__ptr__) REP_StgTSO_flags[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_flags] 172 #define OFFSET_StgTSO_dirty 16 173 #define REP_StgTSO_dirty b64 174 #define StgTSO_dirty(__ptr__) REP_StgTSO_dirty[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_dirty] 175 #define OFFSET_StgTSO_bq 80 176 #define REP_StgTSO_bq b64 177 #define StgTSO_bq(__ptr__) REP_StgTSO_bq[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_bq] 178 #define OFFSET_StgTSO_CCCS 88 179 #define REP_StgTSO_CCCS b64 180 #define StgTSO_CCCS(__ptr__) REP_StgTSO_CCCS[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_CCCS] 181 #define REP_StgTSO_sp b64 182 #define OFFSET_StgTSO_sp 96 183 #define TSO_OFFSET_StgTSO_sp (SIZEOF_StgHeader+SIZEOF_OPT_StgTSOProfInfo+OFFSET_StgTSO_sp) 184 #define StgTSO_sp(__ptr__) REP_StgTSO_sp[__ptr__+TSO_OFFSET_StgTSO_sp] 185 #define OFFSET_StgTSO_stack 104 186 #define TSO_OFFSET_StgTSO_stack (SIZEOF_StgHeader+SIZEOF_OPT_StgTSOProfInfo+OFFSET_StgTSO_stack) 187 #define REP_StgTSO_stack_size b32 188 #define OFFSET_StgTSO_stack_size 88 189 #define TSO_OFFSET_StgTSO_stack_size (SIZEOF_StgHeader+SIZEOF_OPT_StgTSOProfInfo+OFFSET_StgTSO_stack_size) 190 #define StgTSO_stack_size(__ptr__) REP_StgTSO_stack_size[__ptr__+TSO_OFFSET_StgTSO_stack_size] 191 #define SIZEOF_StgTSOProfInfo 8 192 #ifdef PROFILING 193 #define SIZEOF_OPT_StgTSOProfInfo SIZEOF_StgTSOProfInfo 194 #else 195 #define SIZEOF_OPT_StgTSOProfInfo 0 196 #endif 197 198 #define OFFSET_StgUpdateFrame_updatee 0 199 #define REP_StgUpdateFrame_updatee b64 200 #define StgUpdateFrame_updatee(__ptr__) REP_StgUpdateFrame_updatee[__ptr__+SIZEOF_StgHeader+OFFSET_StgUpdateFrame_updatee] 201 #define OFFSET_StgCatchFrame_handler 8 202 #define REP_StgCatchFrame_handler b64 203 #define StgCatchFrame_handler(__ptr__) REP_StgCatchFrame_handler[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchFrame_handler] 204 #define OFFSET_StgCatchFrame_exceptions_blocked 0 205 #define REP_StgCatchFrame_exceptions_blocked b64 206 #define StgCatchFrame_exceptions_blocked(__ptr__) REP_StgCatchFrame_exceptions_blocked[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchFrame_exceptions_blocked] 207 #define SIZEOF_StgPAP_NoHdr 16 208 #define SIZEOF_StgPAP (SIZEOF_StgHeader+16) 209 #define OFFSET_StgPAP_n_args 4 210 #define REP_StgPAP_n_args b32 211 #define StgPAP_n_args(__ptr__) REP_StgPAP_n_args[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_n_args] 212 #define OFFSET_StgPAP_fun 8 213 #define REP_StgPAP_fun gcptr 214 #define StgPAP_fun(__ptr__) REP_StgPAP_fun[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_fun] 215 #define OFFSET_StgPAP_arity 0 216 #define REP_StgPAP_arity b32 217 #define StgPAP_arity(__ptr__) REP_StgPAP_arity[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_arity] 218 #define OFFSET_StgPAP_payload 16 219 #define StgPAP_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_payload + WDS(__ix__)] 220 #define SIZEOF_StgAP_NoThunkHdr 16 221 #define SIZEOF_StgAP_NoHdr 24 222 #define SIZEOF_StgAP (SIZEOF_StgHeader+24) 223 #define OFFSET_StgAP_n_args 12 224 #define REP_StgAP_n_args b32 225 #define StgAP_n_args(__ptr__) REP_StgAP_n_args[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_n_args] 226 #define OFFSET_StgAP_fun 16 227 #define REP_StgAP_fun gcptr 228 #define StgAP_fun(__ptr__) REP_StgAP_fun[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_fun] 229 #define OFFSET_StgAP_payload 24 230 #define StgAP_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_payload + WDS(__ix__)] 231 #define SIZEOF_StgAP_STACK_NoThunkHdr 16 232 #define SIZEOF_StgAP_STACK_NoHdr 24 233 #define SIZEOF_StgAP_STACK (SIZEOF_StgHeader+24) 234 #define OFFSET_StgAP_STACK_size 8 235 #define REP_StgAP_STACK_size b64 236 #define StgAP_STACK_size(__ptr__) REP_StgAP_STACK_size[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_STACK_size] 237 #define OFFSET_StgAP_STACK_fun 16 238 #define REP_StgAP_STACK_fun gcptr 239 #define StgAP_STACK_fun(__ptr__) REP_StgAP_STACK_fun[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_STACK_fun] 240 #define OFFSET_StgAP_STACK_payload 24 241 #define StgAP_STACK_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_STACK_payload + WDS(__ix__)] 242 #define SIZEOF_StgSelector_NoThunkHdr 8 243 #define SIZEOF_StgSelector_NoHdr 16 244 #define SIZEOF_StgSelector (SIZEOF_StgHeader+16) 245 #define OFFSET_StgInd_indirectee 0 246 #define REP_StgInd_indirectee gcptr 247 #define StgInd_indirectee(__ptr__) REP_StgInd_indirectee[__ptr__+SIZEOF_StgHeader+OFFSET_StgInd_indirectee] 248 #define SIZEOF_StgMutVar_NoHdr 8 249 #define SIZEOF_StgMutVar (SIZEOF_StgHeader+8) 250 #define OFFSET_StgMutVar_var 0 251 #define REP_StgMutVar_var b64 252 #define StgMutVar_var(__ptr__) REP_StgMutVar_var[__ptr__+SIZEOF_StgHeader+OFFSET_StgMutVar_var] 253 #define SIZEOF_StgAtomicallyFrame_NoHdr 24 254 #define SIZEOF_StgAtomicallyFrame (SIZEOF_StgHeader+24) 255 #define OFFSET_StgAtomicallyFrame_code 0 256 #define REP_StgAtomicallyFrame_code b64 257 #define StgAtomicallyFrame_code(__ptr__) REP_StgAtomicallyFrame_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgAtomicallyFrame_code] 258 #define OFFSET_StgAtomicallyFrame_next_invariant_to_check 8 259 #define REP_StgAtomicallyFrame_next_invariant_to_check b64 260 #define StgAtomicallyFrame_next_invariant_to_check(__ptr__) REP_StgAtomicallyFrame_next_invariant_to_check[__ptr__+SIZEOF_StgHeader+OFFSET_StgAtomicallyFrame_next_invariant_to_check] 261 #define OFFSET_StgAtomicallyFrame_result 16 262 #define REP_StgAtomicallyFrame_result b64 263 #define StgAtomicallyFrame_result(__ptr__) REP_StgAtomicallyFrame_result[__ptr__+SIZEOF_StgHeader+OFFSET_StgAtomicallyFrame_result] 264 #define OFFSET_StgInvariantCheckQueue_invariant 0 265 #define REP_StgInvariantCheckQueue_invariant b64 266 #define StgInvariantCheckQueue_invariant(__ptr__) REP_StgInvariantCheckQueue_invariant[__ptr__+SIZEOF_StgHeader+OFFSET_StgInvariantCheckQueue_invariant] 267 #define OFFSET_StgInvariantCheckQueue_my_execution 8 268 #define REP_StgInvariantCheckQueue_my_execution b64 269 #define StgInvariantCheckQueue_my_execution(__ptr__) REP_StgInvariantCheckQueue_my_execution[__ptr__+SIZEOF_StgHeader+OFFSET_StgInvariantCheckQueue_my_execution] 270 #define OFFSET_StgInvariantCheckQueue_next_queue_entry 16 271 #define REP_StgInvariantCheckQueue_next_queue_entry b64 272 #define StgInvariantCheckQueue_next_queue_entry(__ptr__) REP_StgInvariantCheckQueue_next_queue_entry[__ptr__+SIZEOF_StgHeader+OFFSET_StgInvariantCheckQueue_next_queue_entry] 273 #define OFFSET_StgAtomicInvariant_code 0 274 #define REP_StgAtomicInvariant_code b64 275 #define StgAtomicInvariant_code(__ptr__) REP_StgAtomicInvariant_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgAtomicInvariant_code] 276 #define OFFSET_StgTRecHeader_enclosing_trec 0 277 #define REP_StgTRecHeader_enclosing_trec b64 278 #define StgTRecHeader_enclosing_trec(__ptr__) REP_StgTRecHeader_enclosing_trec[__ptr__+SIZEOF_StgHeader+OFFSET_StgTRecHeader_enclosing_trec] 279 #define SIZEOF_StgCatchSTMFrame_NoHdr 16 280 #define SIZEOF_StgCatchSTMFrame (SIZEOF_StgHeader+16) 281 #define OFFSET_StgCatchSTMFrame_handler 8 282 #define REP_StgCatchSTMFrame_handler b64 283 #define StgCatchSTMFrame_handler(__ptr__) REP_StgCatchSTMFrame_handler[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchSTMFrame_handler] 284 #define OFFSET_StgCatchSTMFrame_code 0 285 #define REP_StgCatchSTMFrame_code b64 286 #define StgCatchSTMFrame_code(__ptr__) REP_StgCatchSTMFrame_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchSTMFrame_code] 287 #define SIZEOF_StgCatchRetryFrame_NoHdr 24 288 #define SIZEOF_StgCatchRetryFrame (SIZEOF_StgHeader+24) 289 #define OFFSET_StgCatchRetryFrame_running_alt_code 0 290 #define REP_StgCatchRetryFrame_running_alt_code b32 291 #define StgCatchRetryFrame_running_alt_code(__ptr__) REP_StgCatchRetryFrame_running_alt_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchRetryFrame_running_alt_code] 292 #define OFFSET_StgCatchRetryFrame_first_code 8 293 #define REP_StgCatchRetryFrame_first_code b64 294 #define StgCatchRetryFrame_first_code(__ptr__) REP_StgCatchRetryFrame_first_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchRetryFrame_first_code] 295 #define OFFSET_StgCatchRetryFrame_alt_code 16 296 #define REP_StgCatchRetryFrame_alt_code b64 297 #define StgCatchRetryFrame_alt_code(__ptr__) REP_StgCatchRetryFrame_alt_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchRetryFrame_alt_code] 298 #define OFFSET_StgTVarWatchQueue_closure 0 299 #define REP_StgTVarWatchQueue_closure b64 300 #define StgTVarWatchQueue_closure(__ptr__) REP_StgTVarWatchQueue_closure[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVarWatchQueue_closure] 301 #define OFFSET_StgTVarWatchQueue_next_queue_entry 8 302 #define REP_StgTVarWatchQueue_next_queue_entry b64 303 #define StgTVarWatchQueue_next_queue_entry(__ptr__) REP_StgTVarWatchQueue_next_queue_entry[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVarWatchQueue_next_queue_entry] 304 #define OFFSET_StgTVarWatchQueue_prev_queue_entry 16 305 #define REP_StgTVarWatchQueue_prev_queue_entry b64 306 #define StgTVarWatchQueue_prev_queue_entry(__ptr__) REP_StgTVarWatchQueue_prev_queue_entry[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVarWatchQueue_prev_queue_entry] 307 #define OFFSET_StgTVar_current_value 0 308 #define REP_StgTVar_current_value b64 309 #define StgTVar_current_value(__ptr__) REP_StgTVar_current_value[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVar_current_value] 310 #define SIZEOF_StgWeak_NoHdr 40 311 #define SIZEOF_StgWeak (SIZEOF_StgHeader+40) 312 #define OFFSET_StgWeak_link 32 313 #define REP_StgWeak_link b64 314 #define StgWeak_link(__ptr__) REP_StgWeak_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_link] 315 #define OFFSET_StgWeak_key 8 316 #define REP_StgWeak_key b64 317 #define StgWeak_key(__ptr__) REP_StgWeak_key[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_key] 318 #define OFFSET_StgWeak_value 16 319 #define REP_StgWeak_value b64 320 #define StgWeak_value(__ptr__) REP_StgWeak_value[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_value] 321 #define OFFSET_StgWeak_finalizer 24 322 #define REP_StgWeak_finalizer b64 323 #define StgWeak_finalizer(__ptr__) REP_StgWeak_finalizer[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_finalizer] 324 #define OFFSET_StgWeak_cfinalizer 0 325 #define REP_StgWeak_cfinalizer b64 326 #define StgWeak_cfinalizer(__ptr__) REP_StgWeak_cfinalizer[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_cfinalizer] 327 #define SIZEOF_StgDeadWeak_NoHdr 8 328 #define SIZEOF_StgDeadWeak (SIZEOF_StgHeader+8) 329 #define OFFSET_StgDeadWeak_link 0 330 #define REP_StgDeadWeak_link b64 331 #define StgDeadWeak_link(__ptr__) REP_StgDeadWeak_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgDeadWeak_link] 332 #define SIZEOF_StgMVar_NoHdr 24 333 #define SIZEOF_StgMVar (SIZEOF_StgHeader+24) 334 #define OFFSET_StgMVar_head 0 335 #define REP_StgMVar_head b64 336 #define StgMVar_head(__ptr__) REP_StgMVar_head[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVar_head] 337 #define OFFSET_StgMVar_tail 8 338 #define REP_StgMVar_tail b64 339 #define StgMVar_tail(__ptr__) REP_StgMVar_tail[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVar_tail] 340 #define OFFSET_StgMVar_value 16 341 #define REP_StgMVar_value b64 342 #define StgMVar_value(__ptr__) REP_StgMVar_value[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVar_value] 343 #define SIZEOF_StgMVarTSOQueue_NoHdr 16 344 #define SIZEOF_StgMVarTSOQueue (SIZEOF_StgHeader+16) 345 #define OFFSET_StgMVarTSOQueue_link 0 346 #define REP_StgMVarTSOQueue_link b64 347 #define StgMVarTSOQueue_link(__ptr__) REP_StgMVarTSOQueue_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVarTSOQueue_link] 348 #define OFFSET_StgMVarTSOQueue_tso 8 349 #define REP_StgMVarTSOQueue_tso b64 350 #define StgMVarTSOQueue_tso(__ptr__) REP_StgMVarTSOQueue_tso[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVarTSOQueue_tso] 351 #define SIZEOF_StgBCO_NoHdr 32 352 #define SIZEOF_StgBCO (SIZEOF_StgHeader+32) 353 #define OFFSET_StgBCO_instrs 0 354 #define REP_StgBCO_instrs b64 355 #define StgBCO_instrs(__ptr__) REP_StgBCO_instrs[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_instrs] 356 #define OFFSET_StgBCO_literals 8 357 #define REP_StgBCO_literals b64 358 #define StgBCO_literals(__ptr__) REP_StgBCO_literals[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_literals] 359 #define OFFSET_StgBCO_ptrs 16 360 #define REP_StgBCO_ptrs b64 361 #define StgBCO_ptrs(__ptr__) REP_StgBCO_ptrs[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_ptrs] 362 #define OFFSET_StgBCO_arity 24 363 #define REP_StgBCO_arity b32 364 #define StgBCO_arity(__ptr__) REP_StgBCO_arity[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_arity] 365 #define OFFSET_StgBCO_size 28 366 #define REP_StgBCO_size b32 367 #define StgBCO_size(__ptr__) REP_StgBCO_size[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_size] 368 #define OFFSET_StgBCO_bitmap 32 369 #define StgBCO_bitmap(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_bitmap + WDS(__ix__)] 370 #define SIZEOF_StgStableName_NoHdr 8 371 #define SIZEOF_StgStableName (SIZEOF_StgHeader+8) 372 #define OFFSET_StgStableName_sn 0 373 #define REP_StgStableName_sn b64 374 #define StgStableName_sn(__ptr__) REP_StgStableName_sn[__ptr__+SIZEOF_StgHeader+OFFSET_StgStableName_sn] 375 #define SIZEOF_StgBlockingQueue_NoHdr 32 376 #define SIZEOF_StgBlockingQueue (SIZEOF_StgHeader+32) 377 #define OFFSET_StgBlockingQueue_bh 8 378 #define REP_StgBlockingQueue_bh b64 379 #define StgBlockingQueue_bh(__ptr__) REP_StgBlockingQueue_bh[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_bh] 380 #define OFFSET_StgBlockingQueue_owner 16 381 #define REP_StgBlockingQueue_owner b64 382 #define StgBlockingQueue_owner(__ptr__) REP_StgBlockingQueue_owner[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_owner] 383 #define OFFSET_StgBlockingQueue_queue 24 384 #define REP_StgBlockingQueue_queue b64 385 #define StgBlockingQueue_queue(__ptr__) REP_StgBlockingQueue_queue[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_queue] 386 #define OFFSET_StgBlockingQueue_link 0 387 #define REP_StgBlockingQueue_link b64 388 #define StgBlockingQueue_link(__ptr__) REP_StgBlockingQueue_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_link] 389 #define SIZEOF_MessageBlackHole_NoHdr 24 390 #define SIZEOF_MessageBlackHole (SIZEOF_StgHeader+24) 391 #define OFFSET_MessageBlackHole_link 0 392 #define REP_MessageBlackHole_link b64 393 #define MessageBlackHole_link(__ptr__) REP_MessageBlackHole_link[__ptr__+SIZEOF_StgHeader+OFFSET_MessageBlackHole_link] 394 #define OFFSET_MessageBlackHole_tso 8 395 #define REP_MessageBlackHole_tso b64 396 #define MessageBlackHole_tso(__ptr__) REP_MessageBlackHole_tso[__ptr__+SIZEOF_StgHeader+OFFSET_MessageBlackHole_tso] 397 #define OFFSET_MessageBlackHole_bh 16 398 #define REP_MessageBlackHole_bh b64 399 #define MessageBlackHole_bh(__ptr__) REP_MessageBlackHole_bh[__ptr__+SIZEOF_StgHeader+OFFSET_MessageBlackHole_bh] 400 #define OFFSET_RtsFlags_ProfFlags_showCCSOnException 224 401 #define REP_RtsFlags_ProfFlags_showCCSOnException b32 402 #define RtsFlags_ProfFlags_showCCSOnException(__ptr__) REP_RtsFlags_ProfFlags_showCCSOnException[__ptr__+OFFSET_RtsFlags_ProfFlags_showCCSOnException] 403 #define OFFSET_RtsFlags_DebugFlags_apply 176 404 #define REP_RtsFlags_DebugFlags_apply b32 405 #define RtsFlags_DebugFlags_apply(__ptr__) REP_RtsFlags_DebugFlags_apply[__ptr__+OFFSET_RtsFlags_DebugFlags_apply] 406 #define OFFSET_RtsFlags_DebugFlags_sanity 160 407 #define REP_RtsFlags_DebugFlags_sanity b32 408 #define RtsFlags_DebugFlags_sanity(__ptr__) REP_RtsFlags_DebugFlags_sanity[__ptr__+OFFSET_RtsFlags_DebugFlags_sanity] 409 #define OFFSET_RtsFlags_DebugFlags_weak 144 410 #define REP_RtsFlags_DebugFlags_weak b32 411 #define RtsFlags_DebugFlags_weak(__ptr__) REP_RtsFlags_DebugFlags_weak[__ptr__+OFFSET_RtsFlags_DebugFlags_weak] 412 #define OFFSET_RtsFlags_GcFlags_initialStkSize 16 413 #define REP_RtsFlags_GcFlags_initialStkSize b32 414 #define RtsFlags_GcFlags_initialStkSize(__ptr__) REP_RtsFlags_GcFlags_initialStkSize[__ptr__+OFFSET_RtsFlags_GcFlags_initialStkSize] 415 #define OFFSET_RtsFlags_MiscFlags_tickInterval 112 416 #define REP_RtsFlags_MiscFlags_tickInterval b32 417 #define RtsFlags_MiscFlags_tickInterval(__ptr__) REP_RtsFlags_MiscFlags_tickInterval[__ptr__+OFFSET_RtsFlags_MiscFlags_tickInterval] 418 #define SIZEOF_StgFunInfoExtraFwd 32 419 #define OFFSET_StgFunInfoExtraFwd_slow_apply 24 420 #define REP_StgFunInfoExtraFwd_slow_apply b64 421 #define StgFunInfoExtraFwd_slow_apply(__ptr__) REP_StgFunInfoExtraFwd_slow_apply[__ptr__+OFFSET_StgFunInfoExtraFwd_slow_apply] 422 #define OFFSET_StgFunInfoExtraFwd_fun_type 0 423 #define REP_StgFunInfoExtraFwd_fun_type b32 424 #define StgFunInfoExtraFwd_fun_type(__ptr__) REP_StgFunInfoExtraFwd_fun_type[__ptr__+OFFSET_StgFunInfoExtraFwd_fun_type] 425 #define OFFSET_StgFunInfoExtraFwd_arity 4 426 #define REP_StgFunInfoExtraFwd_arity b32 427 #define StgFunInfoExtraFwd_arity(__ptr__) REP_StgFunInfoExtraFwd_arity[__ptr__+OFFSET_StgFunInfoExtraFwd_arity] 428 #define OFFSET_StgFunInfoExtraFwd_bitmap 16 429 #define REP_StgFunInfoExtraFwd_bitmap b64 430 #define StgFunInfoExtraFwd_bitmap(__ptr__) REP_StgFunInfoExtraFwd_bitmap[__ptr__+OFFSET_StgFunInfoExtraFwd_bitmap] 431 #define SIZEOF_StgFunInfoExtraRev 32 432 #define OFFSET_StgFunInfoExtraRev_slow_apply_offset 0 433 #define REP_StgFunInfoExtraRev_slow_apply_offset b32 434 #define StgFunInfoExtraRev_slow_apply_offset(__ptr__) REP_StgFunInfoExtraRev_slow_apply_offset[__ptr__+OFFSET_StgFunInfoExtraRev_slow_apply_offset] 435 #define OFFSET_StgFunInfoExtraRev_fun_type 24 436 #define REP_StgFunInfoExtraRev_fun_type b32 437 #define StgFunInfoExtraRev_fun_type(__ptr__) REP_StgFunInfoExtraRev_fun_type[__ptr__+OFFSET_StgFunInfoExtraRev_fun_type] 438 #define OFFSET_StgFunInfoExtraRev_arity 28 439 #define REP_StgFunInfoExtraRev_arity b32 440 #define StgFunInfoExtraRev_arity(__ptr__) REP_StgFunInfoExtraRev_arity[__ptr__+OFFSET_StgFunInfoExtraRev_arity] 441 #define OFFSET_StgFunInfoExtraRev_bitmap 8 442 #define REP_StgFunInfoExtraRev_bitmap b64 443 #define StgFunInfoExtraRev_bitmap(__ptr__) REP_StgFunInfoExtraRev_bitmap[__ptr__+OFFSET_StgFunInfoExtraRev_bitmap] 444 #define OFFSET_StgLargeBitmap_size 0 445 #define REP_StgLargeBitmap_size b64 446 #define StgLargeBitmap_size(__ptr__) REP_StgLargeBitmap_size[__ptr__+OFFSET_StgLargeBitmap_size] 447 #define OFFSET_StgLargeBitmap_bitmap 8 448 #define SIZEOF_snEntry 32 449 #define OFFSET_snEntry_sn_obj 24 450 #define REP_snEntry_sn_obj b64 451 #define snEntry_sn_obj(__ptr__) REP_snEntry_sn_obj[__ptr__+OFFSET_snEntry_sn_obj] 452 #define OFFSET_snEntry_addr 0 453 #define REP_snEntry_addr b64 454 #define snEntry_addr(__ptr__) REP_snEntry_addr[__ptr__+OFFSET_snEntry_addr] -
includes/GHCConstants.h.bf
diff -rN -u old-ghc_bf/includes/GHCConstants.h.bf new-ghc_bf-2/includes/GHCConstants.h.bf
old new 1 oFFSET_StgRegTable_rR1 :: Int 2 oFFSET_StgRegTable_rR1 = 0 3 oFFSET_StgRegTable_rR2 :: Int 4 oFFSET_StgRegTable_rR2 = 8 5 oFFSET_StgRegTable_rR3 :: Int 6 oFFSET_StgRegTable_rR3 = 16 7 oFFSET_StgRegTable_rR4 :: Int 8 oFFSET_StgRegTable_rR4 = 24 9 oFFSET_StgRegTable_rR5 :: Int 10 oFFSET_StgRegTable_rR5 = 32 11 oFFSET_StgRegTable_rR6 :: Int 12 oFFSET_StgRegTable_rR6 = 40 13 oFFSET_StgRegTable_rR7 :: Int 14 oFFSET_StgRegTable_rR7 = 48 15 oFFSET_StgRegTable_rR8 :: Int 16 oFFSET_StgRegTable_rR8 = 56 17 oFFSET_StgRegTable_rR9 :: Int 18 oFFSET_StgRegTable_rR9 = 64 19 oFFSET_StgRegTable_rR10 :: Int 20 oFFSET_StgRegTable_rR10 = 72 21 oFFSET_StgRegTable_rF1 :: Int 22 oFFSET_StgRegTable_rF1 = 80 23 oFFSET_StgRegTable_rF2 :: Int 24 oFFSET_StgRegTable_rF2 = 84 25 oFFSET_StgRegTable_rF3 :: Int 26 oFFSET_StgRegTable_rF3 = 88 27 oFFSET_StgRegTable_rF4 :: Int 28 oFFSET_StgRegTable_rF4 = 92 29 oFFSET_StgRegTable_rD1 :: Int 30 oFFSET_StgRegTable_rD1 = 96 31 oFFSET_StgRegTable_rD2 :: Int 32 oFFSET_StgRegTable_rD2 = 104 33 oFFSET_StgRegTable_rL1 :: Int 34 oFFSET_StgRegTable_rL1 = 112 35 oFFSET_StgRegTable_rSp :: Int 36 oFFSET_StgRegTable_rSp = 120 37 oFFSET_StgRegTable_rSpLim :: Int 38 oFFSET_StgRegTable_rSpLim = 128 39 oFFSET_StgRegTable_rHp :: Int 40 oFFSET_StgRegTable_rHp = 136 41 oFFSET_StgRegTable_rHpLim :: Int 42 oFFSET_StgRegTable_rHpLim = 144 43 oFFSET_StgRegTable_rCurrentTSO :: Int 44 oFFSET_StgRegTable_rCurrentTSO = 152 45 oFFSET_StgRegTable_rCurrentNursery :: Int 46 oFFSET_StgRegTable_rCurrentNursery = 168 47 oFFSET_StgRegTable_rHpAlloc :: Int 48 oFFSET_StgRegTable_rHpAlloc = 184 49 oFFSET_StgRegTable_rRet :: Int 50 oFFSET_StgRegTable_rRet = 192 51 #define StgRegTable_rRet(__ptr__) REP_StgRegTable_rRet[__ptr__+OFFSET_StgRegTable_rRet] 52 oFFSET_StgRegTable_rNursery :: Int 53 oFFSET_StgRegTable_rNursery = 160 54 #define StgRegTable_rNursery(__ptr__) REP_StgRegTable_rNursery[__ptr__+OFFSET_StgRegTable_rNursery] 55 oFFSET_stgEagerBlackholeInfo :: Int 56 oFFSET_stgEagerBlackholeInfo = 18446744073709551592 57 oFFSET_stgGCEnter1 :: Int 58 oFFSET_stgGCEnter1 = 18446744073709551600 59 oFFSET_stgGCFun :: Int 60 oFFSET_stgGCFun = 18446744073709551608 61 oFFSET_Capability_r :: Int 62 oFFSET_Capability_r = 24 63 oFFSET_Capability_lock :: Int 64 oFFSET_Capability_lock = 312 65 oFFSET_Capability_mut_lists :: Int 66 oFFSET_Capability_mut_lists = 272 67 #define Capability_mut_lists(__ptr__) REP_Capability_mut_lists[__ptr__+OFFSET_Capability_mut_lists] 68 oFFSET_Capability_context_switch :: Int 69 oFFSET_Capability_context_switch = 296 70 #define Capability_context_switch(__ptr__) REP_Capability_context_switch[__ptr__+OFFSET_Capability_context_switch] 71 oFFSET_Capability_sparks :: Int 72 oFFSET_Capability_sparks = 368 73 #define Capability_sparks(__ptr__) REP_Capability_sparks[__ptr__+OFFSET_Capability_sparks] 74 oFFSET_bdescr_start :: Int 75 oFFSET_bdescr_start = 0 76 #define bdescr_start(__ptr__) REP_bdescr_start[__ptr__+OFFSET_bdescr_start] 77 oFFSET_bdescr_free :: Int 78 oFFSET_bdescr_free = 8 79 #define bdescr_free(__ptr__) REP_bdescr_free[__ptr__+OFFSET_bdescr_free] 80 oFFSET_bdescr_blocks :: Int 81 oFFSET_bdescr_blocks = 48 82 #define bdescr_blocks(__ptr__) REP_bdescr_blocks[__ptr__+OFFSET_bdescr_blocks] 83 oFFSET_bdescr_gen_no :: Int 84 oFFSET_bdescr_gen_no = 52 85 #define bdescr_gen_no(__ptr__) REP_bdescr_gen_no[__ptr__+OFFSET_bdescr_gen_no] 86 oFFSET_bdescr_link :: Int 87 oFFSET_bdescr_link = 16 88 #define bdescr_link(__ptr__) REP_bdescr_link[__ptr__+OFFSET_bdescr_link] 89 sIZEOF_generation :: Int 90 sIZEOF_generation = 312 91 oFFSET_generation_mut_list :: Int 92 oFFSET_generation_mut_list = 48 93 #define generation_mut_list(__ptr__) REP_generation_mut_list[__ptr__+OFFSET_generation_mut_list] 94 oFFSET_generation_n_new_large_blocks :: Int 95 oFFSET_generation_n_new_large_blocks = 36 96 #define generation_n_new_large_blocks(__ptr__) REP_generation_n_new_large_blocks[__ptr__+OFFSET_generation_n_new_large_blocks] 97 sIZEOF_CostCentreStack :: Int 98 sIZEOF_CostCentreStack = 88 99 oFFSET_CostCentreStack_ccsID :: Int 100 oFFSET_CostCentreStack_ccsID = 0 101 #define CostCentreStack_ccsID(__ptr__) REP_CostCentreStack_ccsID[__ptr__+OFFSET_CostCentreStack_ccsID] 102 oFFSET_CostCentreStack_mem_alloc :: Int 103 oFFSET_CostCentreStack_mem_alloc = 56 104 #define CostCentreStack_mem_alloc(__ptr__) REP_CostCentreStack_mem_alloc[__ptr__+OFFSET_CostCentreStack_mem_alloc] 105 oFFSET_CostCentreStack_scc_count :: Int 106 oFFSET_CostCentreStack_scc_count = 32 107 #define CostCentreStack_scc_count(__ptr__) REP_CostCentreStack_scc_count[__ptr__+OFFSET_CostCentreStack_scc_count] 108 oFFSET_CostCentreStack_prevStack :: Int 109 oFFSET_CostCentreStack_prevStack = 16 110 #define CostCentreStack_prevStack(__ptr__) REP_CostCentreStack_prevStack[__ptr__+OFFSET_CostCentreStack_prevStack] 111 oFFSET_CostCentre_ccID :: Int 112 oFFSET_CostCentre_ccID = 0 113 #define CostCentre_ccID(__ptr__) REP_CostCentre_ccID[__ptr__+OFFSET_CostCentre_ccID] 114 oFFSET_CostCentre_link :: Int 115 oFFSET_CostCentre_link = 48 116 #define CostCentre_link(__ptr__) REP_CostCentre_link[__ptr__+OFFSET_CostCentre_link] 117 oFFSET_StgHeader_info :: Int 118 oFFSET_StgHeader_info = 0 119 #define StgHeader_info(__ptr__) REP_StgHeader_info[__ptr__+OFFSET_StgHeader_info] 120 oFFSET_StgHeader_ccs :: Int 121 oFFSET_StgHeader_ccs = 8 122 #define StgHeader_ccs(__ptr__) REP_StgHeader_ccs[__ptr__+OFFSET_StgHeader_ccs] 123 oFFSET_StgHeader_ldvw :: Int 124 oFFSET_StgHeader_ldvw = 16 125 #define StgHeader_ldvw(__ptr__) REP_StgHeader_ldvw[__ptr__+OFFSET_StgHeader_ldvw] 126 sIZEOF_StgSMPThunkHeader :: Int 127 sIZEOF_StgSMPThunkHeader = 8 128 oFFSET_StgClosure_payload :: Int 129 oFFSET_StgClosure_payload = 0 130 #define StgClosure_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgClosure_payload + WDS(__ix__)] 131 oFFSET_StgEntCounter_allocs :: Int 132 oFFSET_StgEntCounter_allocs = 48 133 #define StgEntCounter_allocs(__ptr__) REP_StgEntCounter_allocs[__ptr__+OFFSET_StgEntCounter_allocs] 134 oFFSET_StgEntCounter_registeredp :: Int 135 oFFSET_StgEntCounter_registeredp = 0 136 #define StgEntCounter_registeredp(__ptr__) REP_StgEntCounter_registeredp[__ptr__+OFFSET_StgEntCounter_registeredp] 137 oFFSET_StgEntCounter_link :: Int 138 oFFSET_StgEntCounter_link = 56 139 #define StgEntCounter_link(__ptr__) REP_StgEntCounter_link[__ptr__+OFFSET_StgEntCounter_link] 140 oFFSET_StgEntCounter_entry_count :: Int 141 oFFSET_StgEntCounter_entry_count = 40 142 #define StgEntCounter_entry_count(__ptr__) REP_StgEntCounter_entry_count[__ptr__+OFFSET_StgEntCounter_entry_count] 143 sIZEOF_StgUpdateFrame_NoHdr :: Int 144 sIZEOF_StgUpdateFrame_NoHdr = 8 145 sIZEOF_StgCatchFrame_NoHdr :: Int 146 sIZEOF_StgCatchFrame_NoHdr = 16 147 sIZEOF_StgStopFrame_NoHdr :: Int 148 sIZEOF_StgStopFrame_NoHdr = 0 149 sIZEOF_StgMutArrPtrs_NoHdr :: Int 150 sIZEOF_StgMutArrPtrs_NoHdr = 16 151 oFFSET_StgMutArrPtrs_ptrs :: Int 152 oFFSET_StgMutArrPtrs_ptrs = 0 153 #define StgMutArrPtrs_ptrs(__ptr__) REP_StgMutArrPtrs_ptrs[__ptr__+SIZEOF_StgHeader+OFFSET_StgMutArrPtrs_ptrs] 154 oFFSET_StgMutArrPtrs_size :: Int 155 oFFSET_StgMutArrPtrs_size = 8 156 #define StgMutArrPtrs_size(__ptr__) REP_StgMutArrPtrs_size[__ptr__+SIZEOF_StgHeader+OFFSET_StgMutArrPtrs_size] 157 sIZEOF_StgArrWords_NoHdr :: Int 158 sIZEOF_StgArrWords_NoHdr = 8 159 oFFSET_StgArrWords_bytes :: Int 160 oFFSET_StgArrWords_bytes = 0 161 #define StgArrWords_bytes(__ptr__) REP_StgArrWords_bytes[__ptr__+SIZEOF_StgHeader+OFFSET_StgArrWords_bytes] 162 oFFSET_StgArrWords_payload :: Int 163 oFFSET_StgArrWords_payload = 8 164 #define StgArrWords_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgArrWords_payload + WDS(__ix__)] 165 oFFSET_StgTSO__link :: Int 166 oFFSET_StgTSO__link = 0 167 #define StgTSO__link(__ptr__) REP_StgTSO__link[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO__link] 168 oFFSET_StgTSO_global_link :: Int 169 oFFSET_StgTSO_global_link = 8 170 #define StgTSO_global_link(__ptr__) REP_StgTSO_global_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_global_link] 171 oFFSET_StgTSO_what_next :: Int 172 oFFSET_StgTSO_what_next = 24 173 #define StgTSO_what_next(__ptr__) REP_StgTSO_what_next[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_what_next] 174 oFFSET_StgTSO_why_blocked :: Int 175 oFFSET_StgTSO_why_blocked = 26 176 #define StgTSO_why_blocked(__ptr__) REP_StgTSO_why_blocked[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_why_blocked] 177 oFFSET_StgTSO_block_info :: Int 178 oFFSET_StgTSO_block_info = 32 179 #define StgTSO_block_info(__ptr__) REP_StgTSO_block_info[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_block_info] 180 oFFSET_StgTSO_blocked_exceptions :: Int 181 oFFSET_StgTSO_blocked_exceptions = 72 182 #define StgTSO_blocked_exceptions(__ptr__) REP_StgTSO_blocked_exceptions[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_blocked_exceptions] 183 oFFSET_StgTSO_id :: Int 184 oFFSET_StgTSO_id = 40 185 #define StgTSO_id(__ptr__) REP_StgTSO_id[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_id] 186 oFFSET_StgTSO_cap :: Int 187 oFFSET_StgTSO_cap = 56 188 #define StgTSO_cap(__ptr__) REP_StgTSO_cap[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_cap] 189 oFFSET_StgTSO_saved_errno :: Int 190 oFFSET_StgTSO_saved_errno = 44 191 #define StgTSO_saved_errno(__ptr__) REP_StgTSO_saved_errno[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_saved_errno] 192 oFFSET_StgTSO_trec :: Int 193 oFFSET_StgTSO_trec = 64 194 #define StgTSO_trec(__ptr__) REP_StgTSO_trec[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_trec] 195 oFFSET_StgTSO_flags :: Int 196 oFFSET_StgTSO_flags = 28 197 #define StgTSO_flags(__ptr__) REP_StgTSO_flags[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_flags] 198 oFFSET_StgTSO_dirty :: Int 199 oFFSET_StgTSO_dirty = 16 200 #define StgTSO_dirty(__ptr__) REP_StgTSO_dirty[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_dirty] 201 oFFSET_StgTSO_bq :: Int 202 oFFSET_StgTSO_bq = 80 203 #define StgTSO_bq(__ptr__) REP_StgTSO_bq[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_bq] 204 oFFSET_StgTSO_CCCS :: Int 205 oFFSET_StgTSO_CCCS = 88 206 #define StgTSO_CCCS(__ptr__) REP_StgTSO_CCCS[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_CCCS] 207 oFFSET_StgTSO_sp :: Int 208 oFFSET_StgTSO_sp = 96 209 #define TSO_OFFSET_StgTSO_sp (SIZEOF_StgHeader+SIZEOF_OPT_StgTSOProfInfo+OFFSET_StgTSO_sp) 210 #define StgTSO_sp(__ptr__) REP_StgTSO_sp[__ptr__+TSO_OFFSET_StgTSO_sp] 211 oFFSET_StgTSO_stack :: Int 212 oFFSET_StgTSO_stack = 104 213 #define TSO_OFFSET_StgTSO_stack (SIZEOF_StgHeader+SIZEOF_OPT_StgTSOProfInfo+OFFSET_StgTSO_stack) 214 oFFSET_StgTSO_stack_size :: Int 215 oFFSET_StgTSO_stack_size = 88 216 #define TSO_OFFSET_StgTSO_stack_size (SIZEOF_StgHeader+SIZEOF_OPT_StgTSOProfInfo+OFFSET_StgTSO_stack_size) 217 #define StgTSO_stack_size(__ptr__) REP_StgTSO_stack_size[__ptr__+TSO_OFFSET_StgTSO_stack_size] 218 sIZEOF_StgTSOProfInfo :: Int 219 sIZEOF_StgTSOProfInfo = 8 220 #ifdef PROFILING 221 #define SIZEOF_OPT_StgTSOProfInfo SIZEOF_StgTSOProfInfo 222 #else 223 #define SIZEOF_OPT_StgTSOProfInfo 0 224 #endif 225 226 oFFSET_StgUpdateFrame_updatee :: Int 227 oFFSET_StgUpdateFrame_updatee = 0 228 #define StgUpdateFrame_updatee(__ptr__) REP_StgUpdateFrame_updatee[__ptr__+SIZEOF_StgHeader+OFFSET_StgUpdateFrame_updatee] 229 oFFSET_StgCatchFrame_handler :: Int 230 oFFSET_StgCatchFrame_handler = 8 231 #define StgCatchFrame_handler(__ptr__) REP_StgCatchFrame_handler[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchFrame_handler] 232 oFFSET_StgCatchFrame_exceptions_blocked :: Int 233 oFFSET_StgCatchFrame_exceptions_blocked = 0 234 #define StgCatchFrame_exceptions_blocked(__ptr__) REP_StgCatchFrame_exceptions_blocked[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchFrame_exceptions_blocked] 235 sIZEOF_StgPAP_NoHdr :: Int 236 sIZEOF_StgPAP_NoHdr = 16 237 oFFSET_StgPAP_n_args :: Int 238 oFFSET_StgPAP_n_args = 4 239 #define StgPAP_n_args(__ptr__) REP_StgPAP_n_args[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_n_args] 240 oFFSET_StgPAP_fun :: Int 241 oFFSET_StgPAP_fun = 8 242 #define StgPAP_fun(__ptr__) REP_StgPAP_fun[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_fun] 243 oFFSET_StgPAP_arity :: Int 244 oFFSET_StgPAP_arity = 0 245 #define StgPAP_arity(__ptr__) REP_StgPAP_arity[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_arity] 246 oFFSET_StgPAP_payload :: Int 247 oFFSET_StgPAP_payload = 16 248 #define StgPAP_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_payload + WDS(__ix__)] 249 sIZEOF_StgAP_NoThunkHdr :: Int 250 sIZEOF_StgAP_NoThunkHdr = 16 251 sIZEOF_StgAP_NoHdr :: Int 252 sIZEOF_StgAP_NoHdr = 24 253 oFFSET_StgAP_n_args :: Int 254 oFFSET_StgAP_n_args = 12 255 #define StgAP_n_args(__ptr__) REP_StgAP_n_args[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_n_args] 256 oFFSET_StgAP_fun :: Int 257 oFFSET_StgAP_fun = 16 258 #define StgAP_fun(__ptr__) REP_StgAP_fun[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_fun] 259 oFFSET_StgAP_payload :: Int 260 oFFSET_StgAP_payload = 24 261 #define StgAP_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_payload + WDS(__ix__)] 262 sIZEOF_StgAP_STACK_NoThunkHdr :: Int 263 sIZEOF_StgAP_STACK_NoThunkHdr = 16 264 sIZEOF_StgAP_STACK_NoHdr :: Int 265 sIZEOF_StgAP_STACK_NoHdr = 24 266 oFFSET_StgAP_STACK_size :: Int 267 oFFSET_StgAP_STACK_size = 8 268 #define StgAP_STACK_size(__ptr__) REP_StgAP_STACK_size[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_STACK_size] 269 oFFSET_StgAP_STACK_fun :: Int 270 oFFSET_StgAP_STACK_fun = 16 271 #define StgAP_STACK_fun(__ptr__) REP_StgAP_STACK_fun[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_STACK_fun] 272 oFFSET_StgAP_STACK_payload :: Int 273 oFFSET_StgAP_STACK_payload = 24 274 #define StgAP_STACK_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_STACK_payload + WDS(__ix__)] 275 sIZEOF_StgSelector_NoThunkHdr :: Int 276 sIZEOF_StgSelector_NoThunkHdr = 8 277 sIZEOF_StgSelector_NoHdr :: Int 278 sIZEOF_StgSelector_NoHdr = 16 279 oFFSET_StgInd_indirectee :: Int 280 oFFSET_StgInd_indirectee = 0 281 #define StgInd_indirectee(__ptr__) REP_StgInd_indirectee[__ptr__+SIZEOF_StgHeader+OFFSET_StgInd_indirectee] 282 sIZEOF_StgMutVar_NoHdr :: Int 283 sIZEOF_StgMutVar_NoHdr = 8 284 oFFSET_StgMutVar_var :: Int 285 oFFSET_StgMutVar_var = 0 286 #define StgMutVar_var(__ptr__) REP_StgMutVar_var[__ptr__+SIZEOF_StgHeader+OFFSET_StgMutVar_var] 287 sIZEOF_StgAtomicallyFrame_NoHdr :: Int 288 sIZEOF_StgAtomicallyFrame_NoHdr = 24 289 oFFSET_StgAtomicallyFrame_code :: Int 290 oFFSET_StgAtomicallyFrame_code = 0 291 #define StgAtomicallyFrame_code(__ptr__) REP_StgAtomicallyFrame_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgAtomicallyFrame_code] 292 oFFSET_StgAtomicallyFrame_next_invariant_to_check :: Int 293 oFFSET_StgAtomicallyFrame_next_invariant_to_check = 8 294 #define StgAtomicallyFrame_next_invariant_to_check(__ptr__) REP_StgAtomicallyFrame_next_invariant_to_check[__ptr__+SIZEOF_StgHeader+OFFSET_StgAtomicallyFrame_next_invariant_to_check] 295 oFFSET_StgAtomicallyFrame_result :: Int 296 oFFSET_StgAtomicallyFrame_result = 16 297 #define StgAtomicallyFrame_result(__ptr__) REP_StgAtomicallyFrame_result[__ptr__+SIZEOF_StgHeader+OFFSET_StgAtomicallyFrame_result] 298 oFFSET_StgInvariantCheckQueue_invariant :: Int 299 oFFSET_StgInvariantCheckQueue_invariant = 0 300 #define StgInvariantCheckQueue_invariant(__ptr__) REP_StgInvariantCheckQueue_invariant[__ptr__+SIZEOF_StgHeader+OFFSET_StgInvariantCheckQueue_invariant] 301 oFFSET_StgInvariantCheckQueue_my_execution :: Int 302 oFFSET_StgInvariantCheckQueue_my_execution = 8 303 #define StgInvariantCheckQueue_my_execution(__ptr__) REP_StgInvariantCheckQueue_my_execution[__ptr__+SIZEOF_StgHeader+OFFSET_StgInvariantCheckQueue_my_execution] 304 oFFSET_StgInvariantCheckQueue_next_queue_entry :: Int 305 oFFSET_StgInvariantCheckQueue_next_queue_entry = 16 306 #define StgInvariantCheckQueue_next_queue_entry(__ptr__) REP_StgInvariantCheckQueue_next_queue_entry[__ptr__+SIZEOF_StgHeader+OFFSET_StgInvariantCheckQueue_next_queue_entry] 307 oFFSET_StgAtomicInvariant_code :: Int 308 oFFSET_StgAtomicInvariant_code = 0 309 #define StgAtomicInvariant_code(__ptr__) REP_StgAtomicInvariant_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgAtomicInvariant_code] 310 oFFSET_StgTRecHeader_enclosing_trec :: Int 311 oFFSET_StgTRecHeader_enclosing_trec = 0 312 #define StgTRecHeader_enclosing_trec(__ptr__) REP_StgTRecHeader_enclosing_trec[__ptr__+SIZEOF_StgHeader+OFFSET_StgTRecHeader_enclosing_trec] 313 sIZEOF_StgCatchSTMFrame_NoHdr :: Int 314 sIZEOF_StgCatchSTMFrame_NoHdr = 16 315 oFFSET_StgCatchSTMFrame_handler :: Int 316 oFFSET_StgCatchSTMFrame_handler = 8 317 #define StgCatchSTMFrame_handler(__ptr__) REP_StgCatchSTMFrame_handler[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchSTMFrame_handler] 318 oFFSET_StgCatchSTMFrame_code :: Int 319 oFFSET_StgCatchSTMFrame_code = 0 320 #define StgCatchSTMFrame_code(__ptr__) REP_StgCatchSTMFrame_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchSTMFrame_code] 321 sIZEOF_StgCatchRetryFrame_NoHdr :: Int 322 sIZEOF_StgCatchRetryFrame_NoHdr = 24 323 oFFSET_StgCatchRetryFrame_running_alt_code :: Int 324 oFFSET_StgCatchRetryFrame_running_alt_code = 0 325 #define StgCatchRetryFrame_running_alt_code(__ptr__) REP_StgCatchRetryFrame_running_alt_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchRetryFrame_running_alt_code] 326 oFFSET_StgCatchRetryFrame_first_code :: Int 327 oFFSET_StgCatchRetryFrame_first_code = 8 328 #define StgCatchRetryFrame_first_code(__ptr__) REP_StgCatchRetryFrame_first_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchRetryFrame_first_code] 329 oFFSET_StgCatchRetryFrame_alt_code :: Int 330 oFFSET_StgCatchRetryFrame_alt_code = 16 331 #define StgCatchRetryFrame_alt_code(__ptr__) REP_StgCatchRetryFrame_alt_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchRetryFrame_alt_code] 332 oFFSET_StgTVarWatchQueue_closure :: Int 333 oFFSET_StgTVarWatchQueue_closure = 0 334 #define StgTVarWatchQueue_closure(__ptr__) REP_StgTVarWatchQueue_closure[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVarWatchQueue_closure] 335 oFFSET_StgTVarWatchQueue_next_queue_entry :: Int 336 oFFSET_StgTVarWatchQueue_next_queue_entry = 8 337 #define StgTVarWatchQueue_next_queue_entry(__ptr__) REP_StgTVarWatchQueue_next_queue_entry[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVarWatchQueue_next_queue_entry] 338 oFFSET_StgTVarWatchQueue_prev_queue_entry :: Int 339 oFFSET_StgTVarWatchQueue_prev_queue_entry = 16 340 #define StgTVarWatchQueue_prev_queue_entry(__ptr__) REP_StgTVarWatchQueue_prev_queue_entry[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVarWatchQueue_prev_queue_entry] 341 oFFSET_StgTVar_current_value :: Int 342 oFFSET_StgTVar_current_value = 0 343 #define StgTVar_current_value(__ptr__) REP_StgTVar_current_value[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVar_current_value] 344 sIZEOF_StgWeak_NoHdr :: Int 345 sIZEOF_StgWeak_NoHdr = 40 346 oFFSET_StgWeak_link :: Int 347 oFFSET_StgWeak_link = 32 348 #define StgWeak_link(__ptr__) REP_StgWeak_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_link] 349 oFFSET_StgWeak_key :: Int 350 oFFSET_StgWeak_key = 8 351 #define StgWeak_key(__ptr__) REP_StgWeak_key[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_key] 352 oFFSET_StgWeak_value :: Int 353 oFFSET_StgWeak_value = 16 354 #define StgWeak_value(__ptr__) REP_StgWeak_value[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_value] 355 oFFSET_StgWeak_finalizer :: Int 356 oFFSET_StgWeak_finalizer = 24 357 #define StgWeak_finalizer(__ptr__) REP_StgWeak_finalizer[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_finalizer] 358 oFFSET_StgWeak_cfinalizer :: Int 359 oFFSET_StgWeak_cfinalizer = 0 360 #define StgWeak_cfinalizer(__ptr__) REP_StgWeak_cfinalizer[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_cfinalizer] 361 sIZEOF_StgDeadWeak_NoHdr :: Int 362 sIZEOF_StgDeadWeak_NoHdr = 8 363 oFFSET_StgDeadWeak_link :: Int 364 oFFSET_StgDeadWeak_link = 0 365 #define StgDeadWeak_link(__ptr__) REP_StgDeadWeak_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgDeadWeak_link] 366 sIZEOF_StgMVar_NoHdr :: Int 367 sIZEOF_StgMVar_NoHdr = 24 368 oFFSET_StgMVar_head :: Int 369 oFFSET_StgMVar_head = 0 370 #define StgMVar_head(__ptr__) REP_StgMVar_head[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVar_head] 371 oFFSET_StgMVar_tail :: Int 372 oFFSET_StgMVar_tail = 8 373 #define StgMVar_tail(__ptr__) REP_StgMVar_tail[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVar_tail] 374 oFFSET_StgMVar_value :: Int 375 oFFSET_StgMVar_value = 16 376 #define StgMVar_value(__ptr__) REP_StgMVar_value[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVar_value] 377 sIZEOF_StgMVarTSOQueue_NoHdr :: Int 378 sIZEOF_StgMVarTSOQueue_NoHdr = 16 379 oFFSET_StgMVarTSOQueue_link :: Int 380 oFFSET_StgMVarTSOQueue_link = 0 381 #define StgMVarTSOQueue_link(__ptr__) REP_StgMVarTSOQueue_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVarTSOQueue_link] 382 oFFSET_StgMVarTSOQueue_tso :: Int 383 oFFSET_StgMVarTSOQueue_tso = 8 384 #define StgMVarTSOQueue_tso(__ptr__) REP_StgMVarTSOQueue_tso[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVarTSOQueue_tso] 385 sIZEOF_StgBCO_NoHdr :: Int 386 sIZEOF_StgBCO_NoHdr = 32 387 oFFSET_StgBCO_instrs :: Int 388 oFFSET_StgBCO_instrs = 0 389 #define StgBCO_instrs(__ptr__) REP_StgBCO_instrs[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_instrs] 390 oFFSET_StgBCO_literals :: Int 391 oFFSET_StgBCO_literals = 8 392 #define StgBCO_literals(__ptr__) REP_StgBCO_literals[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_literals] 393 oFFSET_StgBCO_ptrs :: Int 394 oFFSET_StgBCO_ptrs = 16 395 #define StgBCO_ptrs(__ptr__) REP_StgBCO_ptrs[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_ptrs] 396 oFFSET_StgBCO_arity :: Int 397 oFFSET_StgBCO_arity = 24 398 #define StgBCO_arity(__ptr__) REP_StgBCO_arity[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_arity] 399 oFFSET_StgBCO_size :: Int 400 oFFSET_StgBCO_size = 28 401 #define StgBCO_size(__ptr__) REP_StgBCO_size[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_size] 402 oFFSET_StgBCO_bitmap :: Int 403 oFFSET_StgBCO_bitmap = 32 404 #define StgBCO_bitmap(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_bitmap + WDS(__ix__)] 405 sIZEOF_StgStableName_NoHdr :: Int 406 sIZEOF_StgStableName_NoHdr = 8 407 oFFSET_StgStableName_sn :: Int 408 oFFSET_StgStableName_sn = 0 409 #define StgStableName_sn(__ptr__) REP_StgStableName_sn[__ptr__+SIZEOF_StgHeader+OFFSET_StgStableName_sn] 410 sIZEOF_StgBlockingQueue_NoHdr :: Int 411 sIZEOF_StgBlockingQueue_NoHdr = 32 412 oFFSET_StgBlockingQueue_bh :: Int 413 oFFSET_StgBlockingQueue_bh = 8 414 #define StgBlockingQueue_bh(__ptr__) REP_StgBlockingQueue_bh[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_bh] 415 oFFSET_StgBlockingQueue_owner :: Int 416 oFFSET_StgBlockingQueue_owner = 16 417 #define StgBlockingQueue_owner(__ptr__) REP_StgBlockingQueue_owner[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_owner] 418 oFFSET_StgBlockingQueue_queue :: Int 419 oFFSET_StgBlockingQueue_queue = 24 420 #define StgBlockingQueue_queue(__ptr__) REP_StgBlockingQueue_queue[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_queue] 421 oFFSET_StgBlockingQueue_link :: Int 422 oFFSET_StgBlockingQueue_link = 0 423 #define StgBlockingQueue_link(__ptr__) REP_StgBlockingQueue_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_link] 424 sIZEOF_MessageBlackHole_NoHdr :: Int 425 sIZEOF_MessageBlackHole_NoHdr = 24 426 oFFSET_MessageBlackHole_link :: Int 427 oFFSET_MessageBlackHole_link = 0 428 #define MessageBlackHole_link(__ptr__) REP_MessageBlackHole_link[__ptr__+SIZEOF_StgHeader+OFFSET_MessageBlackHole_link] 429 oFFSET_MessageBlackHole_tso :: Int 430 oFFSET_MessageBlackHole_tso = 8 431 #define MessageBlackHole_tso(__ptr__) REP_MessageBlackHole_tso[__ptr__+SIZEOF_StgHeader+OFFSET_MessageBlackHole_tso] 432 oFFSET_MessageBlackHole_bh :: Int 433 oFFSET_MessageBlackHole_bh = 16 434 #define MessageBlackHole_bh(__ptr__) REP_MessageBlackHole_bh[__ptr__+SIZEOF_StgHeader+OFFSET_MessageBlackHole_bh] 435 oFFSET_RtsFlags_ProfFlags_showCCSOnException :: Int 436 oFFSET_RtsFlags_ProfFlags_showCCSOnException = 224 437 #define RtsFlags_ProfFlags_showCCSOnException(__ptr__) REP_RtsFlags_ProfFlags_showCCSOnException[__ptr__+OFFSET_RtsFlags_ProfFlags_showCCSOnException] 438 oFFSET_RtsFlags_DebugFlags_apply :: Int 439 oFFSET_RtsFlags_DebugFlags_apply = 176 440 #define RtsFlags_DebugFlags_apply(__ptr__) REP_RtsFlags_DebugFlags_apply[__ptr__+OFFSET_RtsFlags_DebugFlags_apply] 441 oFFSET_RtsFlags_DebugFlags_sanity :: Int 442 oFFSET_RtsFlags_DebugFlags_sanity = 160 443 #define RtsFlags_DebugFlags_sanity(__ptr__) REP_RtsFlags_DebugFlags_sanity[__ptr__+OFFSET_RtsFlags_DebugFlags_sanity] 444 oFFSET_RtsFlags_DebugFlags_weak :: Int 445 oFFSET_RtsFlags_DebugFlags_weak = 144 446 #define RtsFlags_DebugFlags_weak(__ptr__) REP_RtsFlags_DebugFlags_weak[__ptr__+OFFSET_RtsFlags_DebugFlags_weak] 447 oFFSET_RtsFlags_GcFlags_initialStkSize :: Int 448 oFFSET_RtsFlags_GcFlags_initialStkSize = 16 449 #define RtsFlags_GcFlags_initialStkSize(__ptr__) REP_RtsFlags_GcFlags_initialStkSize[__ptr__+OFFSET_RtsFlags_GcFlags_initialStkSize] 450 oFFSET_RtsFlags_MiscFlags_tickInterval :: Int 451 oFFSET_RtsFlags_MiscFlags_tickInterval = 112 452 #define RtsFlags_MiscFlags_tickInterval(__ptr__) REP_RtsFlags_MiscFlags_tickInterval[__ptr__+OFFSET_RtsFlags_MiscFlags_tickInterval] 453 sIZEOF_StgFunInfoExtraFwd :: Int 454 sIZEOF_StgFunInfoExtraFwd = 32 455 oFFSET_StgFunInfoExtraFwd_slow_apply :: Int 456 oFFSET_StgFunInfoExtraFwd_slow_apply = 24 457 #define StgFunInfoExtraFwd_slow_apply(__ptr__) REP_StgFunInfoExtraFwd_slow_apply[__ptr__+OFFSET_StgFunInfoExtraFwd_slow_apply] 458 oFFSET_StgFunInfoExtraFwd_fun_type :: Int 459 oFFSET_StgFunInfoExtraFwd_fun_type = 0 460 #define StgFunInfoExtraFwd_fun_type(__ptr__) REP_StgFunInfoExtraFwd_fun_type[__ptr__+OFFSET_StgFunInfoExtraFwd_fun_type] 461 oFFSET_StgFunInfoExtraFwd_arity :: Int 462 oFFSET_StgFunInfoExtraFwd_arity = 4 463 #define StgFunInfoExtraFwd_arity(__ptr__) REP_StgFunInfoExtraFwd_arity[__ptr__+OFFSET_StgFunInfoExtraFwd_arity] 464 oFFSET_StgFunInfoExtraFwd_bitmap :: Int 465 oFFSET_StgFunInfoExtraFwd_bitmap = 16 466 #define StgFunInfoExtraFwd_bitmap(__ptr__) REP_StgFunInfoExtraFwd_bitmap[__ptr__+OFFSET_StgFunInfoExtraFwd_bitmap] 467 sIZEOF_StgFunInfoExtraRev :: Int 468 sIZEOF_StgFunInfoExtraRev = 32 469 oFFSET_StgFunInfoExtraRev_slow_apply_offset :: Int 470 oFFSET_StgFunInfoExtraRev_slow_apply_offset = 0 471 #define StgFunInfoExtraRev_slow_apply_offset(__ptr__) REP_StgFunInfoExtraRev_slow_apply_offset[__ptr__+OFFSET_StgFunInfoExtraRev_slow_apply_offset] 472 oFFSET_StgFunInfoExtraRev_fun_type :: Int 473 oFFSET_StgFunInfoExtraRev_fun_type = 24 474 #define StgFunInfoExtraRev_fun_type(__ptr__) REP_StgFunInfoExtraRev_fun_type[__ptr__+OFFSET_StgFunInfoExtraRev_fun_type] 475 oFFSET_StgFunInfoExtraRev_arity :: Int 476 oFFSET_StgFunInfoExtraRev_arity = 28 477 #define StgFunInfoExtraRev_arity(__ptr__) REP_StgFunInfoExtraRev_arity[__ptr__+OFFSET_StgFunInfoExtraRev_arity] 478 oFFSET_StgFunInfoExtraRev_bitmap :: Int 479 oFFSET_StgFunInfoExtraRev_bitmap = 8 480 #define StgFunInfoExtraRev_bitmap(__ptr__) REP_StgFunInfoExtraRev_bitmap[__ptr__+OFFSET_StgFunInfoExtraRev_bitmap] 481 oFFSET_StgLargeBitmap_size :: Int 482 oFFSET_StgLargeBitmap_size = 0 483 #define StgLargeBitmap_size(__ptr__) REP_StgLargeBitmap_size[__ptr__+OFFSET_StgLargeBitmap_size] 484 oFFSET_StgLargeBitmap_bitmap :: Int 485 oFFSET_StgLargeBitmap_bitmap = 8 486 sIZEOF_snEntry :: Int 487 sIZEOF_snEntry = 32 488 oFFSET_snEntry_sn_obj :: Int 489 oFFSET_snEntry_sn_obj = 24 490 #define snEntry_sn_obj(__ptr__) REP_snEntry_sn_obj[__ptr__+OFFSET_snEntry_sn_obj] 491 oFFSET_snEntry_addr :: Int 492 oFFSET_snEntry_addr = 0 493 #define snEntry_addr(__ptr__) REP_snEntry_addr[__ptr__+OFFSET_snEntry_addr] -
includes/ghc.mk
diff -rN -u old-ghc_bf/includes/ghc.mk new-ghc_bf-2/includes/ghc.mk
old new 126 126 127 127 includes_dist-derivedconstants_C_SRCS = mkDerivedConstants.c 128 128 includes_dist-derivedconstants_PROG = mkDerivedConstants$(exeext) 129 ifeq "$(HOSTPLATFORM)" "x86_64-unknown-barrelfish" 130 includes_dist-derivedconstants_LD_OPTS = -lbarrelfish -lc 131 endif 129 132 130 133 $(eval $(call build-prog,includes,dist-derivedconstants,1)) 131 134 … … 133 136 includes/dist-derivedconstants/build/mkDerivedConstants.o : $(includes_H_CONFIG) $(includes_H_PLATFORM) 134 137 135 138 ifneq "$(BINDIST)" "YES" 139 ifeq "$(HOSTPLATFORM)" "x86_64-unknown-barrelfish" 140 $(includes_DERIVEDCONSTANTS) : $(INPLACE_BIN)/mkDerivedConstants$(exeext) 141 $(if $(includes_DERIVEDCONSTANTS),touch $(includes_DERIVEDCONSTANTS), @echo "Compiling for Barrelfish - please run mkDerivedConstants in Barrelfish and copy result to includes/DerivedConstants.h"; @exit 1) 142 else 136 143 $(includes_DERIVEDCONSTANTS) : $(INPLACE_BIN)/mkDerivedConstants$(exeext) 137 144 ./$< >$@ 138 145 endif 146 endif 139 147 140 148 endif 141 149 … … 155 163 includes_dist-ghcconstants_C_SRCS = mkDerivedConstants.c 156 164 includes_dist-ghcconstants_PROG = mkGHCConstants$(exeext) 157 165 includes_dist-ghcconstants_CC_OPTS = -DGEN_HASKELL 166 ifeq "$(HOSTPLATFORM)" "x86_64-unknown-barrelfish" 167 includes_dist-ghcconstants_LD_OPTS = -lbarrelfish -lc 168 endif 158 169 159 170 $(eval $(call build-prog,includes,dist-ghcconstants,1)) 160 171 … … 163 174 164 175 includes/dist-ghcconstants/build/mkDerivedConstants.o : $(includes_H_CONFIG) $(includes_H_PLATFORM) 165 176 177 ifeq "$(HOSTPLATFORM)" "x86_64-unknown-barrelfish" 178 $(includes_GHCCONSTANTS) : $(INPLACE_BIN)/mkGHCConstants$(exeext) 179 $(if $(includes_GHCCONSTANTS), touch $(includes_GHCCONSTANTS), @echo "Compiling for Barrelfish - please run mkGHCConstants in Barrelfish and copy result to includes/GHCConstants.h"; @exit 1) 180 else 166 181 $(includes_GHCCONSTANTS) : $(INPLACE_BIN)/mkGHCConstants$(exeext) 167 182 ./$< >$@ 168 183 endif 184 endif 169 185 170 186 endif 171 187 -
includes/rts/Config.h
diff -rN -u old-ghc_bf/includes/rts/Config.h new-ghc_bf-2/includes/rts/Config.h
old new 38 38 Signals - supported on non-PAR versions of the runtime. See RtsSignals.h. 39 39 -------------------------------------------------------------------------- */ 40 40 41 #ifndef BARRELFISH 41 42 #define RTS_USER_SIGNALS 1 43 #endif 42 44 43 45 /* Profile spin locks */ 44 46 -
includes/rts/FileLock.h
diff -rN -u old-ghc_bf/includes/rts/FileLock.h new-ghc_bf-2/includes/rts/FileLock.h
old new 18 18 #include <sys/types.h> 19 19 #endif 20 20 21 #ifndef barrelfish_HOST_OS 22 21 23 int lockFile(int fd, dev_t dev, ino_t ino, int for_writing); 22 24 int unlockFile(int fd); 23 25 26 #endif 27 24 28 #endif /* RTS_FILELOCK_H */ -
includes/rts/OSThreads.h
diff -rN -u old-ghc_bf/includes/rts/OSThreads.h new-ghc_bf-2/includes/rts/OSThreads.h
old new 17 17 18 18 #if defined(THREADED_RTS) /* to the end */ 19 19 20 # if defined(HAVE_PTHREAD_H) && !defined(WANT_NATIVE_WIN32_THREADS) 20 # if defined(barrelfish_HOST_OS) 21 22 #if CMINUSMINUS 23 24 #define ACQUIRE_LOCK(mutex) foreign "C" thread_mutex_lock(mutex) 25 #define RELEASE_LOCK(mutex) foreign "C" thread_mutex_unlock(mutex) 26 #define ASSERT_LOCK_HELD(mutex) /* nothing */ 27 28 #else 29 30 #include <barrelfish/barrelfish.h> 31 #include <barrelfish/threads.h> 32 #include <errno.h> 33 34 typedef struct thread_cond Condition; 35 typedef struct thread_mutex Mutex; 36 typedef struct thread * OSThreadId; 37 typedef int ThreadLocalKey; 38 39 #define OSThreadProcAttr /* nothing */ 40 41 #define OSThreadNullId NULL 42 43 #define INIT_COND_VAR THREAD_COND_INITIALIZER 44 45 #ifdef LOCK_DEBUG 46 #define LOCK_DEBUG_BELCH(what, mutex) \ 47 debugBelch("%s(0x%p) %s %d\n", what, mutex, __FILE__, __LINE__) 48 #else 49 #define LOCK_DEBUG_BELCH(what, mutex) /* nothing */ 50 #endif 51 52 /* Always check the result of lock and unlock. */ 53 #define ACQUIRE_LOCK(mutex) \ 54 LOCK_DEBUG_BELCH("ACQUIRE_LOCK", mutex); \ 55 thread_mutex_lock(mutex) 56 57 #define RELEASE_LOCK(mutex) \ 58 LOCK_DEBUG_BELCH("RELEASE_LOCK", mutex); \ 59 thread_mutex_unlock(mutex) 60 61 // Can't do this yet as pthreads in BF don't return anything yet 62 #define ASSERT_LOCK_HELD(mutex) 63 64 #endif // CMINUSMINUS 65 66 # elif defined(HAVE_PTHREAD_H) && !defined(WANT_NATIVE_WIN32_THREADS) 21 67 22 68 #if CMINUSMINUS 23 69 … … 37 83 38 84 #define OSThreadProcAttr /* nothing */ 39 85 86 #define OSThreadNullId 0 87 40 88 #define INIT_COND_VAR PTHREAD_COND_INITIALIZER 41 89 42 90 #ifdef LOCK_DEBUG … … 59 107 barf("RELEASE_LOCK: I do not own this lock: %s %d", __FILE__,__LINE__); \ 60 108 } 61 109 62 // Note: this assertion calls pthread_mutex_lock() on a mutex that 63 // is already held by the calling thread. The mutex should therefore 64 // have been created with PTHREAD_MUTEX_ERRORCHECK, otherwise this 65 // assertion will hang. We always initialise mutexes with 66 // PTHREAD_MUTEX_ERRORCHECK when DEBUG is on (see rts/posix/OSThreads.h). 67 #define ASSERT_LOCK_HELD(mutex) ASSERT(pthread_mutex_lock(mutex) == EDEADLK) 110 #define ASSERT_LOCK_HELD(mutex) /* can't do this on barrelfish yet */ 68 111 69 112 #endif // CMINUSMINUS 70 113 … … 91 134 92 135 #define OSThreadProcAttr __stdcall 93 136 137 #define OSThreadNullId 138 94 139 #define INIT_COND_VAR 0 95 140 96 141 // We have a choice for implementing Mutexes on Windows. Standard -
includes/Rts.h
diff -rN -u old-ghc_bf/includes/Rts.h new-ghc_bf-2/includes/Rts.h
old new 223 223 224 224 void stg_exit(int n) GNU_ATTRIBUTE(__noreturn__); 225 225 226 #if ndef mingw32_HOST_OS226 #if !defined(mingw32_HOST_OS) && !defined(barrelfish_HOST_OS) 227 227 int stg_sig_install (int, int, void *); 228 228 #endif 229 229 -
libffi/bfish.patch
diff -rN -u old-ghc_bf/libffi/bfish.patch new-ghc_bf-2/libffi/bfish.patch
old new 1 diff -Nur build_old/src/closures.c build/src/closures.c 2 --- build_old/src/closures.c 2010-08-03 11:41:04.924917426 +0100 3 +++ build/src/closures.c 2010-08-03 12:33:32.397267337 +0100 4 @@ -99,14 +100,16 @@ 5 6 #include <sys/types.h> 7 #include <sys/stat.h> 8 +#ifndef BARRELFISH 9 #include <fcntl.h> 10 +#endif 11 #include <errno.h> 12 #ifndef _MSC_VER 13 #include <unistd.h> 14 #endif 15 #include <string.h> 16 #include <stdio.h> 17 -#if !defined(X86_WIN32) && !defined(X86_WIN64) 18 +#if !defined(X86_WIN32) && !defined(X86_WIN64) && !defined(BARRELFISH) 19 #ifdef HAVE_MNTENT 20 #include <mntent.h> 21 #endif /* HAVE_MNTENT */ 22 @@ -116,6 +119,7 @@ 23 /* We don't want sys/mman.h to be included after we redefine mmap and 24 dlmunmap. */ 25 #include <sys/mman.h> 26 + 27 #define LACKS_SYS_MMAN_H 1 28 29 #if FFI_MMAP_EXEC_SELINUX 30 @@ -193,7 +197,7 @@ 31 static size_t dlmalloc_usable_size(void*) MAYBE_UNUSED; 32 static void dlmalloc_stats(void) MAYBE_UNUSED; 33 34 -#if !(defined(X86_WIN32) || defined(X86_WIN64)) || defined (__CYGWIN__) 35 +#if !(defined(X86_WIN32) || defined(X86_WIN64) || defined(BARRELFISH)) || defined (__CYGWIN__) 36 /* Use these for mmap and munmap within dlmalloc.c. */ 37 static void *dlmmap(void *, size_t, int, int, int, off_t); 38 static int dlmunmap(void *, size_t); 39 @@ -487,6 +491,9 @@ 40 int flags, int fd, off_t offset) 41 { 42 43 +#ifdef BARRELFISH 44 + return NULL; 45 +#else 46 assert (start == NULL && length % malloc_getpagesize == 0 47 && prot == (PROT_READ | PROT_WRITE) 48 && flags == (MAP_PRIVATE | MAP_ANONYMOUS) 49 @@ -497,6 +504,7 @@ 50 #endif 51 52 return mmap (start, length, prot | PROT_EXEC, flags, fd, offset); 53 +#endif 54 } 55 56 #endif 57 diff -Nur build_old/src/dlmalloc.c build/src/dlmalloc.c 58 --- build_old/src/dlmalloc.c 2010-08-03 11:41:04.936929160 +0100 59 +++ build/src/dlmalloc.c 2010-08-03 12:20:30.873310373 +0100 60 @@ -459,6 +459,18 @@ 61 #define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */ 62 #endif /* WIN32 */ 63 64 +#ifdef BARRELFISH 65 +#define HAVE_MMAP 0 66 +#define HAVE_MORECORE 1 67 +#define LACKS_UNISTD_H 68 +#define LACKS_SYS_PARAM_H 69 +#define LACKS_SYS_MMAN_H 70 +#define LACKS_STRING_H 71 +#define LACKS_STRINGS_H 72 +#define LACKS_SYS_TYPES_H 73 +#define LACKS_ERRNO_H 74 +#endif 75 + 76 #if defined(DARWIN) || defined(_DARWIN) 77 /* Mac OSX docs advise not to use sbrk; it seems better to use mmap */ 78 #ifndef HAVE_MORECORE 79 @@ -1387,7 +1399,28 @@ 80 unique mparams values are initialized only once. 81 */ 82 83 -#ifndef WIN32 84 +#ifdef BARRELFISH 85 +#include <barrelfish/barrelfish.h> 86 +#define MLOCK_T struct thread_mutex 87 +static inline int thread_mutex_lock_wrapper(struct thread_mutex* l) { 88 + thread_mutex_lock(l); 89 + return 0; 90 +} 91 +static inline int thread_mutex_unlock_wrapper(struct thread_mutex* l) { 92 + thread_mutex_unlock(l); 93 + return 0; 94 +} 95 +#define INITIAL_LOCK(l) thread_mutex_init(l) 96 +#define ACQUIRE_LOCK(l) thread_mutex_lock_wrapper(l) 97 +#define RELEASE_LOCK(l) thread_mutex_unlock_wrapper(l) 98 + 99 +#if HAVE_MORECORE 100 +static MLOCK_T morecore_mutex = THREAD_MUTEX_INITIALIZER; 101 +#endif /* HAVE_MORECORE */ 102 + 103 +static MLOCK_T magic_init_mutex = THREAD_MUTEX_INITIALIZER; 104 + 105 +#elif !defined(WIN32) 106 /* By default use posix locks */ 107 #include <pthread.h> 108 #define MLOCK_T pthread_mutex_t -
libffi/ghc.mk
diff -rN -u old-ghc_bf/libffi/ghc.mk new-ghc_bf-2/libffi/ghc.mk
old new 34 34 # 35 35 # We use libffi's own configuration stuff. 36 36 37 PLATFORM := $(shell echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g') 37 FFI_BUILDPLATFORM := $(shell echo $(BUILDPLATFORM) | sed 's/i[567]86/i486/g') 38 FFI_HOSTPLATFORM := $(shell echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g') 38 39 39 40 # 2007-07-05 40 41 # Passing … … 105 106 cat ghc-tarballs/libffi/libffi*.tar.gz | $(GZIP_CMD) -d | { cd libffi && $(TAR_CMD) -xf - ; } 106 107 mv libffi/libffi-* libffi/build 107 108 chmod +x libffi/ln 109 ifeq "$(HostOS_CPP)" "barrelfish" 110 cp config.sub libffi/build/config.sub 111 (cd libffi; patch -p0 < bfish.patch) 112 endif 108 113 109 114 # Because -Werror may be in SRC_CC_OPTS/SRC_LD_OPTS, we need to turn 110 115 # warnings off or the compilation of libffi might fail due to warnings … … 116 121 LD=$(LD) \ 117 122 AR=$(AR) \ 118 123 NM=$(NM) \ 119 CFLAGS="$(SRC_CC_OPTS) $(CONF_CC_OPTS) -w" \120 LDFLAGS="$(SRC_LD_OPTS) $(CONF_LD_OPTS) -w" \124 CFLAGS="$(SRC_CC_OPTS) $(CONF_CC_OPTS) $(STAGE_1_CC_OPTS) -w" \ 125 LDFLAGS="$(SRC_LD_OPTS) $(CONF_LD_OPTS) $(LIBFFI_LD_OPTS) -w" \ 121 126 "$(SHELL)" configure \ 122 127 --enable-static=yes \ 123 --enable-shared= $(libffi_EnableShared)\124 --host=$( PLATFORM) --build=$(PLATFORM)128 --enable-shared=no \ 129 --host=$(FFI_HOSTPLATFORM) --build=$(FFI_BUILDPLATFORM) 125 130 126 131 # libffi.so needs to be built with the correct soname. 127 132 # NOTE: this builds libffi_convience.so with the incorrect -
mk/build.mk.bf
diff -rN -u old-ghc_bf/mk/build.mk.bf new-ghc_bf-2/mk/build.mk.bf
old new 1 # ----------------------------------------------------------------------------- 2 # A Sample build.mk 3 # 4 # Uncomment one of the following BuildFlavour settings to get the desired 5 # overall build type, and then tweak the options in the relevant section 6 # below. 7 8 # Uncomment one of these to select a build profile below: 9 10 # Fast build with barrelfish support 11 BuildFlavour = bf 12 13 14 # -------- A Fast build with optimised libs ---------------------------------- 15 16 ifeq "$(BuildFlavour)" "bf" 17 18 # TODO - Not hard code these... 19 BF_ROOT = ${HOME}/barrelfish.ghc/ 20 BF_BUILD_DIR = ${BF_ROOT}/build/x86_64/ 21 22 STAGE_1_CC_OPTS = -fno-builtin -nostdinc -m64 -mno-red-zone -fPIE -fno-stack-protector -U__linux__ -imacros ${BF_ROOT}/include/deputy/nodeputy.h -DBARRELFISH -DMAX_CPUS=64 -DCONFIG_INTERCONNECT_DRIVER_LMP -DCONFIG_INTERCONNECT_DRIVER_UMP -DCONFIG_FLOUNDER_BACKEND_LMP -DCONFIG_FLOUNDER_BACKEND_UMP -g -I${BF_ROOT}/include -I${BF_ROOT}/include/arch/x86_64 -I${BF_BUILD_DIR}/include 23 STAGE_2_CC_OPTS = ${STAGE_1_CC_OPTS} 24 25 STAGE_1_LD_OPTS = -static ${BF_BUILD_DIR}/lib/crt0.o ${BF_BUILD_DIR}/errors/errno.o -Wl,-section-start,.data.rel.ro=0x800000 -Wl,-z,max-page-size=0x1000 -fno-builtin -nostdlib -m64 -L${BF_BUILD_DIR}/lib/ -Wl,--start-group -lmsun -lposixcompat -lvfs -lnfs -llwip -ltimer -lbarrelfish -lc 26 #endif 27 STAGE_2_LD_OPTS = ${STAGE_1_LD_OPTS} 28 29 LIBFFI_LD_OPTS = -static -Wl,-section-start,.data.rel.ro=0x800000 -Wl,-z,max-page-size=0x1000 -fno-builtin -nostdlib -m64 -L${BF_BUILD_DIR}/lib/ -lbarrelfish -lc 30 31 BUILTIN_HC_OPTS = $(addprefix -optc, $(STAGE_1_CC_OPTS)) $(addprefix -optl, $(STAGE_1_LD_OPTS)) -opta-m64 32 33 SRC_HC_OPTS = -H64m -O0 -fasm 34 GhcStage1HcOpts = -O -fasm 35 GhcLibHcOpts = -O -fasm 36 GhcLibWays = v 37 GhcRTSWays = v thr 38 SplitObjs = NO 39 HADDOCK_DOCS = NO 40 BUILD_DOCBOOK_HTML = NO 41 BUILD_DOCBOOK_PS = NO 42 BUILD_DOCBOOK_PDF = NO 43 INTEGER_LIBRARY = integer-simple 44 45 endif 46 47 # NoFib settings 48 NoFibWays = 49 STRIP_CMD = : -
mk/project.mk.in
diff -rN -u old-ghc_bf/mk/project.mk.in new-ghc_bf-2/mk/project.mk.in
old new 135 135 Windows=NO 136 136 endif 137 137 138 ifneq "$(findstring $(HostOS_CPP), barrelfish)" "" 139 Barrelfish=YES 140 else 141 Barrelfish=NO 142 endif 143 -
rts/barrelfish/GetTime.c
diff -rN -u old-ghc_bf/rts/barrelfish/GetTime.c new-ghc_bf-2/rts/barrelfish/GetTime.c
old new 1 /* ----------------------------------------------------------------------------- 2 * 3 * (c) The GHC Team 2005 4 * 5 * Machine-dependent time measurement functions 6 * 7 * ---------------------------------------------------------------------------*/ 8 9 // Not POSIX, due to use of ru_majflt in getPageFaults() 10 // #include "PosixSource.h" 11 12 #include "Rts.h" 13 #include "GetTime.h" 14 15 Ticks getProcessCPUTime(void) 16 { 17 printf("NYI getProcessCPUTime\n"); 18 return -1; 19 } 20 21 Ticks getProcessElapsedTime(void) 22 { 23 printf("NYI getProcessElapsedTime\n"); 24 return -1; 25 } 26 27 void getProcessTimes(Ticks *user, Ticks *elapsed) 28 { 29 *user = getProcessCPUTime(); 30 *elapsed = getProcessElapsedTime(); 31 } 32 33 Ticks getThreadCPUTime(void) 34 { 35 return getProcessCPUTime(); 36 } 37 nat 38 getPageFaults(void) 39 { 40 return 0; 41 } 42 -
rts/barrelfish/Itimer.c
diff -rN -u old-ghc_bf/rts/barrelfish/Itimer.c new-ghc_bf-2/rts/barrelfish/Itimer.c
old new 1 /* ----------------------------------------------------------------------------- 2 * 3 * (c) The GHC Team, 1995-2007 4 * 5 * Interval timer for profiling and pre-emptive scheduling. 6 * 7 * ---------------------------------------------------------------------------*/ 8 9 #include "Rts.h" 10 11 #include "Ticker.h" 12 13 /* TODO */ 14 15 void 16 initTicker (nat ms, TickProc handle_tick) 17 { 18 } 19 20 void 21 startTicker(void) 22 { 23 } 24 25 void 26 stopTicker(void) 27 { 28 } 29 30 void 31 exitTicker (rtsBool wait STG_UNUSED) 32 { 33 } 34 -
rts/barrelfish/OSMem.c
diff -rN -u old-ghc_bf/rts/barrelfish/OSMem.c new-ghc_bf-2/rts/barrelfish/OSMem.c
old new 1 /* ----------------------------------------------------------------------------- 2 * 3 * (c) The University of Glasgow 2006-2007 4 * 5 * OS-specific memory management 6 * 7 * ---------------------------------------------------------------------------*/ 8 9 // This is non-posix compliant. 10 // #include "PosixSource.h" 11 12 #include "Rts.h" 13 #include "barrelfish/barrelfish.h" 14 15 #include "RtsUtils.h" 16 #include "sm/OSMem.h" 17 18 #include <errno.h> 19 20 #define MAP_FLAGS VREGION_FLAGS_READ | VREGION_FLAGS_WRITE | VREGION_FLAGS_EXECUTE 21 22 /* alloc_rec keeps the info we need to have matching mmap and unmap calls. */ 23 typedef struct alloc_rec_ { 24 char* base; /* non-aligned base address, directly from mmap */ 25 int size; /* Size in bytes */ 26 struct alloc_rec_* next; 27 } alloc_rec; 28 29 typedef struct block_rec_ { 30 char* base; /* base address, non-MBLOCK-aligned */ 31 int size; /* size in bytes */ 32 struct block_rec_* next; 33 } block_rec; 34 35 static alloc_rec* allocs = NULL; 36 static block_rec* free_blocks = NULL; 37 38 void 39 osMemInit(void) 40 { 41 allocs = NULL; 42 free_blocks = NULL; 43 } 44 45 static 46 alloc_rec* 47 allocNew(nat n) { 48 alloc_rec* rec; 49 rec = (alloc_rec*)stgMallocBytes(sizeof(alloc_rec),"getMBlocks: allocNew"); 50 rec->size = (n+1)*MBLOCK_SIZE; 51 struct capref frame; 52 53 errval_t err = frame_alloc(&frame, rec->size, NULL); 54 if(err_is_fail(err)) { 55 DEBUG_ERR(err, "OS_Mem, frame create"); 56 exit(-1); 57 } 58 59 struct memobj * memobj; 60 struct vregion * vregion; 61 err = vspace_map_one_frame_attr( 62 (void **)&rec->base, rec->size, frame, 63 MAP_FLAGS, &memobj, &vregion); 64 if(err_is_fail(err) || rec->base==0) { 65 stgFree((void*)rec); 66 rec=0; 67 DEBUG_ERR(err, "OS_Mem, map one frame"); 68 errorBelch("vspace_map_one_frame failed"); 69 } else { 70 alloc_rec temp; 71 temp.base=0; temp.size=0; temp.next=allocs; 72 73 alloc_rec* it; 74 it=&temp; 75 for(; it->next!=0 && it->next->base<rec->base; it=it->next) ; 76 rec->next=it->next; 77 it->next=rec; 78 allocs=temp.next; 79 } 80 return rec; 81 } 82 83 static 84 void 85 insertFree(char* alloc_base, int alloc_size) { 86 block_rec temp; 87 block_rec* it; 88 block_rec* prev; 89 90 temp.base=0; temp.size=0; temp.next=free_blocks; 91 it = free_blocks; 92 prev = &temp; 93 for( ; it!=0 && it->base<alloc_base; prev=it, it=it->next) {} 94 95 if(it!=0 && alloc_base+alloc_size == it->base) { 96 if(prev->base + prev->size == alloc_base) { /* Merge it, alloc, prev */ 97 prev->size += alloc_size + it->size; 98 prev->next = it->next; 99 stgFree(it); 100 } else { /* Merge it, alloc */ 101 it->base = alloc_base; 102 it->size += alloc_size; 103 } 104 } else if(prev->base + prev->size == alloc_base) { /* Merge alloc, prev */ 105 prev->size += alloc_size; 106 } else { /* Merge none */ 107 block_rec* rec; 108 rec = (block_rec*)stgMallocBytes(sizeof(block_rec),"getMBlocks: insertFree"); 109 rec->base=alloc_base; 110 rec->size=alloc_size; 111 rec->next = it; 112 prev->next=rec; 113 } 114 free_blocks=temp.next; 115 } 116 117 static 118 void* 119 findFreeBlocks(nat n) { 120 void* ret=0; 121 block_rec* it; 122 block_rec temp; 123 block_rec* prev; 124 125 int required_size; 126 it=free_blocks; 127 required_size = n*MBLOCK_SIZE; 128 temp.next=free_blocks; temp.base=0; temp.size=0; 129 prev=&temp; 130 /* TODO: Don't just take first block, find smallest sufficient block */ 131 for( ; it!=0 && it->size<required_size; prev=it, it=it->next ) {} 132 if(it!=0) { 133 if( (((unsigned long)it->base) & MBLOCK_MASK) == 0) { /* MBlock aligned */ 134 ret = (void*)it->base; 135 if(it->size==required_size) { 136 prev->next=it->next; 137 stgFree(it); 138 } else { 139 it->base += required_size; 140 it->size -=required_size; 141 } 142 } else { 143 char* need_base; 144 block_rec* next; 145 int new_size; 146 need_base = (char*)(((unsigned long)it->base) & ((unsigned long)~MBLOCK_MASK)) + MBLOCK_SIZE; 147 next = (block_rec*)stgMallocBytes( 148 sizeof(block_rec) 149 , "getMBlocks: findFreeBlocks: splitting"); 150 new_size = need_base - it->base; 151 next->base = need_base +required_size; 152 next->size = it->size - (new_size+required_size); 153 it->size = new_size; 154 next->next = it->next; 155 it->next = next; 156 ret=(void*)need_base; 157 } 158 } 159 free_blocks=temp.next; 160 return ret; 161 } 162 163 void * 164 osGetMBlocks(nat n) { 165 void* ret; 166 ret = findFreeBlocks(n); 167 if(ret==0) { 168 alloc_rec* alloc; 169 alloc = allocNew(n); 170 /* We already belch in allocNew if it fails */ 171 if (alloc == 0) { 172 stg_exit(EXIT_FAILURE); 173 } else { 174 insertFree(alloc->base, alloc->size); 175 ret = findFreeBlocks(n); 176 } 177 } 178 179 return ret; 180 } 181 182 void 183 osFreeAllMBlocks(void) 184 { 185 { 186 block_rec* next; 187 block_rec* it; 188 next=0; 189 it = free_blocks; 190 for(; it!=0; ) { 191 next = it->next; 192 stgFree(it); 193 it=next; 194 } 195 } 196 { 197 alloc_rec* next; 198 alloc_rec* it; 199 next=0; 200 it=allocs; 201 for(; it!=0; ) { 202 if(err_is_fail(vspace_unmap((void*)it->base))) { 203 sysErrorBelch("freeAllMBlocks: vspace_unmap failed"); 204 stg_exit(EXIT_FAILURE); 205 } 206 next = it->next; 207 stgFree(it); 208 it=next; 209 } 210 } 211 } 212 213 lnat getPageSize (void) 214 { 215 return BASE_PAGE_SIZE; 216 } 217 218 void setExecutable (void *p, lnat len, rtsBool exec) 219 { 220 // TODO - at the moment we just map all memory as executable, once 221 // we can do the equivalent of mprotect in barrelfish we should 222 // revisit this 223 } -
rts/barrelfish/OSThreads.c
diff -rN -u old-ghc_bf/rts/barrelfish/OSThreads.c new-ghc_bf-2/rts/barrelfish/OSThreads.c
old new 1 /* --------------------------------------------------------------------------- 2 * 3 * (c) The GHC Team, 2001-2005 4 * 5 * Accessing OS threads functionality in a (mostly) OS-independent 6 * manner. 7 * 8 * --------------------------------------------------------------------------*/ 9 10 #include "PosixSource.h" 11 #include "Rts.h" 12 13 #if defined(THREADED_RTS) 14 #include "barrelfish/barrelfish.h" 15 16 void 17 initCondition( Condition* pCond ) 18 { 19 thread_cond_init(pCond); 20 return; 21 } 22 23 void 24 closeCondition( Condition* pCond ) 25 { 26 // TODO what do we do here? 27 return; 28 } 29 30 rtsBool 31 broadcastCondition ( Condition* pCond ) 32 { 33 thread_cond_broadcast(pCond); 34 return true; 35 } 36 37 rtsBool 38 signalCondition ( Condition* pCond ) 39 { 40 thread_cond_signal(pCond); 41 return true; 42 } 43 44 rtsBool 45 waitCondition ( Condition* pCond, Mutex* pMut ) 46 { 47 thread_cond_wait(pCond, pMut); 48 return true; 49 } 50 51 void 52 yieldThread() 53 { 54 thread_yield(); 55 return; 56 } 57 58 void 59 shutdownThread() 60 { 61 thread_exit(); 62 } 63 64 int 65 createOSThread (OSThreadId* pId, OSThreadProc *startProc, void *param) 66 { 67 printf("Creating Thread\n"); 68 *pId = thread_create(startProc, param); // TODO - start on right core!! 69 return 0; 70 } 71 72 OSThreadId 73 osThreadId() 74 { 75 return thread_self(); 76 } 77 78 rtsBool 79 osThreadIsAlive(OSThreadId id STG_UNUSED) 80 { 81 // no good way to implement this on POSIX, AFAICT. Returning true 82 // is safe. 83 return true; 84 } 85 86 void 87 initMutex(Mutex* pMut) 88 { 89 thread_mutex_init(pMut); 90 return; 91 } 92 void 93 closeMutex(Mutex* pMut) 94 { 95 // how do we do this? 96 } 97 98 void 99 newThreadLocalKey (ThreadLocalKey *key) 100 { 101 static int curr_key = 1; 102 *key = curr_key++; 103 } 104 105 void * 106 getThreadLocalVar (ThreadLocalKey *key) 107 { 108 if (*key != 1) printf("Error, invalid thread local key\n"); 109 return thread_self()->tls; 110 } 111 112 void 113 setThreadLocalVar (ThreadLocalKey *key, void *value) 114 { 115 if (*key != 1) printf("Error, invalid thread local key\n"); 116 thread_self()->tls = value; 117 } 118 119 void 120 freeThreadLocalKey (ThreadLocalKey *key) 121 { 122 // TODO 123 } 124 125 int 126 forkOS_createThread ( HsStablePtr entry ) 127 { 128 printf("NYI forkOS_createThread\n"); 129 exit(-1); 130 } 131 132 nat 133 getNumberOfProcessors (void) 134 { 135 static nat nproc = 0; 136 137 if (nproc == 0) { 138 // todo - move num_cores request to a blocking rpc 139 printf("NYI getNumberOfProcessors\n"); 140 exit(-1); 141 } 142 143 return nproc; 144 } 145 146 #if defined(HAVE_SCHED_SETAFFINITY) 147 // Schedules the thread to run on CPU n of m. m may be less than the 148 // number of physical CPUs, in which case, the thread will be allowed 149 // to run on CPU n, n+m, n+2m etc. 150 void 151 setThreadAffinity (nat n, nat m) 152 { 153 printf("NYI setThreadAffinity\n"); 154 exit(-1); 155 } 156 157 #else 158 void 159 setThreadAffinity (nat n GNUC3_ATTRIBUTE(__unused__), 160 nat m GNUC3_ATTRIBUTE(__unused__)) 161 { 162 } 163 #endif 164 165 #else /* !defined(THREADED_RTS) */ 166 167 int 168 forkOS_createThread ( HsStablePtr entry STG_UNUSED ) 169 { 170 return -1; 171 } 172 173 #endif /* !defined(THREADED_RTS) */ -
rts/barrelfish/Select.c
diff -rN -u old-ghc_bf/rts/barrelfish/Select.c new-ghc_bf-2/rts/barrelfish/Select.c
old new 1 /* ----------------------------------------------------------------------------- 2 * 3 * (c) The GHC Team 1995-2002 4 * 5 * Support for concurrent non-blocking I/O and thread waiting. 6 * 7 * ---------------------------------------------------------------------------*/ 8 9 #include "Rts.h" 10 11 #if !defined(THREADED_RTS) 12 13 14 15 void 16 awaitEvent(rtsBool wait) 17 { 18 printf("NYI awateEvent\n"); 19 } 20 21 #endif /* THREADED_RTS */ -
rts/barrelfish/Select.h
diff -rN -u old-ghc_bf/rts/barrelfish/Select.h new-ghc_bf-2/rts/barrelfish/Select.h
old new 1 /* ----------------------------------------------------------------------------- 2 * 3 * (c) The GHC Team 1998-2005 4 * 5 * Prototypes for functions in Select.c 6 * 7 * -------------------------------------------------------------------------*/ 8 9 #ifndef POSIX_SELECT_H 10 #define POSIX_SELECT_H 11 12 #if !defined(THREADED_RTS) 13 /* In Select.c */ 14 extern lnat timestamp; 15 #endif 16 17 #endif /* POSIX_SELECT_H */ -
rts/barrelfish/Signals.c
diff -rN -u old-ghc_bf/rts/barrelfish/Signals.c new-ghc_bf-2/rts/barrelfish/Signals.c
old new 1 /* ----------------------------------------------------------------------------- 2 * 3 * (c) The GHC Team, 1998-2005 4 * 5 * Signal processing / handling. 6 * 7 * ---------------------------------------------------------------------------*/ 8 9 #include "PosixSource.h" 10 #include "Rts.h" 11 12 #include "Schedule.h" 13 #include "RtsSignals.h" 14 #include "Signals.h" 15 #include "RtsUtils.h" 16 #include "Prelude.h" 17 #include "Stable.h" 18 19 #ifdef HAVE_SIGNAL_H 20 # include <signal.h> 21 #endif 22 23 #ifdef HAVE_ERRNO_H 24 # include <errno.h> 25 #endif 26 27 #include <stdlib.h> 28 #include <string.h> 29 30 31 static void 32 more_handlers(int sig) 33 { 34 printf("NYI more_handlers\n"); 35 exit(-1); 36 } 37 38 void 39 setIOManagerPipe (int fd) 40 { 41 printf("NYI setIOManagerPipe\n"); 42 exit(-1); 43 } 44 45 void 46 ioManagerWakeup (void) 47 { 48 printf("NYI ioManagerWakeup\n"); 49 exit(-1); 50 } 51 52 void 53 ioManagerSync (void) 54 { 55 printf("NYI ioManagerSync\n"); 56 exit(-1); 57 } 58 59 #if defined(THREADED_RTS) 60 void 61 ioManagerDie (void) 62 { 63 printf("NYI ioManagerDie\n"); 64 exit(-1); 65 } 66 67 Capability * 68 ioManagerStartCap (Capability *cap) 69 { 70 return rts_evalIO(cap,&base_GHCziConc_ensureIOManagerIsRunning_closure,NULL); 71 } 72 73 void 74 ioManagerStart (void) 75 { 76 // Make sure the IO manager thread is running 77 Capability *cap; 78 cap = rts_lock(); 79 cap = ioManagerStartCap(cap); 80 rts_unlock(cap); 81 } 82 #endif 83 84 /* ----------------------------------------------------------------------------- 85 * Blocking/Unblocking of the user signals 86 * -------------------------------------------------------------------------- */ 87 88 void 89 initUserSignals(void) 90 { 91 printf("NYI initUserSignals\n"); 92 exit(-1); 93 } 94 95 void 96 blockUserSignals(void) 97 { 98 printf("NYI blockUserSignals\n"); 99 exit(-1); 100 } 101 102 void 103 unblockUserSignals(void) 104 { 105 printf("NYI unblockUserSignals\n"); 106 exit(-1); 107 } 108 109 rtsBool 110 anyUserHandlers(void) 111 { 112 printf("NYI unblockUserSignals\n"); 113 exit(-1); 114 } 115 116 #if !defined(THREADED_RTS) 117 void 118 awaitUserSignals(void) 119 { 120 printf("NYI awaitUserSignals\n"); 121 exit(-1); 122 } 123 #endif 124 125 /* ----------------------------------------------------------------------------- 126 * Install a Haskell signal handler. 127 * 128 * We should really do this in Haskell in GHC.Conc, and share the 129 * signal_handlers array with the one there. 130 * 131 * -------------------------------------------------------------------------- */ 132 133 int 134 stg_sig_install(int sig, int spi, void *mask) 135 { 136 printf("NYI stg_sig_install\n"); 137 exit(-1); 138 } 139 140 /* ----------------------------------------------------------------------------- 141 * Creating new threads for signal handlers. 142 * -------------------------------------------------------------------------- */ 143 144 #if !defined(THREADED_RTS) 145 void 146 startSignalHandlers(Capability *cap) 147 { 148 printf("NYI stg_sig_install\n"); 149 exit(-1); 150 } 151 #endif 152 153 /* ---------------------------------------------------------------------------- 154 * Mark signal handlers during GC. 155 * -------------------------------------------------------------------------- */ 156 157 void 158 markSignalHandlers (evac_fn evac STG_UNUSED, void *user STG_UNUSED) 159 { 160 // nothing to do 161 } 162 163 void 164 resetDefaultHandlers(void) 165 { 166 return; 167 } -
rts/barrelfish/Signals.h
diff -rN -u old-ghc_bf/rts/barrelfish/Signals.h new-ghc_bf-2/rts/barrelfish/Signals.h
old new 1 /* ----------------------------------------------------------------------------- 2 * 3 * (c) The GHC Team, 1998-2005 4 * 5 * Signal processing / handling. 6 * 7 * ---------------------------------------------------------------------------*/ 8 9 #ifndef BFISH_SIGNALS_H 10 #define BFISH_SIGNALS_H 11 12 #ifdef HAVE_SIGNAL_H 13 # include <signal.h> 14 #endif 15 16 #include "BeginPrivate.h" 17 18 rtsBool anyUserHandlers(void); 19 20 Capability *ioManagerStartCap (Capability *cap); 21 22 extern StgInt *signal_handlers; 23 24 #include "EndPrivate.h" 25 26 #endif /* BFISH_SIGNALS_H */ 27 -
rts/barrelfish/TTY.c
diff -rN -u old-ghc_bf/rts/barrelfish/TTY.c new-ghc_bf-2/rts/barrelfish/TTY.c
old new 1 /* ----------------------------------------------------------------------------- 2 * 3 * (c) The GHC Team, 1998-2009 4 * 5 * TTY-related functionality 6 * 7 * ---------------------------------------------------------------------------*/ 8 9 #include "PosixSource.h" 10 #include "Rts.h" 11 12 #include "RtsUtils.h" // __hscore_get/set prototypes 13 #include "TTY.h" 14 15 #ifdef HAVE_TERMIOS_H 16 #include <termios.h> 17 #endif 18 #ifdef HAVE_SIGNAL_H 19 #include <signal.h> 20 #endif 21 22 // Here we save the terminal settings on the standard file 23 // descriptors, if we need to change them (eg. to support NoBuffering 24 // input). 25 static void *saved_termios[3] = {NULL,NULL,NULL}; 26 27 void* 28 __hscore_get_saved_termios(int fd) 29 { 30 return (0 <= fd && fd < (int)(sizeof(saved_termios) / sizeof(*saved_termios))) ? 31 saved_termios[fd] : NULL; 32 } 33 34 void 35 __hscore_set_saved_termios(int fd, void* ts) 36 { 37 if (0 <= fd && fd < (int)(sizeof(saved_termios) / sizeof(*saved_termios))) { 38 saved_termios[fd] = ts; 39 } 40 } 41 42 void 43 resetTerminalSettings (void) 44 { 45 #if HAVE_TERMIOS_H 46 // Reset the terminal settings on the standard file descriptors, 47 // if we changed them. See System.Posix.Internals.tcSetAttr for 48 // more details, including the reason we termporarily disable 49 // SIGTTOU here. 50 { 51 int fd; 52 sigset_t sigset, old_sigset; 53 sigemptyset(&sigset); 54 sigaddset(&sigset, SIGTTOU); 55 sigprocmask(SIG_BLOCK, &sigset, &old_sigset); 56 for (fd = 0; fd <= 2; fd++) { 57 struct termios* ts = (struct termios*)__hscore_get_saved_termios(fd); 58 if (ts != NULL) { 59 tcsetattr(fd,TCSANOW,ts); 60 } 61 } 62 sigprocmask(SIG_SETMASK, &old_sigset, NULL); 63 } 64 #endif 65 } -
rts/barrelfish/TTY.h
diff -rN -u old-ghc_bf/rts/barrelfish/TTY.h new-ghc_bf-2/rts/barrelfish/TTY.h
old new 1 /* ----------------------------------------------------------------------------- 2 * 3 * (c) The GHC Team, 1998-2009 4 * 5 * TTY-related functionality 6 * 7 * ---------------------------------------------------------------------------*/ 8 9 #ifndef POSIX_TTY_H 10 #define POSIX_TTY_H 11 12 RTS_PRIVATE void resetTerminalSettings (void); 13 14 #endif /* POSIX_TTY_H */ -
rts/ghc.mk
diff -rN -u old-ghc_bf/rts/ghc.mk new-ghc_bf-2/rts/ghc.mk
old new 31 31 32 32 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" 33 33 ALL_DIRS += win32 34 else 35 ifeq "$(HOSTPLATFORM)" "x86_64-unknown-barrelfish" 36 ALL_DIRS += barrelfish 34 37 else 35 38 ALL_DIRS += posix 36 39 endif 40 endif 37 41 38 42 EXCLUDED_SRCS += rts/Main.c 39 43 EXCLUDED_SRCS += rts/parallel/SysMan.c … … 274 278 rts_CC_OPTS += -DBE_CONSERVATIVE 275 279 endif 276 280 281 rts_CC_OPTS += $(STAGE_1_CC_OPTS) 282 277 283 #----------------------------------------------------------------------------- 278 284 # Flags for compiling specific files 279 285 -
rts/Linker.c
diff -rN -u old-ghc_bf/rts/Linker.c new-ghc_bf-2/rts/Linker.c
old new 29 29 #include "StgPrimFloat.h" // for __int_encodeFloat etc. 30 30 #include "Stable.h" 31 31 32 #if !defined(mingw32_HOST_OS) 32 #if !defined(mingw32_HOST_OS) && !defined(barrelfish_HOST_OS) 33 33 #include "posix/Signals.h" 34 34 #endif 35 35 … … 240 240 SymI_HasProto(stg_makeStableNamezh) \ 241 241 SymI_HasProto(stg_finalizzeWeakzh) 242 242 243 #if !defined (mingw32_HOST_OS) 243 #if !defined (mingw32_HOST_OS) && !defined(barrelfish_HOST_OS) 244 244 #define RTS_POSIX_ONLY_SYMBOLS \ 245 245 SymI_HasProto(__hscore_get_saved_termios) \ 246 246 SymI_HasProto(__hscore_set_saved_termios) \ … … 339 339 #elif !defined(mingw32_HOST_OS) 340 340 #define RTS_MINGW_ONLY_SYMBOLS /**/ 341 341 #define RTS_CYGWIN_ONLY_SYMBOLS /**/ 342 #ifdef barrelfish_HOST_OS 343 #define RTS_POSIX_ONLY_SYMBOLS /**/ 344 #endif 342 345 #else /* defined(mingw32_HOST_OS) */ 343 346 #define RTS_POSIX_ONLY_SYMBOLS /**/ 344 347 #define RTS_CYGWIN_ONLY_SYMBOLS /**/ … … 513 516 # define MAIN_CAP_SYM 514 517 #endif 515 518 519 #ifndef RTS_USER_SIGNALS 520 #define RTS_USER_SIGNALS_SYMBOLS /**/ 521 #else 516 522 #if !defined(mingw32_HOST_OS) 517 523 #define RTS_USER_SIGNALS_SYMBOLS \ 518 524 SymI_HasProto(setIOManagerPipe) \ … … 528 534 SymI_HasProto(getIOManagerEvent) \ 529 535 SymI_HasProto(console_handler) 530 536 #endif 537 #endif 531 538 532 539 #define RTS_LIBFFI_SYMBOLS \ 533 540 SymE_NeedsProto(ffi_prep_cif) \ -
rts/package.conf.in
diff -rN -u old-ghc_bf/rts/package.conf.in new-ghc_bf-2/rts/package.conf.in
old new 24 24 hs-libraries: "HSrts" 25 25 26 26 extra-libraries: 27 #ifndef barrelfish_HOST_OS 27 28 #ifdef HAVE_LIBM 28 29 "m" /* for ldexp() */ 29 30 #endif … … 47 48 #if USE_PAPI 48 49 , "papi" 49 50 #endif 51 #endif 50 52 51 53 #ifdef INSTALLING 52 54 include-dirs: INCLUDE_DIR PAPI_INCLUDE_DIR -
rts/PrimOps.cmm
diff -rN -u old-ghc_bf/rts/PrimOps.cmm new-ghc_bf-2/rts/PrimOps.cmm
old new 1737 1737 1738 1738 #ifdef THREADED_RTS 1739 1739 foreign "C" barf("delay# on threaded RTS") never returns; 1740 #else 1740 #elif defined(barrelfish_HOST_OS) 1741 foreign "C" barf("NYI delay"); 1742 #else 1741 1743 1742 1744 /* args: R1 (microsecond delay amount) */ 1743 1745 ASSERT(StgTSO_why_blocked(CurrentTSO) == NotBlocked::I16); 1744 1746 StgTSO_why_blocked(CurrentTSO) = BlockedOnDelay::I16; 1745 1747 1746 #if def mingw32_HOST_OS1748 #if defined(mingw32_HOST_OS) 1747 1749 1748 1750 /* could probably allocate this on the heap instead */ 1749 1751 ("ptr" ares) = foreign "C" stgMallocBytes(SIZEOF_StgAsyncIOResult, -
rts/RtsSignals.h
diff -rN -u old-ghc_bf/rts/RtsSignals.h new-ghc_bf-2/rts/RtsSignals.h
old new 9 9 #ifndef RTSSIGNALS_H 10 10 #define RTSSIGNALS_H 11 11 12 #if !defined(mingw32_HOST_OS) 12 #if !defined(mingw32_HOST_OS) && !defined(barrelfish_HOST_OS) 13 13 14 14 #include "posix/Signals.h" 15 15 -
rts/RtsStartup.c
diff -rN -u old-ghc_bf/rts/RtsStartup.c new-ghc_bf-2/rts/RtsStartup.c
old new 49 49 #include "win32/AsyncIO.h" 50 50 #endif 51 51 52 #if !defined(mingw32_HOST_OS) 52 #if !defined(mingw32_HOST_OS) && !defined(barrelfish_HOST_OS) 53 53 #include "posix/TTY.h" 54 54 #include "posix/FileLock.h" 55 55 #endif … … 184 184 185 185 getStablePtr((StgPtr)runSparks_closure); 186 186 getStablePtr((StgPtr)ensureIOManagerIsRunning_closure); 187 #if ndef mingw32_HOST_OS187 #if !defined(mingw32_HOST_OS) &&!defined(barrelfish_HOST_OS) 188 188 getStablePtr((StgPtr)runHandlers_closure); 189 189 #endif 190 190 … … 192 192 initGlobalStore(); 193 193 194 194 /* initialise file locking, if necessary */ 195 #if !defined(mingw32_HOST_OS) 195 #if !defined(mingw32_HOST_OS) && !defined(barrelfish_HOST_OS) 196 196 initFileLocking(); 197 197 #endif 198 198 … … 402 402 exitLinker(); 403 403 404 404 /* free file locking tables, if necessary */ 405 #if !defined(mingw32_HOST_OS) 405 #if !defined(mingw32_HOST_OS) && !defined(barrelfish_HOST_OS) 406 406 freeFileLocking(); 407 407 #endif 408 408 … … 489 489 } 490 490 } 491 491 492 #if ndef mingw32_HOST_OS492 #if !defined(mingw32_HOST_OS) && !defined(barrelfish_HOST_OS) 493 493 void 494 494 shutdownHaskellAndSignal(int sig) 495 495 { -
rts/RtsUtils.c
diff -rN -u old-ghc_bf/rts/RtsUtils.c new-ghc_bf-2/rts/RtsUtils.c
old new 420 420 int genericRaise(int sig) { 421 421 #if defined(THREADED_RTS) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)) 422 422 return pthread_kill(pthread_self(), sig); 423 #elif defined(barrelfish_HOST_OS) 424 printf("NYI generic Raise\n"); 425 return -1; 423 426 #else 424 427 return raise(sig); 425 428 #endif -
rts/Schedule.c
diff -rN -u old-ghc_bf/rts/Schedule.c new-ghc_bf-2/rts/Schedule.c
old new 107 107 Mutex sched_mutex; 108 108 #endif 109 109 110 #if !defined(mingw32_HOST_OS) 110 #if !defined(mingw32_HOST_OS) && !defined(barrelfish_HOST_OS) 111 111 #define FORKPROCESS_PRIMOP_SUPPORTED 112 112 #endif 113 113 -
rts/sm/GC.c
diff -rN -u old-ghc_bf/rts/sm/GC.c new-ghc_bf-2/rts/sm/GC.c
old new 846 846 gen_workspace *ws; 847 847 848 848 #ifdef THREADED_RTS 849 t->id = 0;849 t->id = OSThreadNullId; 850 850 initSpinLock(&t->gc_spin); 851 851 initSpinLock(&t->mut_spin); 852 852 ACQUIRE_SPIN_LOCK(&t->gc_spin); -
rts/Stats.c
diff -rN -u old-ghc_bf/rts/Stats.c new-ghc_bf-2/rts/Stats.c
old new 208 208 void 209 209 stat_startInit(void) 210 210 { 211 #ifndef barrelfish_HOST_OS 211 212 Ticks elapsed; 212 213 213 214 elapsed = getProcessElapsedTime(); 214 215 ElapsedTimeStart = elapsed; 216 #endif 215 217 } 216 218 217 219 void 218 220 stat_endInit(void) 219 221 { 222 #ifndef barrelfish_HOST_OS 220 223 Ticks user, elapsed; 221 224 222 225 getProcessTimes(&user, &elapsed); … … 238 241 papi_is_reporting = 1; 239 242 240 243 #endif 244 #endif 241 245 } 242 246 243 247 /* ----------------------------------------------------------------------------- … … 249 253 void 250 254 stat_startExit(void) 251 255 { 256 #ifndef barrelfish_HOST_OS 252 257 Ticks user, elapsed; 253 258 254 259 getProcessTimes(&user, &elapsed); … … 270 275 papi_is_reporting = 0; 271 276 272 277 #endif 278 #endif 273 279 } 274 280 275 281 void 276 282 stat_endExit(void) 277 283 { 284 #ifndef barrelfish_HOST_OS 278 285 Ticks user, elapsed; 279 286 280 287 getProcessTimes(&user, &elapsed); … … 287 294 if (ExitElapsedTime < 0) { 288 295 ExitElapsedTime = 0; 289 296 } 297 #endif 290 298 } 291 299 292 300 /* ----------------------------------------------------------------------------- -
rules/build-package-data.mk
diff -rN -u old-ghc_bf/rules/build-package-data.mk new-ghc_bf-2/rules/build-package-data.mk
old new 28 28 $1_$2_CONFIGURE_OPTS += --with-hscolour="$$(HSCOLOUR_CMD)" 29 29 endif 30 30 31 $1_$2_CONFIGURE_OPTS += --configure-option=--build=$$(BUILDPLATFORM) 32 $1_$2_CONFIGURE_OPTS += --configure-option=--host=$$(HOSTPLATFORM) 33 31 34 # We filter out -Werror from SRC_CC_OPTS, because when configure tests 32 35 # for a feature it may not generate warning-free C code, and thus may 33 36 # think that the feature doesn't exist if -Werror is on. 34 $1_$2_CONFIGURE_OPTS += --configure-option=CFLAGS="$$(filter-out -Werror,$$(SRC_CC_OPTS)) $$(CONF_CC_OPTS) $$($1_CC_OPTS) $$($1_$2_CC_OPTS)" 35 $1_$2_CONFIGURE_OPTS += --configure-option=LDFLAGS="$$(SRC_LD_OPTS) $$($1_LD_OPTS) $$($1_$2_LD_OPTS)" 37 $1_$2_CONFIGURE_OPTS += --configure-option=CFLAGS="$$(filter-out -Werror,$$(SRC_CC_OPTS)) $$(CONF_CC_OPTS) $$($1_CC_OPTS) $$($1_$2_CC_OPTS) $$(STAGE_$3_CC_OPTS)" 38 $1_$2_CONFIGURE_OPTS += --configure-option=CPPFLAGS="$$(filter-out -Werror,$$(SRC_CC_OPTS)) $$(CONF_CC_OPTS) $$($1_CC_OPTS) $$($1_$2_CC_OPTS) $$(STAGE_$3_CC_OPTS)" 39 $1_$2_CONFIGURE_OPTS += --configure-option=LDFLAGS="$$(SRC_LD_OPTS) $$($1_LD_OPTS) $$($1_$2_LD_OPTS) $$(STAGE_$3_LD_OPTS)" 36 40 37 41 ifneq "$$(ICONV_INCLUDE_DIRS)" "" 38 42 $1_$2_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="$$(ICONV_INCLUDE_DIRS)" -
rules/build-prog.mk
diff -rN -u old-ghc_bf/rules/build-prog.mk new-ghc_bf-2/rules/build-prog.mk
old new 128 128 129 129 ifeq "$$($1_$2_LINK_WITH_GCC)" "NO" 130 130 $1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/. 131 "$$($1_$2_HC)" -o $$@ $$($1_$2_v_ALL_HC_OPTS) $$(LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS)131 "$$($1_$2_HC)" -o $$@ $$($1_$2_v_ALL_HC_OPTS) $$(STAGE_$3_LD_OPTS) $$(LD_OPTS) $$($1_$2_LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) 132 132 else 133 133 $1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/. 134 "$$(CC)" -o $$@ $$($1_$2_v_ALL_CC_OPTS) $$(LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) $$($1_$2_v_EXTRA_CC_OPTS)134 "$$(CC)" -o $$@ $$($1_$2_v_ALL_CC_OPTS) $$(STAGE_$3_LD_OPTS) $$(LD_OPTS) $$($1_$2_LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) $$($1_$2_v_EXTRA_CC_OPTS) 135 135 endif 136 136 137 137 # Note [lib-depends] if this program is built with stage1 or greater, we -
rules/distdir-way-opts.mk
diff -rN -u old-ghc_bf/rules/distdir-way-opts.mk new-ghc_bf-2/rules/distdir-way-opts.mk
old new 82 82 endif 83 83 84 84 $1_$2_DIST_CC_OPTS = \ 85 $$(STAGE_$4_CC_OPTS) \ 85 86 $$(CONF_CC_OPTS) \ 86 87 $$(SRC_CC_OPTS) \ 87 88 $$($1_CC_OPTS) \ -
rules/shell-wrapper.mk
diff -rN -u old-ghc_bf/rules/shell-wrapper.mk new-ghc_bf-2/rules/shell-wrapper.mk
old new 41 41 echo 'bindir="$$(TOP)/$$(INPLACE_BIN)"' >> $$@ 42 42 echo 'topdir="$$(TOP)/$$(INPLACE_TOPDIR)"' >> $$@ 43 43 echo 'pgmgcc="$$(WhatGccIsCalled)"' >> $$@ 44 echo 'builtInArgs="$$(BUILTIN_HC_OPTS)"' >> $$@ 44 45 $$($1_$2_SHELL_WRAPPER_EXTRA) 45 46 $$($1_$2_INPLACE_SHELL_WRAPPER_EXTRA) 46 47 cat $$($1_$2_SHELL_WRAPPER_NAME) >> $$@ … … 73 74 echo 'bindir="$$(bindir)"' >> "$$(WRAPPER)" 74 75 echo 'topdir="$$(topdir)"' >> "$$(WRAPPER)" 75 76 echo 'pgmgcc="$$(WhatGccIsCalled)"' >> "$$(WRAPPER)" 77 echo 'builtInArgs="$$(BUILTIN_HC_OPTS)"' >> "$$(WRAPPER)" 76 78 $$($1_$2_SHELL_WRAPPER_EXTRA) 77 79 $$($1_$2_INSTALL_SHELL_WRAPPER_EXTRA) 78 80 cat $$($1_$2_SHELL_WRAPPER_NAME) >> "$$(WRAPPER)" -
utils/ghc-pkg/ghc-pkg.cabal
diff -rN -u old-ghc_bf/utils/ghc-pkg/ghc-pkg.cabal new-ghc_bf-2/utils/ghc-pkg/ghc-pkg.cabal
old new 28 28 bin-package-db, 29 29 bytestring 30 30 if !os(windows) 31 Build-Depends: unix, 32 terminfo 31 Build-Depends: unix 33 32 if os(windows) 34 33 c-sources: CRT_noglob.c -
utils/ghc-pkg/Main.hs
diff -rN -u old-ghc_bf/utils/ghc-pkg/Main.hs new-ghc_bf-2/utils/ghc-pkg/Main.hs
old new 70 70 import qualified System.Info(os) 71 71 #endif 72 72 73 #if !defined(mingw32_HOST_OS) && __GLASGOW_HASKELL__ >= 611 && !defined(BOOTSTRAPPING)73 #if !defined(mingw32_HOST_OS) &&!defined(barrelfish_HOST_OS) && __GLASGOW_HASKELL__ >= 611 && !defined(BOOTSTRAPPING) 74 74 import System.Console.Terminfo as Terminfo 75 75 #endif 76 76 … … 854 854 855 855 if simple_output then show_simple stack else do 856 856 857 #if defined(mingw32_HOST_OS) || __GLASGOW_HASKELL__ < 611 || defined(BOOTSTRAPPING)857 #if defined(mingw32_HOST_OS) || defined(barrelfish_HOST_OS) || __GLASGOW_HASKELL__ < 611 || defined(BOOTSTRAPPING) 858 858 mapM_ show_normal stack 859 859 #else 860 860 let
