#2219 closed defect (fixed)
sha512 compile issue on m32c/m32csim
Reported by: | Joel Sherrill | Owned by: | Sebastian Huber |
---|---|---|---|
Priority: | normal | Milestone: | 4.11 |
Component: | unspecified | Version: | 4.11 |
Severity: | blocker | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
The m32c has a 24 bit address space but only a 16 bit size_t. This results in it not being able to index large arrays. I suspect this is part of the problem with the failure in sha512. But the warnings indicate a more fundamental 16/32 bit coding issue.
I propose the issue for the warnings get fixed and then sha512 disabled for m32c.
m32c-rtems4.11-gcc --pipe -DHAVE_CONFIG_H -I.. -I../../cpukit/../../../m32csim
/lib/include -mcpu=m32cm -O0 -g -Wall -Wmissing-prototypes -Wimplicit-function
-declaration -Wstrict-prototypes -Wnested-externs -MT libmd_a-sha512c.o -MD -MP
ec |
ho '../../../../../../rtems/c/src/../../cpukit/libmd/'`sha512c.c
In file included from ../../../../../../rtems/c/src/../../cpukit/libmd/sha512c.c
:30:0:
../../cpukit/../../../m32csim/lib/include/sys/endian.h: In function 'be32dec':
../../cpukit/../../../m32csim/lib/include/sys/endian.h:102:2: warning: left shif
t count >= width of type [enabled by default]
return (((unsigned)p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]);
../../cpukit/../../../m32csim/lib/include/sys/endian.h:102:2: warning: left shif
t count >= width of type [enabled by default]
../../cpukit/../../../m32csim/lib/include/sys/endian.h: In function 'le32dec':
../../cpukit/../../../m32csim/lib/include/sys/endian.h:126:2: warning: left shif
t count >= width of type [enabled by default]
return (((unsigned)p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0]);
../../cpukit/../../../m32csim/lib/include/sys/endian.h:126:2: warning: left shift count >= width of type [enabled by default]
{standard input}: Assembler messages:
{standard input}:13: Error: dsp:16 immediate is out of range `add.l #-44060,sp'
Change History (5)
comment:1 Changed on 12/15/14 at 07:33:30 by Sebastian Huber
comment:2 Changed on 12/18/14 at 09:13:15 by Sebastian Huber
Priority: | highest → normal |
---|
comment:3 Changed on 03/04/15 at 22:00:12 by Gedare Bloom
You could do something like what is done for libdl in cpukit/configure.ac. Or you could fix the stack use problem. I didn't compile it myself, but I'd guess the uint64_t W[80] could be a problem since that is almost 1K itself.
comment:4 Changed on 03/05/15 at 10:36:00 by Sebastian Huber <sebastian.huber@…>
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 Changed on 10/10/17 at 06:35:44 by Sebastian Huber
Component: | misc → unspecified |
---|
I fixed the problems in <sys/endian.h>, but we still have a compiler error. I guess the used stack space is too big. I hesitate to add a #if !defined(m32c) to this file, are there alternatives, e.g. a Autoconf check?
Are there really 16-bit target RTEMS users?