Changeset 270


Ignore:
Timestamp:
Nov 7, 2012, 4:16:55 PM (11 years ago)
Author:
haoliu
Message:

fix bug for test_sync

Location:
trunk/softs/tests_ccvcache_v4/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tests_ccvcache_v4/common/misc.h

    r232 r270  
    3030        nop
    3131
     32#define PRINT_SYNC(str) \
     33        la      a0, str;\
     34        jal     print_sync; \
     35        nop
     36
     37
     38
    3239#define PRINTX \
    3340        jal     printx;\
  • trunk/softs/tests_ccvcache_v4/common/subr.S

    r232 r270  
    2222        jr      ra
    2323        nop
     24
     25/*
     26 * void print_sync(char *): print a string to the multitty with a sync instruction for each character.
     27 * assumes k0 points to the tty base.
     28 */
     29        .globl print_sync
     30print_sync:
     31        .set noreorder
     32        move    t0, a0
     331:
     34        lb      t1, 0(t0);
     35        beq     t1, zero, end_print_sync
     36        nop
     37        sb      t1, 0(k0)
     38    sync
     39        addiu   t0, t0, 1
     40        j       1b
     41        nop
     42end_print_sync:
     43        jr      ra
     44        nop
     45
    2446
    2547/*
Note: See TracChangeset for help on using the changeset viewer.