summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>2019-10-02 13:52:28 +0200
committerBen Gamari <ben@smart-cactus.org>2019-11-03 15:24:32 -0500
commit822a7f4dbb4122be3e41da244c9b9e583e5e669a (patch)
tree73745c4420d5089b4e8f8856d89178fb5a35dfbe
parent2c0df86370ef70e439043a59b5c7d95b6c8f8319 (diff)
downloadhaskell-822a7f4dbb4122be3e41da244c9b9e583e5e669a.tar.gz
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)
-rw-r--r--rts/PrimOps.cmm4
1 files 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 */