This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] linux support for SH


Alexandre Oliva <aoliva@redhat.com> wrote:
>> 	Changes for "fpscr_values" (place it at .data)
>
>What's the point of doing this?

Linux kernel for SH implements lazy context switch of floating
point context. If we write a program with fpu instructions (in
single and double precisions) which will be rarely called, we
doesn't want to call __set_fpscr initially, because it executes
fpu instruction and kernel registers this process as "fpu user".
Of course, we can set the values to the __fpscr_values table by
hand or set them in the floating exception handler like glibc
does, for such case. But it seems not so good for some small
applications and something surprised to the usual programmers.
We will never use m4-single or m4-single-only mode in Linux, so
the table with fixed initialized values seems to be enough for us.

>In fact, now that you mention it, I recall Joern gave an interesting
>idea: we could have fpscr_values be in a fixed (low) position in
>virtual memory, set up by the kernel, so that we could avoid all the
>hassle of PIC addressing when referring to it.

This is very interesting. Perhaps we can use the page which
includes the fpscr_values for the various purpose. Niibe-san,
how do you think about this idea?

	kaz



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]