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

check_andm.s (1395B)


      1# mach: crisv0 crisv3 crisv8 crisv10 crisv32
      2# output: 2\n2\nffff\nffffffff\n50124400\nffff0002\n2\nfffff\nfedaff0f\n78134400\nffffff02\n2\nf02\n78134401\n78134400\n
      3
      4 .include "testutils.inc"
      5 .data
      6x:
      7 .dword 2,-1,0xffff,-1,0x5432f789
      8 .word 2,-1,0xffff,0xff5f,0xf789
      9 .byte 2,-1,0x5a,0x89,0
     10
     11 start
     12 moveq -1,r3
     13 move.d x,r5
     14 and.d [r5+],r3
     15 test_move_cc 0 0 0 0
     16 checkr3 2
     17
     18 moveq 2,r3
     19 and.d [r5],r3
     20 test_move_cc 0 0 0 0
     21 addq 4,r5
     22 checkr3 2
     23
     24 move.d 0xffff,r3
     25 and.d [r5+],r3
     26 test_move_cc 0 0 0 0
     27 checkr3 ffff
     28
     29 moveq -1,r3
     30 and.d [r5+],r3
     31 test_move_cc 1 0 0 0
     32 checkr3 ffffffff
     33
     34 move.d 0x78134452,r3
     35 and.d [r5+],r3
     36 test_move_cc 0 0 0 0
     37 checkr3 50124400
     38
     39 moveq -1,r3
     40 and.w [r5+],r3
     41 test_move_cc 0 0 0 0
     42 checkr3 ffff0002
     43
     44 moveq 2,r3
     45 and.w [r5+],r3
     46 test_move_cc 0 0 0 0
     47 checkr3 2
     48
     49 move.d 0xfffff,r3
     50 and.w [r5],r3
     51 test_move_cc 1 0 0 0
     52 addq 2,r5
     53 checkr3 fffff
     54
     55 move.d 0xfedaffaf,r3
     56 and.w [r5+],r3
     57 test_move_cc 1 0 0 0
     58 checkr3 fedaff0f
     59
     60 move.d 0x78134452,r3
     61 and.w [r5+],r3
     62 test_move_cc 0 0 0 0
     63 checkr3 78134400
     64
     65 moveq -1,r3
     66 and.b [r5],r3
     67 test_move_cc 0 0 0 0
     68 addq 1,r5
     69 checkr3 ffffff02
     70
     71 moveq 2,r3
     72 and.b [r5+],r3
     73 test_move_cc 0 0 0 0
     74 checkr3 2
     75
     76 move.d 0xfa7,r3
     77 and.b [r5+],r3
     78 test_move_cc 0 0 0 0
     79 checkr3 f02
     80
     81 move.d 0x78134453,r3
     82 and.b [r5+],r3
     83 test_move_cc 0 0 0 0
     84 checkr3 78134401
     85
     86 and.b [r5],r3
     87 test_move_cc 0 1 0 0
     88 checkr3 78134400
     89
     90 quit