Changeset 8526


Ignore:
Timestamp:
Feb 21, 2008, 2:03:49 AM (12 years ago)
Author:
rme
Message:

misc_ref_common, misc_set_common: When referencing or altering bits in
a bit vector (see local_label(misc_ref_bit_vector) and
local_label(misc_set_bit_vector)), use a memory operand as the bit base
in the appropriate BT/BTS/BTR instruction.

This is shorter, and avoids using an additional register for a word
index.

File:
1 edited

Legend:

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

    r8476 r8526  
    558558local_label(misc_ref_bit_vector):
    559559        __(unbox_fixnum(%arg_z,%imm0))
    560         __(movl $63,%imm1_l)
    561         __(andb %imm0_b,%imm1_b)
    562         __(shrq $6,%imm0)
    563         __(btq %imm1,misc_data_offset(%arg_y,%imm0,8))
     560        __(btq %imm0,misc_data_offset(%arg_y))
    564561        __(setc %imm0_b)
    565562        __(negb %imm0_b)
     
    10231020        __(testq $~fixnumone,%arg_z)
    10241021        __(jne local_label(misc_set_bad))
    1025         __(unbox_fixnum(%arg_y,%imm1))
    1026         __(movzbl %imm1_b,%imm0_l)
    1027         __(andb $63,%imm0_b)
    1028         __(shrq $6,%imm1)
     1022        __(unbox_fixnum(%arg_y,%imm0))
    10291023        __(testb %arg_z_b,%arg_z_b)
    10301024        __(je local_label(misc_set_clr_bit))
    10311025local_label(misc_set_set_bit): 
    1032         __(btsq %imm0,misc_data_offset(%arg_x,%imm1,8))
     1026        __(btsq %imm0,misc_data_offset(%arg_x))
    10331027        __(ret)
    10341028local_label(misc_set_clr_bit): 
    1035         __(btrq %imm0,misc_data_offset(%arg_x,%imm1,8))
     1029        __(btrq %imm0,misc_data_offset(%arg_x))
    10361030        __(ret)
    10371031local_label(misc_set_u8):       
Note: See TracChangeset for help on using the changeset viewer.