[En-Nut-Discussion] [r5282] Added context_fpu.c for cm3

bon at elektron.ikp.physik.tu-darmstadt.de bon at elektron.ikp.physik.tu-darmstadt.de
Wed Sep 11 19:42:23 CEST 2013


>>>>> "bon" == bon  <bon at elektron.ikp.physik.tu-darmstadt.de> writes:


    bon> the inner working was not my subject so long, but on a first glance
    bon> it looks good.

>From the the ARM documentation I understand that fpscr is automatically
saved together with s0-s15 due to lazy floating-point state preservation. So
your handling of fpscr is superfluous.

Otherwise if you think that it is nescessary to zero out the whole
SWITCHFRAME, zeroing out elements from it later is also superfluous.

     memset(sf, 0x00, sizeof(SWITCHFRAME)); 
     sf->csf_lr = (uintptr_t) NutThreadEntry;
-    sf->csf_cpsr = 0;
-    sf->csf_fpscr = 0;

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------


More information about the En-Nut-Discussion mailing list