Changeset 8607


Ignore:
Timestamp:
Feb 27, 2008, 2:30:12 PM (12 years ago)
Author:
andreas
Message:

Don't clobber %save3 on Windows, it contains our TCR pointer.

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

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-macros.s

    r8562 r8607  
    132132        __(movq rcontext(tcr.foreign_sp),%stack_temp)
    133133        __(movq %imm1,catch_frame.db_link(%imm2))
     134        __ifndef([WINDOWS])
    134135        __(movq %save3,catch_frame._save3(%imm2))
     136        __endif
    135137        __(movq %save2,catch_frame._save2(%imm2))
    136138        __(movq %save1,catch_frame._save1(%imm2))
     
    155157        __(movq rcontext(tcr.foreign_sp),%stack_temp)
    156158        __(movq %imm1,catch_frame.db_link(%imm2))
     159        __ifndef([WINDOWS])
    157160        __(movq %save3,catch_frame._save3(%imm2))
     161        __endif
    158162        __(movq %save2,catch_frame._save2(%imm2))
    159163        __(movq %save1,catch_frame._save1(%imm2))
  • trunk/source/lisp-kernel/x86-spentry64.s

    r8562 r8607  
    12331233        __(movq catch_frame._save1(%temp0),%save1)
    12341234        __(movq catch_frame._save2(%temp0),%save2)
     1235        __ifndef([WINDOWS])
    12351236        __(movq catch_frame._save3(%temp0),%save3)
     1237        __endif
    12361238        __(movq %imm1,rcontext(tcr.catch_top))
    12371239        __(movq catch_frame.pc(%temp0),%ra0)
     
    12771279        __(movq catch_frame._save1(%temp0),%save1)
    12781280        __(movq catch_frame._save2(%temp0),%save2)
     1281        __ifndef([WINDOWS])
    12791282        __(movq catch_frame._save3(%temp0),%save3)
     1283        __endif
    12801284        __(movq %imm1,rcontext(tcr.catch_top))
    12811285        __(movq catch_frame.pc(%temp0),%ra0)
     
    13321336        __(movq %save2,%rsp)
    13331337        __(movq catch_frame.rbp(%temp0),%rbp)
     1338        __ifndef([WINDOWS])
    13341339        __(movq catch_frame._save3(%temp0),%save3)
     1340        __endif
    13351341        __(movq catch_frame._save2(%temp0),%save2)
    13361342        __(movq catch_frame._save1(%temp0),%save1)
     
    13521358        __(push catch_frame._save1(%temp0))
    13531359        __(push catch_frame._save2(%temp0))
     1360        __ifndef([WINDOWS])
    13541361        __(push catch_frame._save3(%temp0))
     1362        __endif
    13551363        __(push catch_frame.pc(%temp0))
    13561364        __(movq catch_frame.rbp(%temp0),%rbp)
     
    13821390        __(jns local_label(_nthrowv_tpushloop))
    13831391        __(pop %xfn)
     1392        __ifndef([WINDOWS])
    13841393        __(pop %save3)
     1394        __endif
    13851395        __(pop %save2)
    13861396        __(pop %save1)
     
    14581468        __(movq catch_frame.rsp(%temp0),%rsp)
    14591469        __(movq catch_frame.rbp(%temp0),%rbp)
     1470        __ifndef([WINDOWS])
    14601471        __(movq catch_frame._save3(%temp0),%save3)
     1472        __endif
    14611473        __(movq catch_frame._save2(%temp0),%save2)
    14621474        __(movq catch_frame._save1(%temp0),%save1)
     
    14801492        __(movq catch_frame._save1(%temp0),%save1)
    14811493        __(movq catch_frame._save2(%temp0),%save2)
     1494        __ifndef([WINDOWS])
    14821495        __(movq catch_frame._save3(%temp0),%save3)
     1496        __endif
    14831497        __(movq catch_frame.pc(%temp0),%xfn)
    14841498        __(movq catch_frame.rbp(%temp0),%rbp)
     
    22592273        __(jge 3b)
    22602274        /* Push the %saveN registers, so that we can use them in this loop   */
    2261         __(push %save3)
     2275        /* Also, borrow %arg_y for a bit */
     2276        __(push %arg_y)
    22622277        __(push %save2)
    22632278        __(push %save1)
     
    22692284        __(movq %imm0,%save2)
    22702285        /* %save2 is the length of the keyword vector   */
    2271 5:      __(movq (%arg_z),%save3)        /* %save3 is current keyword   */
     22865:      __(movq (%arg_z),%arg_y)        /* %arg_y is current keyword   */
    22722287        __(xorl %imm0_l,%imm0_l)
    2273         __(cmpq $nrs.kallowotherkeys,%save3)
     2288        __(cmpq $nrs.kallowotherkeys,%arg_y)
    22742289        __(jne local_label(next_keyvect_entry))
    22752290        __(btsq $keyword_flags_seen_aok_bit,%temp1)
     
    22792294        __(btsq $keyword_flags_aok_bit,%temp1)
    22802295        __(jmp local_label(next_keyvect_entry))
    2281 6:      __(cmpq misc_data_offset(%arg_x,%imm0),%save3)
     22966:      __(cmpq misc_data_offset(%arg_x,%imm0),%arg_y)
    22822297        __(jne 7f)
    22832298        /* Got a match; have we already seen this keyword ?   */
     
    22852300        __(cmpb $fulltag_nil,-node_size*2(%save0,%imm0,2))
    22862301        __(jne 9f)      /* already seen keyword, ignore this value   */
    2287         __(movq node_size(%arg_z),%save3)
    2288         __(movq %save3,-node_size(%save0,%imm0,2))
     2302        __(movq node_size(%arg_z),%arg_y)
     2303        __(movq %arg_y,-node_size(%save0,%imm0,2))
    22892304        __(movl $t_value,-node_size*2(%save0,%imm0,2))
    22902305        __(jmp 9f)
     
    22952310        /* Didn't match anything in the keyword vector. Is the keyword  */
    22962311        /* :allow-other-keys ?   */
    2297         __(cmpq $nrs.kallowotherkeys,%save3)
     2312        __(cmpq $nrs.kallowotherkeys,%arg_y)
    22982313        __(je 9f)               /* :allow-other-keys is never "unknown" */
    229923148:      __(btsq $keyword_flags_unknown_keys_bit,%temp1)
     
    23042319        __(pop %save1)
    23052320        __(pop %save2)
    2306         __(pop %save3)
     2321        __(pop %arg_y)
    23072322        /* If the function takes an &rest arg, or if we got an unrecognized  */
    23082323        /* keyword and don't allow that, copy the incoming keyword/value  */
     
    29012916        __(jge local_label(push_pair_loop))
    29022917        /* Push the %saveN registers, so that we can use them in this loop   */
     2918        /* Also, borrow %arg_z */
    29032919        __(push %save0)
    29042920        __(push %save1)
    29052921        __(push %save2)
    2906         __(push %save3)
     2922        __(push %arg_z)
    29072923        /* save0 points to the 0th value/supplied-p pair   */
    29082924        __(movq %arg_y,%save0)
     
    29102926        __(vector_length(%arg_x,%save1))
    29112927        /* save2 is the current keyword   */
    2912         /* save3 is the value of the current keyword   */
     2928        /* arg_z is the value of the current keyword   */
    29132929        __(xorl %imm0_l,%imm0_l)        /* count unknown keywords seen   */
    29142930local_label(match_keys_loop):
     
    29172933        __(_car(%arg_reg,%save2))
    29182934        __(_cdr(%arg_reg,%arg_reg))
    2919         __(_car(%arg_reg,%save3))
     2935        __(_car(%arg_reg,%arg_z))
    29202936        __(_cdr(%arg_reg,%arg_reg))
    29212937        __(xorl %arg_y_l,%arg_y_l)
     
    29362952        __(jc local_label(match_keys_loop))
    29372953        /* First time we've seen :allow-other-keys.  Maybe set aok_bit.   */
    2938         __(compare_reg_to_nil(%save3))
     2954        __(compare_reg_to_nil(%arg_z))
    29392955        __(je local_label(match_keys_loop))
    29402956        __(btsl $aok_bit,%nargs)
     
    29452961        __(cmpb $fulltag_nil,-node_size*2(%save0,%arg_y,2))
    29462962        __(jne local_label(match_keys_loop))
    2947         __(movq %save3,-node_size(%save0,%arg_y,2))
     2963        __(movq %arg_z,-node_size(%save0,%arg_y,2))
    29482964        __(movl $t_value,-node_size*2(%save0,%arg_y,2))
    29492965        __(cmpq $nrs.kallowotherkeys,%save2)
     
    29512967        __(btsl $seen_aok_bit,%nargs)
    29522968        __(jnc local_label(match_keys_loop))
    2953         __(compare_reg_to_nil(%save3))
     2969        __(compare_reg_to_nil(%arg_z))
    29542970        __(je local_label(match_keys_loop))
    29552971        __(btsl $aok_bit,%nargs)
    29562972        __(jmp local_label(match_keys_loop))
    29572973local_label(matched_keys):             
    2958         __(pop %save3)
     2974        __(pop %arg_z)
    29592975        __(pop %save2)
    29602976        __(pop %save1)
Note: See TracChangeset for help on using the changeset viewer.