Changeset 4949


Ignore:
Timestamp:
Aug 18, 2006, 8:19:51 AM (18 years ago)
Author:
Gary Byers
Message:

Darwin x86-64 assembler doesn't like absolute jumps, prefers slower ones.

Move lock prefixes to their own lines, to satisfy you-know-who.

If we don't have thread-local-storage (TLS), it's hard to avoid
the get_tcr() call on each calback.

File:
1 edited

Legend:

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

    r4858 r4949  
    186186_startfn(C(misc_ref_common))
    187187        __(movzbl %imm1_b,%imm1_l)
    188         __(jmp *local_label(misc_ref_jmp)(,%imm1,8))
     188        __(lea local_label(misc_ref_jmp)(%rip),%temp2)
     189        __(jmp *(%temp2,%imm1,8))
    189190        .p2align 3
    190191local_label(misc_ref_jmp):     
     
    620621_startfn(C(misc_set_common))
    621622        __(movzbl %imm1_b,%imm1_l)
    622         __(jmp *local_label(misc_set_jmp)(,%imm1,8))
     623        __(lea local_label(misc_set_jmp)(%rip),%temp2)
     624        __(jmp *(%temp2,%imm1,8))
    623625        .p2align 3
    624626local_label(misc_set_jmp):             
     
    17201722        __(shrq $bitmap_shift,%imm1)
    17211723        __(xorb $63,%imm0_b)
    1722         __(lock btsq %imm0,(%temp0,%imm1,8))
     1724        __(lock)
     1725        __(btsq %imm0,(%temp0,%imm1,8))
    17231726        __(jmp *%ra0)
    17241727_endsubp(rplaca)
     
    17411744        __(shrq $bitmap_shift,%imm1)
    17421745        __(xorb $63,%imm0_b)
    1743         __(lock btsq %imm0,(%temp0,%imm1,8))
     1746        __(lock)
     1747        __(btsq %imm0,(%temp0,%imm1,8))
    17441748        __(jmp *%ra0)
    17451749_endsubp(rplacd)
     
    17651769        __(shrq $bitmap_shift,%imm1)
    17661770        __(xorb $63,%imm0_b)
    1767         __(lock btsq %imm0,(%temp0,%imm1,8))
     1771        __(lock)
     1772        __(btsq %imm0,(%temp0,%imm1,8))
    17681773        __(jmp *%ra0)               
    17691774_endsubp(gvset)
     
    17911796        __(shrq $bitmap_shift,%imm1)
    17921797        __(xorb $63,%imm0_b)
    1793         __(lock btsq %imm0,(%temp0,%imm1,8))
     1798        __(lock)
     1799        __( btsq %imm0,(%temp0,%imm1,8))
    17941800        /* Now memoize the address of the hash vector   */
    17951801        __(movq %arg_x,%imm0)
     
    18001806        __(shrq $bitmap_shift,%imm1)
    18011807        __(xorb $63,%imm0_b)
    1802         __(lock btsq %imm0,(%temp0,%imm1,8))
     1808        __(lock)
     1809        __(btsq %imm0,(%temp0,%imm1,8))
    18031810        __(jmp *%ra0)               
    18041811_endsubp(set_hash_key)
     
    18181825        __(movq %temp1,%imm0)
    18191826        __(jne 3f)
    1820         __(lock cmpxchgq %arg_z,(%arg_x,%imm1))
     1827        __(lock)
     1828        __(cmpxchgq %arg_z,(%arg_x,%imm1))
    18211829        .globl C(egc_store_node_conditional_success_test)
    18221830C(egc_store_node_conditional_success_test):
     
    18321840        __(shrq $bitmap_shift,%imm1)
    18331841        __(xorb $63,%imm0_b)
    1834         __(lock btsq %imm0,(%temp1,%imm1,8))
     1842        __(lock)
     1843        __(btsq %imm0,(%temp1,%imm1,8))
    18351844        .globl C(egc_write_barrier_end)
    18361845C(egc_write_barrier_end):
     
    41944203        __(push %rbx)
    41954204        __(push %rbp)
    4196         /* TCR initialized for lisp ?   */
    4197         __(movq %fs:current_tcr@TPOFF+tcr.linear,%rax)
    4198         __(testq %rax,%rax)
    4199         __(jne 1f)
     4205        __ifdef([HAVE_TLS])
     4206         /* TCR initialized for lisp ?   */
     4207         __(movq %fs:current_tcr@TPOFF+tcr.linear,%rax)
     4208         __(testq %rax,%rax)
     4209         __(jne 1f)
     4210        __endif
    42004211        __(movq %r11,%r12)
    42014212        __(ref_global(get_tcr,%rax))
Note: See TracChangeset for help on using the changeset viewer.