reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
# RUN: llvm-mc -triple=hexagon -disassemble < %s | FileCheck %s
# Hexagon Programmer's Reference Manual 11.10.4 XTYPE/FP

# Floating point addition
0x11 0xdf 0x15 0xeb
# CHECK: r17 = sfadd(r21,r31)

# Classify floating-point value
0x03 0xd5 0xf1 0x85
# CHECK: p3 = sfclass(r17,#21)
0xb3 0xc2 0x90 0xdc
# CHECK: p3 = dfclass(r17:16,#21)

# Compare floating-point value
0x03 0xd5 0xf1 0xc7
# CHECK: p3 = sfcmp.ge(r17,r21)
0x23 0xd5 0xf1 0xc7
# CHECK: p3 = sfcmp.uo(r17,r21)
0x63 0xd5 0xf1 0xc7
# CHECK: p3 = sfcmp.eq(r17,r21)
0x83 0xd5 0xf1 0xc7
# CHECK: p3 = sfcmp.gt(r17,r21)
0x03 0xd4 0xf0 0xd2
# CHECK: p3 = dfcmp.eq(r17:16,r21:20)
0x23 0xd4 0xf0 0xd2
# CHECK: p3 = dfcmp.gt(r17:16,r21:20)
0x43 0xd4 0xf0 0xd2
# CHECK: p3 = dfcmp.ge(r17:16,r21:20)
0x63 0xd4 0xf0 0xd2
# CHECK: p3 = dfcmp.uo(r17:16,r21:20)

# Convert floating-point value to other format
0x10 0xc0 0x95 0x84
# CHECK: r17:16 = convert_sf2df(r21)
0x31 0xc0 0x14 0x88
# CHECK: r17 = convert_df2sf(r21:20)

# Convert integer to floating-point value
0x50 0xc0 0xf4 0x80
# CHECK: r17:16 = convert_ud2df(r21:20)
0x70 0xc0 0xf4 0x80
# CHECK: r17:16 = convert_d2df(r21:20)
0x30 0xc0 0x95 0x84
# CHECK: r17:16 = convert_uw2df(r21)
0x50 0xc0 0x95 0x84
# CHECK: r17:16 = convert_w2df(r21)
0x31 0xc0 0x34 0x88
# CHECK: r17 = convert_ud2sf(r21:20)
0x31 0xc0 0x54 0x88
# CHECK: r17 = convert_d2sf(r21:20)
0x11 0xc0 0x35 0x8b
# CHECK: r17 = convert_uw2sf(r21)
0x11 0xc0 0x55 0x8b
# CHECK: r17 = convert_w2sf(r21)

# Convert floating-point value to integer
0x10 0xc0 0xf4 0x80
# CHECK: r17:16 = convert_df2d(r21:20)
0x30 0xc0 0xf4 0x80
# CHECK: r17:16 = convert_df2ud(r21:20)
0xd0 0xc0 0xf4 0x80
# CHECK: r17:16 = convert_df2d(r21:20):chop
0xf0 0xc0 0xf4 0x80
# CHECK: r17:16 = convert_df2ud(r21:20):chop
0x70 0xc0 0x95 0x84
# CHECK: r17:16 = convert_sf2ud(r21)
0x90 0xc0 0x95 0x84
# CHECK: r17:16 = convert_sf2d(r21)
0xb0 0xc0 0x95 0x84
# CHECK: r17:16 = convert_sf2ud(r21):chop
0xd0 0xc0 0x95 0x84
# CHECK: r17:16 = convert_sf2d(r21):chop
0x31 0xc0 0x74 0x88
# CHECK: r17 = convert_df2uw(r21:20)
0x31 0xc0 0x94 0x88
# CHECK: r17 = convert_df2w(r21:20)
0x31 0xc0 0xb4 0x88
# CHECK: r17 = convert_df2uw(r21:20):chop
0x31 0xc0 0xf4 0x88
# CHECK: r17 = convert_df2w(r21:20):chop
0x11 0xc0 0x75 0x8b
# CHECK: r17 = convert_sf2uw(r21)
0x31 0xc0 0x75 0x8b
# CHECK: r17 = convert_sf2uw(r21):chop
0x11 0xc0 0x95 0x8b
# CHECK: r17 = convert_sf2w(r21)
0x31 0xc0 0x95 0x8b
# CHECK: r17 = convert_sf2w(r21):chop

# Floating point extreme value assistance
0x11 0xc0 0xb5 0x8b
# CHECK: r17 = sffixupr(r21)
0x11 0xdf 0xd5 0xeb
# CHECK: r17 = sffixupn(r21,r31)
0x31 0xdf 0xd5 0xeb
# CHECK: r17 = sffixupd(r21,r31)

# Floating point fused multiply-add
0x91 0xdf 0x15 0xef
# CHECK: r17 += sfmpy(r21,r31)
0xb1 0xdf 0x15 0xef
# CHECK: r17 -= sfmpy(r21,r31)

# Floating point fused multiply-add with scaling
0xf1 0xdf 0x75 0xef
# CHECK: r17 += sfmpy(r21,r31,p3):scale

# Floating point reciprocal square root approximation
0x71 0xc0 0xf5 0x8b
# CHECK: r17,p3 = sfinvsqrta(r21)

# Floating point fused multiply-add for library routines
0xd1 0xdf 0x15 0xef
# CHECK: r17 += sfmpy(r21,r31):lib
0xf1 0xdf 0x15 0xef
# CHECK: r17 -= sfmpy(r21,r31):lib

# Create floating-point constant
0xb1 0xc2 0x00 0xd6
# CHECK: r17 = sfmake(#21):pos
0xb1 0xc2 0x40 0xd6
# CHECK: r17 = sfmake(#21):neg
0xb0 0xc2 0x00 0xd9
# CHECK: r17:16 = dfmake(#21):pos
0xb0 0xc2 0x40 0xd9
# CHECK: r17:16 = dfmake(#21):neg

# Floating point maximum
0x11 0xdf 0x95 0xeb
# CHECK: r17 = sfmax(r21,r31)

# Floating point minimum
0x31 0xdf 0x95 0xeb
# CHECK: r17 = sfmin(r21,r31)

# Floating point multiply
0x11 0xdf 0x55 0xeb
# CHECK: r17 = sfmpy(r21,r31)

# Floating point reciprocal approximation
0xf1 0xdf 0xf5 0xeb
# CHECK: r17,p3 = sfrecipa(r21,r31)

# Floating point subtraction
0x31 0xdf 0x15 0xeb
# CHECK: r17 = sfsub(r21,r31)