Lib/Target/SmallLiteral.cpp
/**
 * Encode a small literal according to Table 5 of the VideoCore-IV manual.
 * 
 * @return encoded lit value, -1 if expression cannot be encoded
 */
Encode a small literal according to Table 5 of the VideoCore-IV manual.

@return encoded lit value, -1 if expression cannot be encoded
Encode a small literal according to Table 5 of the VideoCore - IV manual . @return encoded lit value - 1 if expression cannot be encoded
int encodeSmallLit(Expr const &e) {
  if (e.tag() == Expr::INT_LIT) { 
    return encodeSmallInt(e.intLit);
  } else if (e.tag() == Expr::FLOAT_LIT) {
    return encodeSmallFloat(e.floatLit);
  }
  return -1;
}
int encodeSmallLit ( Expr const & e ) { if ( e . tag ( ) == Expr :: INT_LIT ) { return encodeSmallInt ( e . intLit ) ; } else if ( e . tag ( ) == Expr :: FLOAT_LIT ) { return encodeSmallFloat ( e . floatLit ) ; } return -1 ; }
Encode a small literal according to Table 5 of the VideoCore-IV manual.
Encode a small literal according to Table 5 of the VideoCore - IV manual .