From mboxrd@z Thu Jan 1 00:00:00 1970 References: <857546.30206.qm@domain.hid> <490B32EF.8050503@domain.hid> <327543.30247.qm@domain.hid> <490B37D6.8050809@domain.hid> Date: Fri, 31 Oct 2008 17:15:37 +0000 (GMT) From: Gabriele Moabiti MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-98243544-1225473337=:28773" Message-ID: <352894.28773.qm@domain.hid> Subject: Re: [Xenomai-help] floating point (int 16) exception List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai@xenomai.org --0-98243544-1225473337=:28773 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0A>No, you do not read the sources correctly. Xenomai does handle FPU=0A>e= xception in primary mode. You know, I implemented part of this, so, you=0A>= should not assume that I do not know what I am talking about.=0A=0AI *REALL= Y* don't say you don't know what you say=0A(I ask you 'cause I think you kn= ow... :)=0A=0Aring 3 xenomai task:=0Avoid xeno_task(void *cookie)=0A{=0A st= atic long loop_count=3D0;=0A unsigned int cw=3D0x360;=0A=0A /* Unmask all= but not precision, the int 7 will be raised */=0A __asm__ __volatile__("f= ldcw %0;"::"m"(cw)); =0A for (;;loop_count++) {=0A rt_task_wait_period(= NULL);=0A rt_printf("Loop number: %ld\n", loop_count);=0A /* Let'= s raise an exception #16*/=0A __asm__ __volatile__(=0A "fldz;"=0A = "fld1;"=0A "fdivrp %st(0),%st(1);"=0A "fwait;"=0A ); =0A = }=0A}=0A=0Axnarch_fault_fpu_p is related to int 7 that It manage the TS bit= (fpu handling=0Aof save restore only if the task use fpu) and it works, it= doesn't switch to secondary=0Amode as you say.=0AIf I pass to Xenomai the = exception 16 of fdivrp the task end 'cause (i thought) the=0Aswitch to seco= ndary mode. Sorry if i bug you but i really need a suggestion.=0A=0A=0A = Unisciti alla community di Io fotografo e video, il nuovo corso di fotogr= afia di Gazzetta dello sport:=0Ahttp://www.flickr.com/groups/iofotografoevi= deo --0-98243544-1225473337=:28773 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
<= br>>No, you do not read the sources correctly. Xenomai does handle FPU>exception in primary mode. You know, I implemented part of this, so, = you
>should not assume that I do not know what I am talking about.
I *REALLY* don't say you don't know what you say
(I ask you 'cause = I think you know... :)

ring 3 xenomai task:
void xeno_task(void *= cookie)
{
 static long loop_count=3D0;
  unsigned int cw= =3D0x360;

  /* Unmask all but not precision, the int 7 will be = raised */
  __asm__ __volatile__("fldcw %0;"::"m"(cw));=0A
 = ; for (;;loop_count++) {
    rt_task_wait_period(NULL);        rt_printf("Loop number: %ld\n", loo= p_count);
    /* Let's raise an exception #16*/
 =    __asm__ __volatile__(
      "fldz;= "
      "fld1;"
    &nbs= p; "fdivrp %st(0),%st(1);"
      "fwait;"
&n= bsp;   );=0A
  }
}

xnarch_fault_fpu_p is relate= d to int 7 that It manage the TS bit (fpu handling
of save restore only = if the task use fpu) and it works, it doesn't switch to secondary
=0Amod= e as you say.
If I pass to Xenomai the exception 16 of fdivrp the task e= nd 'cause (i thought) the
switch to secondary mode. Sorry if i bug you b= ut i really need a suggestion.


=0A=0A=0A=0A =
Scopri la community di Io f= otografo e video
=0AIl nuovo corso di Gazzetta dello sport per diventare veri fotografi!
--0-98243544-1225473337=:28773--