Changeset 8828


Ignore:
Timestamp:
Mar 19, 2008, 5:34:23 PM (12 years ago)
Author:
rme
Message:

Add SPgets64.

The thought at the moment is to use mm0 (rather than the %edx:%eax
pair) as the place where gets64/getu64/makes64/makeu64 put or get an
unboxed 64-bit quantity.

If this idea holds up, SPsyscall will to have to know when a syscall
returns a doubleword result, and copy the %edx:%eax pair into %mm0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/lisp-kernel/x86-spentry32.s

    r8823 r8828  
    10381038        __(movl %rcontext:tcr.foreign_sp,%esp)
    10391039        __(emms)
    1040         __(movl (%esp),%ebp)            /* save backlink */
    1041         __(addl $1*node_size,%esp)      /* pop it off */
     1040        __(pop %ebp)            /* backlink */
    10421041        __(unbox_fixnum(%arg_z,%eax))   /* syscall number */
    10431042        __(pushl $local_label(back_from_syscall))
     
    22742273/* return unboxed value in mm0 */
    22752274_spentry(gets64)
    2276         __(int $3)
     2275        __(testb $fixnummask,%arg_z_b)
     2276        __(jne 1f)
     2277        __(unbox_fixnum(%arg_z,%imm0))
     2278        __(movd %imm0,%mm0)
     2279        __(jns 8f)
     2280        /* get sign into upper half of %mm0 */
     2281        __(pcmpeqd %mm1,%mm1)   /* all ones */
     2282        __(psllq $32,%mm1)
     2283        __(por %mm1,%mm0)
     2284        __(ret)
     22851:      __(movb %arg_z_b,%imm0_b)
     2286        __(andb $tagmask,%imm0_b)
     2287        __(cmpb $tag_misc,%imm0_b)
     2288        __(jne 9f)
     2289        __(movb misc_subtag_offset(%arg_z),%imm0_b)
     2290        __(cmpb $subtag_bignum,%imm0_b)
     2291        __(jne 9f)
     2292        __(movl misc_header_offset(%arg_z),%imm0)
     2293        __(cmpl $two_digit_bignum_header,%imm0)
     2294        __(jne 9f)
     2295        __(movq misc_data_offset(%arg_z),%mm0)
     22968:      __(repret)
     22979:      __(uuo_error_reg_not_type(Rarg_z,error_object_not_u64))
    22772298_endsubp(gets64)
    22782299
Note: See TracChangeset for help on using the changeset viewer.