Changeset 11319


Ignore:
Timestamp:
Nov 9, 2008, 3:02:48 AM (11 years ago)
Author:
gb
Message:

In the destructuring-bind subprims (still used for inlining some cases
involving &KEY, handle :ALLOW-OTHER-KEYS correctly. (See
CL-TEST::LAMBDA.27, CL-TEST::LAMBDA.32 in the test suite.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/ppc-spentry.s

    r10731 r11319  
    35263526        /*     associated supplied-p var to T.  */
    35273527        /*  b) Regardless of whether or not the keyword is found,  */
    3528         /*     if the keyword is :ALLOW-OTHER-KEYS and the value is non-nil,  */
    3529         /*     set imm1 to a non-zero value to indicate that unknown keywords  */
    3530         /*     are acceptable.  */
     3528        /*     if :ALLOW-OTHER-KEYS is provided with a non-nil value, */
     3529        /*     set the low bit of imm1 to indicate that unknown keywords  */
     3530        /*     are acceptable. (This bit is pre-set above to the value */
     3531        /*     the encoded value of &allow_other_keys.) */
    35313532        /*  c) If the keyword is not found (and isn't :ALLOW-OTHER-KEYS), increment  */
    3532         /*     the count of unknown keywords in imm0.  */
     3533        /*     the count of unknown keywords in the high bits of imm1*/
    35333534        /* At the end of the list, signal an error if any unknown keywords were seen  */
    35343535        /* but not allowed.  Otherwise, return.  */
     
    35443545        __(ldr(arg_reg,cons.cdr(arg_reg)))
    35453546        __(ldr(arg_y,cons.car(arg_reg)))
    3546         __(cmpri(cr0,arg_y,nil_value))
    35473547        __(cmpr(cr4,imm0,nargs))
    35483548        __(ldr(arg_reg,cons.cdr(arg_reg)))
    3549         __(bne cr3,match_test)
    3550         __(beq cr0,match_test)
    3551         __(ori imm1,imm1,1)
    35523549        __(b match_test)
    35533550match_loop:
     
    35673564        __(str(arg_y,node_size*1(imm0)))
    35683565        __(str(temp0,node_size*0(imm0)))
    3569         __(b match_keys_loop)
     3566        __(bne cr3,match_keys_loop)
     3567        __(b match_keys_check_aok)
    35703568match_test:
    35713569        __(bne cr4,match_loop)
    3572         __(oris imm1,imm1,0x8000)
     3570        __(beq cr3,match_keys_check_aok)
     3571        __(addi imm1,imm1,4)
     3572        __(b match_keys_loop)
     3573match_keys_check_aok:
     3574        __(andi. imm0,imm1,2)  /* check "seen-aok" bit in imm1 */
     3575        __(cmpri cr1,arg_y,nil_value) /* check value */
     3576        __(ori imm1,imm1,2)
     3577        __(bne cr0,match_keys_loop) /* duplicate aok */
     3578        __(beq cr1,match_keys_loop)
     3579        __(ori imm1,imm1,1)
    35733580        __(b match_keys_loop)
    35743581matched_keys:
    3575         __(cmpri(cr1,imm1,0))
    3576         __(add imm1,imm1,imm1)
    3577         __(cmpri(cr0,imm1,0))
    3578         __(bgelr cr1)
    3579         __(bnelr cr0)
     3582        __(clrrwi. imm0,imm1,2)
     3583        __(beqlr)
     3584        __(andi. imm1,imm1,1)
     3585        __(bnelr)
    35803586        /* Some unrecognized keywords.  Complain generically about  */
    35813587        /* invalid keywords.  */
Note: See TracChangeset for help on using the changeset viewer.