Lib/Source/Translate.cpp
/**
 * Translate the argument of an operator (either a variable or a small imm)
 */
Translate the argument of an operator (either a variable or a small imm)
Translate the argument of an operator ( either a variable or a small imm )
RegOrImm operand(Expr::Ptr e) {
  RegOrImm x;
  if (e->tag() == Expr::VAR) {
    x = RegOrImm(e->var());
  } else if (e->tag() == Expr::INT_LIT) { 
    x = Imm(e->intLit);
  } else if (e->tag() == Expr::FLOAT_LIT) {
    x = Imm(e->floatLit);
  } else {
    assert(false);
  }
  return x;
}
RegOrImm operand ( Expr :: Ptr e ) { RegOrImm x ; if ( e -> tag ( ) == Expr :: VAR ) { x = RegOrImm ( e -> var ( ) ) ; } else if ( e -> tag ( ) == Expr :: INT_LIT ) { x = Imm ( e -> intLit ) ; } else if ( e -> tag ( ) == Expr :: FLOAT_LIT ) { x = Imm ( e -> floatLit ) ; } else { assert ( false ) ; } return x ; }
Translate the argument of an operator (either a variable or a small imm)
Translate the argument of an operator ( either a variable or a small imm )