Home | History | Annotate | Download | only in Hexagon
      1 # RUN: llvm-mc -triple hexagon -disassemble < %s | FileCheck %s
      2 # Hexagon Programmer's Reference Manual 11.1.1 ALU32/ALU
      3 
      4 # Add
      5 0xf1 0xc3 0x15 0xb0
      6 # CHECK: r17 = add(r21, #31)
      7 0x11 0xdf 0x15 0xf3
      8 # CHECK: r17 = add(r21, r31)
      9 0x11 0xdf 0x55 0xf6
     10 # CHECK: r17 = add(r21, r31):sat
     11 
     12 # And
     13 0xf1 0xc3 0x15 0x76
     14 # CHECK: r17 = and(r21, #31)
     15 0xf1 0xc3 0x95 0x76
     16 # CHECK: r17 = or(r21, #31)
     17 0x11 0xdf 0x15 0xf1
     18 # CHECK: r17 = and(r21, r31)
     19 0x11 0xdf 0x35 0xf1
     20 # CHECK: r17 = or(r21, r31)
     21 0x11 0xdf 0x75 0xf1
     22 # CHECK: r17 = xor(r21, r31)
     23 0x11 0xd5 0x9f 0xf1
     24 # CHECK: r17 = and(r21, ~r31)
     25 0x11 0xd5 0xbf 0xf1
     26 # CHECK: r17 = or(r21, ~r31)
     27 
     28 # Nop
     29 0x00 0xc0 0x00 0x7f
     30 # CHECK: nop
     31 
     32 # Subtract
     33 0xb1 0xc2 0x5f 0x76
     34 # CHECK: r17 = sub(#21, r31)
     35 0x11 0xdf 0x35 0xf3
     36 # CHECK: r17 = sub(r31, r21)
     37 0x11 0xdf 0xd5 0xf6
     38 # CHECK: r17 = sub(r31, r21):sat
     39 
     40 # Sign extend
     41 0x11 0xc0 0xbf 0x70
     42 # CHECK: r17 = sxtb(r31)
     43 
     44 # Transfer immediate
     45 0x15 0xc0 0x31 0x72
     46 # CHECK: r17.h = #21
     47 0x15 0xc0 0x31 0x71
     48 # CHECK: r17.l = #21
     49 0xf1 0xff 0x5f 0x78
     50 # CHECK: r17 = #32767
     51 0xf1 0xff 0xdf 0x78
     52 # CHECK: r17 = #-1
     53 
     54 # Transfer register
     55 0x11 0xc0 0x75 0x70
     56 # CHECK: r17 = r21
     57 
     58 # Vector add halfwords
     59 0x11 0xdf 0x15 0xf6
     60 # CHECK: r17 = vaddh(r21, r31)
     61 0x11 0xdf 0x35 0xf6
     62 # CHECK: r17 = vaddh(r21, r31):sat
     63 0x11 0xdf 0x75 0xf6
     64 # CHECK: r17 = vadduh(r21, r31):sat
     65 
     66 # Vector average halfwords
     67 0x11 0xdf 0x15 0xf7
     68 # CHECK: r17 = vavgh(r21, r31)
     69 0x11 0xdf 0x35 0xf7
     70 # CHECK: r17 = vavgh(r21, r31):rnd
     71 0x11 0xdf 0x75 0xf7
     72 # CHECK: r17 = vnavgh(r31, r21)
     73 
     74 # Vector subtract halfwords
     75 0x11 0xdf 0x95 0xf6
     76 # CHECK: r17 = vsubh(r31, r21)
     77 0x11 0xdf 0xb5 0xf6
     78 # CHECK: r17 = vsubh(r31, r21):sat
     79 0x11 0xdf 0xf5 0xf6
     80 # CHECK: r17 = vsubuh(r31, r21):sat
     81 
     82 # Zero extend
     83 0x11 0xc0 0xd5 0x70
     84 # CHECK: r17 = zxth(r21)
     85