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_dsp_r1_repl_ph.c (341B)


      1#include<stdio.h>
      2#include<assert.h>
      3
      4int main()
      5{
      6    int rd, result;
      7
      8    result = 0x01BF01BF;
      9    __asm
     10        ("repl.ph %0, 0x1BF\n\t"
     11         : "=r"(rd)
     12        );
     13    assert(rd == result);
     14
     15    result = 0x01FF01FF;
     16    __asm
     17        ("repl.ph %0, 0x01FF\n\t"
     18         : "=r"(rd)
     19        );
     20    assert(rd == result);
     21
     22    return 0;
     23}