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_r2_subqh_ph.c (303B)


      1#include<stdio.h>
      2#include<assert.h>
      3
      4int main()
      5{
      6    int rd, rs, rt;
      7    int result;
      8
      9    rs = 0x12345678;
     10    rt = 0x87654321;
     11    result = 0x456709AB;
     12
     13    __asm
     14        ("subqh.ph %0, %1, %2\n\t"
     15         : "=r"(rd)
     16         : "r"(rs), "r"(rt)
     17        );
     18    assert(rd == result);
     19
     20    return 0;
     21}