Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2007 01:09:36 -0400
From:      "Constantine A. Murenin" <cnst@FreeBSD.org>
To:        Harald Schmalzbauer <h.schmalzbauer@omnisec.de>, freebsd-current@FreeBSD.org
Cc:        Alexander Kabaev <kan@FreeBSD.org>, "Constantine A. Murenin" <cnst@FreeBSD.org>
Subject:   Re: GSoC2007: cnst-sensors.2007-08-20.patch
Message-ID:  <46D10B10.2060608@FreeBSD.org>
In-Reply-To: <200708260216.14210.h.schmalzbauer@omnisec.de>
References:  <200708210339.l7L3dUX0038042@repoman.freebsd.org> <46D0BEEF.1020601@FreeBSD.org> <200708260208.35700.h.schmalzbauer@omnisec.de> <200708260216.14210.h.schmalzbauer@omnisec.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 25/08/2007 20:16, Harald Schmalzbauer wrote:

>>>http://p4web.freebsd.org/@sr=125633@//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@ -I@/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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46D10B10.2060608>