cachepc-qemu

Fork of AMDESE/qemu with changes for cachepc side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-qemu
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

test_flix.S (989B)


      1#include "macros.inc"
      2
      3test_suite flix
      4
      5#if XCHAL_HAVE_FLIX3
      6
      7test misc
      8    {
      9        mov     a3, a4
     10        mov     a2, a3
     11        nop
     12    }
     13    {
     14        nop
     15        bne.w18 a2, a3, 1f
     16    }
     17    movi    a2, 1f
     18    {
     19        mov     a2, a3
     20        mov     a3, a2
     21        nop
     22    }
     23    {
     24        l32i    a2, a3, 0
     25        add     a4, a4, a2
     26        nop
     27    }
     28    {
     29        mov     a3, a4
     30        jx      a3
     31        nop
     32    }
     331:
     34test_end
     35
     36test sum
     37
     38    movi    a2, 0
     39    movi    a3, 2f
     40    movi    a4, 0
     41    movi    a5, 4
     42
     43    loop    a5, 1f
     44    {
     45        l32i    a2, a3, 0
     46        addi    a3, a3, 4
     47        add     a4, a4, a2
     48    }
     491:
     50    add     a4, a4, a2
     51    assert  eqi, a4, 10
     52    .data
     532:
     54    .word   1, 2, 3, 4
     55    .previous
     56test_end
     57
     58test rep_dependency
     59
     60    {
     61        movi    a2, 1
     62        movi    a3, 2
     63        nop
     64    }
     65    {
     66        or      a2, a3, a3
     67        or      a3, a2, a2
     68        nop
     69    }
     70    assert  eqi, a2, 2
     71    assert  eqi, a3, 1
     72
     73test_end
     74
     75#endif
     76
     77test_suite_end