Re: GSoC2007: cnst-sensors.2007-08-20.patch

From: Constantine A. Murenin <cnst_at_FreeBSD.org>
Date: Sun, 26 Aug 2007 01:09:36 -0400
On 25/08/2007 20:16, Harald Schmalzbauer wrote:

>>>http://p4web.freebsd.org/_at_sr=125633_at_//depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c
...
> cc -O2 -fno-strict-aliasing -pipe -march=nocona  -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/KORSO/opt_global.h -I. -I_at_ -I_at_/contrib/altq -finline-limit=8000 --param 
> inline-unit-growth=100 --param 
> large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/KORSO -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c
> /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c: In 
> function 'coretemp_refresh':
> /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:297: error: SSE 
> register return with SSE disabled
> *** Error code 1
> 1 error

I cannot reproduce this bug on i386 with gcc 4.2.0 20070514, so this 
sounds like a bug in the compiler, either for allowing me to compile the 
code that shouldn't compile (and run flawlessly -- coretemp is totally 
tested here), or for not allowing you to compile the code that should 
compile. (I'll recompile my compiler tomorrow to catch up on the updates 
to gcc 4.2.1 to see if that changes anything.)

Could you please provide more details, e.g. platform (I guess it is 
amd64?), compiler version and any changes you've made to the tree?


This is the code that seems to generate this error with your compiler:

		s->value = temp * 1e6 + 273.15e6;

Where s->value is of type int64_t, and temp is of type int.  Does anyone 
know if the e notation should not be used in this context?

In the meantime, I assume that changing that line to:

		s->value = temp * 1000000 + 273150000;

must solve the problem.

C.
Received on Sun Aug 26 2007 - 03:09:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:16 UTC