This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gccgo] Permit using "big" channel routines with small data
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 05 Jun 2010 10:18:41 -0700
- Subject: [gccgo] Permit using "big" channel routines with small data
The "big" channel routines are used for data which more than 64 bits.
They are also used for structs, since the small channel routines
expect to send integers back and forth. The "big" routines had
assertions which triggered when sending small structs. This patch
removes those incorrect assertions. Committed to gccgo branch.
Ian
diff -r ef07f240fcb0 libgo/runtime/go-rec-nb-big.c
--- a/libgo/runtime/go-rec-nb-big.c Fri Jun 04 11:02:24 2010 -0700
+++ b/libgo/runtime/go-rec-nb-big.c Sat Jun 05 10:16:17 2010 -0700
@@ -15,8 +15,6 @@
size_t alloc_size;
size_t offset;
- assert (channel->element_size > sizeof (uint64_t));
-
alloc_size = ((channel->element_size + sizeof (uint64_t) - 1)
/ sizeof (uint64_t));
diff -r ef07f240fcb0 libgo/runtime/go-send-nb-big.c
--- a/libgo/runtime/go-send-nb-big.c Fri Jun 04 11:02:24 2010 -0700
+++ b/libgo/runtime/go-send-nb-big.c Sat Jun 05 10:16:17 2010 -0700
@@ -15,8 +15,6 @@
size_t alloc_size;
size_t offset;
- assert (channel->element_size > sizeof (uint64_t));
-
alloc_size = ((channel->element_size + sizeof (uint64_t) - 1)
/ sizeof (uint64_t));