Ignore:
Timestamp:
Oct 17, 2012, 12:03:39 PM (12 years ago)
Author:
bouyer
Message:

Update/add 2 new tests, from tests_mips32_vcache:
test_llsc: check basic functionnality of ll/sc
test_sc_no_ll: check that a sc without prior ll fails as expected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tests_ccvcache_v4/test_llsc/test.S

    r232 r265  
    3131        PUTCHAR(' ')
    3232
    33         /* now write to myvar via ll/sc
     33        /* now write to myvar via ll/sc */
    3434        la      s1, myvar
    35351:
     
    3737        li      a1, MAGIC2
    3838        sc      a1, 0(s1)
    39         beqz    a1, 2b
     39        beqz    a1, 1b
    4040        nop
    4141
     42        PRINTX /* print what we read with ll */
     43        PUTCHAR(' ')
     44
     45        la      s1, myvar
     46        lw      a0, 0(s1) /* print the new value */
     47        PRINTX
     48        PUTCHAR(' ')
     49
    4250        /* restore myvar value via normal write */
     51        la      s1, myvar
    4352        li      a1, MAGIC1
    4453        sw      a1, 0(s1)
     
    93102pte1:
    94103        .align 13
    95         .word PTE1_V | PTE1_C | PTE1_W | 0x0 /* map PA 0 at VA 0 */
     104        .word PTE1_V | PTE1_W | 0x0 /* map PA 0 at VA 0 */
    96105        .org pte1 + (BOOT_ADDRESS >> 21) * 4
    97106        .word PTE1_V | PTE1_C | PTE1_X | (BOOT_ADDRESS >> 21) /* map PA 0xbfc00000 at VA 0xbfc00000 */
Note: See TracChangeset for help on using the changeset viewer.