From 822a7f4dbb4122be3e41da244c9b9e583e5e669a Mon Sep 17 00:00:00 2001 From: Stefan Schulze Frielinghaus Date: Wed, 2 Oct 2019 13:52:28 +0200 Subject: Extend argument of createIOThread to word size Function createIOThread expects its second argument to be of size word. The natural size of the second parameter is 32bits. Thus for some 64bit architectures, where a write of the lower half of a register does not clear the upper half, the value must be zero extended. (cherry picked from commit d0924b153b093a925c9e721f2540f3dfd6c278ae) --- rts/PrimOps.cmm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index c1b871c6a0..1d5f9690ea 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -927,7 +927,7 @@ stg_forkzh ( gcptr closure ) gcptr threadid; ("ptr" threadid) = ccall createIOThread( MyCapability() "ptr", - RtsFlags_GcFlags_initialStkSize(RtsFlags), + TO_W_(RtsFlags_GcFlags_initialStkSize(RtsFlags)), closure "ptr"); /* start blocked if the current thread is blocked */ @@ -952,7 +952,7 @@ again: MAYBE_GC(again); ("ptr" threadid) = ccall createIOThread( MyCapability() "ptr", - RtsFlags_GcFlags_initialStkSize(RtsFlags), + TO_W_(RtsFlags_GcFlags_initialStkSize(RtsFlags)), closure "ptr"); /* start blocked if the current thread is blocked */ -- cgit v1.2.1