Changeset 14971


Ignore:
Timestamp:
Sep 7, 2011, 1:53:21 PM (13 years ago)
Author:
Gary Byers
Message:

Back out of recent ARM kernel changes: we don't want to use single-float
registers to cache node values after all.

Location:
trunk/source/lisp-kernel
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/arm-constants.h

    r14965 r14971  
    4141#define allocbase temp0         /* while consing */
    4242
    43 /* Non-volatile pseudo node regs kept in s28-s31 */
    44 #define save0 28
    45 #define save1 29
    46 #define save2 30
    47 #define save3 31
    4843
    4944#define nbits_in_word 32
  • trunk/source/lisp-kernel/arm-constants.s

    r14965 r14971  
    6565define(`pc',`r15')
    6666
    67 /* We can keep node values in some single-float registers.  By definition,
    68    those registers aren't general-purpose, but copying between them and
    69    GPRs may be faster than using the stack would be. */
    70 define(`save0',`s28')
    71 define(`save1',`s29')
    72 define(`save2',`s30')
    73 define(`save3',`s31')
    7467                                               
    7568nargregs = 3
     
    329322         _node(last_lisp_frame) /* from TCR */
    330323         _node(code_vector)     /* of fn in lisp_frame, or 0 */
    331          _field(nvrs,4*node_size)
    332324        _endstructf
    333325
  • trunk/source/lisp-kernel/arm-gc.c

    r14965 r14971  
    10731073    mark_root((regs[r]));
    10741074  }
    1075 #ifdef LINUX
    1076   {
    1077     LispObj *vfp_info = (LispObj *)find_vfp_info(xp);
    1078     int nvr;
    1079 
    1080     if (vfp_info == NULL) {
    1081       Bug(NULL, "No VFP info in exception context!");
    1082     }
    1083    
    1084     for (nvr = save0;nvr <= save3;nvr++) {
    1085       mark_root(vfp_info[nvr]);
    1086     }
    1087   }
    1088 #endif
    10891075
    10901076
     
    13681354  }
    13691355
    1370 #ifdef LINUX
    1371   {
    1372     void *find_vfp_info(ExceptionInformation *);
    1373     LispObj* nvrs = (LispObj *)find_vfp_info(xp);
    1374 
    1375     for (r=save0;r<=save3;r++) {
    1376       update_noderef(&nvrs[r]);
    1377     }
    1378   }
    1379 #endif
    13801356
    13811357  update_locref((LispObj*) (&(xpPC(xp))));
  • trunk/source/lisp-kernel/arm-macros.s

    r14965 r14971  
    340340')
    341341
    342 /* Save the lisp non-volatile FPRs. */
     342/* Save the lisp non-volatile FPRs. These are exactly the same as the foreign
     343   FPRs. */
    343344define(`push_lisp_fprs',`
    344         __(movc16(imm0,make_header(6,subtag_double_float_vector)))
     345        __(movc16(imm0,make_header(8,subtag_double_float_vector)))
    345346        __(mov imm1,#0)
    346347        __(fmdrr d7,imm0,imm1)
    347         __(fstmfdd sp!,{d7-d13})
     348        __(fstmfdd sp!,{d7-d15})
    348349')
    349350       
     
    357358/* Pop the lisp non-volatile FPRs */       
    358359define(`pop_lisp_fprs',`
    359         __(fldmfdd sp!,{d7-d13})
    360 ')
    361 
    362 /* Reload the non-volatile lisp FPRs (d8-d13) from the stack-consed vector
     360        __(fldmfdd sp!,{d7-d15})
     361')
     362
     363/* Reload the non-volatile lisp FPRs (d8-d15) from the stack-consed vector
    363364   on top of the stack, leaving the vector in place.  d7 winds up with
    364365   a denormalized float in it, if anything cares. */
    365366define(`restore_lisp_fprs',`
    366         __(fldmfdd $1,{d7-d13})
     367        __(fldmfdd $1,{d7-d15})
    367368')               
    368369
     
    370371   FPRs. */
    371372define(`discard_lisp_fprs',`
    372         __(add sp,sp,#7*8)
     373        __(add sp,sp,#9*8)
    373374')                       
    374375       
     
    393394        __(add imm0,sp,#fulltag_misc)
    394395        __(str imm0,[rcontext,#tcr.catch_top])
    395         __(add imm0,imm0,#catch_frame.nvrs)
    396         __(fstmias imm0,{save0-save3})
    397396        __(add lr,lr,#4)
    398397')     
  • trunk/source/lisp-kernel/arm-spentry.s

    r14965 r14971  
    23492349_spentry(progvrestore)
    23502350        __(skip_stack_vector(imm0,imm1,sp))
    2351         __(ldr imm0,[imm0,#lisp_frame.size+(7*8)+node_size]) /* 7*8 = size of saved FPR vector, with header */
     2351        __(ldr imm0,[imm0,#lisp_frame.size+(9*8)+node_size]) /* 7*8 = size of saved FPR vector, with header */
    23522352        __(cmp imm0,#0)
    23532353        __(unbox_fixnum(imm0,imm0))
     
    28592859        __(ldr arg_y,[rcontext,#tcr.last_lisp_frame])
    28602860        __(stmdb vsp!,{arg_y,arg_x,temp0,temp1,temp2})
    2861         __(fstmdbs vsp!,{save0-save3})
    28622861        __(str vsp,[rcontext,#tcr.save_vsp])
    28632862/* There's a u32 vector on top of the stack ; its first data word points
     
    28952894        __(mov arg_x,#0)
    28962895        __(mov fn,#0)
    2897         __(fmsr save0,arg_z)
    2898         __(fcpys save1,save0)
    2899         __(fcpys save2,save0)
    2900         __(fcpys save3,save0)
    29012896        __(mov allocptr,#VOID_ALLOCPTR)
    29022897        __(mov rcontext,temp0)
     
    29052900        __(ldr allocptr,[rcontext,#tcr.save_allocptr])
    29062901        __(restore_lisp_frame(temp0))
    2907         __(fldmias vsp!,{save0-save3})
    29082902        __(ldmia vsp!,{arg_y,arg_x,temp0,temp1,temp2})
    29092903        __(str arg_y,[rcontext,#tcr.last_lisp_frame])
     
    31213115        __(mov fn,#0)
    31223116        __(ldr vsp,[rcontext,#tcr.save_vsp])
    3123         __(fmsr save0,arg_z)
    3124         __(fcpys save1,save0)
    3125         __(fcpys save2,save0)
    3126         __(fcpys save3,save0)       
    31273117        __(mov imm0,#TCR_STATE_LISP)
    31283118        __(str imm0,[rcontext,#tcr.valence])
     
    39993989        __(ldr imm0,[temp0,#catch_frame.link])
    40003990        __(str imm0,[rcontext,#tcr.catch_top])
    4001         __(add imm0,sp,#catch_frame.nvrs+fulltag_misc)
    4002         __(fldmias imm0,{save0-save3})
    40033991        __(ldr fn,[sp,#catch_frame.size+lisp_frame.savefn])
    40043992        __(ldr lr,[sp,#catch_frame.size+lisp_frame.savelr])
     
    40404028        /* Save our caller's LR and FN in the csp frame created by the unwind-  */
    40414029        /* protect.  (Clever, eh ?)  */
    4042         __(flds save0,[sp,#fulltag_misc+catch_frame.nvrs+(0*node_size)])
    4043         __(flds save1,[sp,#fulltag_misc+catch_frame.nvrs+(1*node_size)])
    4044         __(flds save2,[sp,#fulltag_misc+catch_frame.nvrs+(2*node_size)])
    4045         __(flds save3,[sp,#fulltag_misc+catch_frame.nvrs+(3*node_size)])
    40464030        __(add sp,sp,#catch_frame.size)
    40474031        /* We used to use a swp instruction to exchange the lr with
     
    41374121        __(str arg_x,[rcontext,#tcr.xframe])
    41384122        __(str arg_z,[rcontext,#tcr.last_lisp_frame])
    4139         __(flds save0,[sp,#fulltag_misc+catch_frame.nvrs+(0*node_size)])
    4140         __(flds save1,[sp,#fulltag_misc+catch_frame.nvrs+(1*node_size)])
    4141         __(flds save2,[sp,#fulltag_misc+catch_frame.nvrs+(2*node_size)])
    4142         __(flds save3,[sp,#fulltag_misc+catch_frame.nvrs+(3*node_size)])
    41434123        __(add sp,sp,#catch_frame.size)
    41444124        __(add imm1,nargs,#node_size)
     
    43934373        __(stmdb sp!,{imm0,imm2})
    43944374        __(push_foreign_fprs())
    4395         __(fmsr save0,arg_z)
    4396         __(fcpys save1,save0)
    4397         __(fcpys save2,save0)
    4398         __(fcpys save3,save0)       
    43994375        __(mov imm0,#TCR_STATE_LISP)
    44004376        __(str imm0,[rcontext,#tcr.valence])
  • trunk/source/lisp-kernel/lisp-debug.c

    r14965 r14971  
    792792      show_lisp_register(xp, "temp1/fname/next_method_context", temp1);
    793793      show_lisp_register(xp, "temp2/nfn", temp2);
    794 #ifdef LINUX
    795       {
    796         LispObj *nvrs = (LispObj *)find_vfp_info(xp);
    797 
    798         if (nvrs != NULL) {
    799           int r;
    800 
    801           for(r=save0;r<=save3;r++) {
    802             fprintf(dbgout,"s%02d (save%d) = %s\n",r,r-save0,print_lisp_object(nvrs[r]));
    803           }
    804         }
    805       }
    806 #endif
    807794    }
    808795#endif
     
    11131100            b, xpGPR(xp, b));
    11141101  }
    1115 #ifdef LINUX
    1116   {
    1117     LispObj *nvrs = (LispObj *)find_vfp_info(xp);
    1118    
    1119     if (nvrs != NULL) {
    1120       for(a=save0,b=save2;a<save2;a++,b++) {
    1121         fprintf(dbgout,"s%02d = 0x%08lX    s%02d = 0x%08lX\n",
    1122                 a, nvrs[a], b, nvrs[b]);
    1123       }
    1124     }
    1125   }
    1126 #endif
    11271102#endif
    11281103
     
    12301205
    12311206
    1232     for (dn=0,fn=0;dn<14;dn++) { /* d14/d15 (s28-s31) contain lisp values */
     1207    for (dn=0,fn=0;dn<16;dn++) {
    12331208      fprintf(dbgout, "s%02d = %10e (0x%08x)        s%02d = %10e (0x%08x)\n",fn,fp[fn],up[fn],fn+1,fp[fn+1],up[fn+1]);
    12341209      fn+=2;
Note: See TracChangeset for help on using the changeset viewer.