Exemplo n.º 1
0
//////////////////////////////////////////////////////////////////////
//
// LogIorInsn::SimplifyOutputAux
//
//      (logior x  0) = x
//      (logior x -1) = -1
//
Operand* LogIorInsn::SimplifyOutputAux() const
{
    if (ir_operand_equal(GetSx(), 0))
    {
        return GetSy();
    }

    if (ir_operand_equal(GetSy(), 0))
    {
        return GetSx();
    }

    if (ir_operand_equal(GetSx(), -1) || ir_operand_equal(GetSy(), -1))
    {
        return ir_make_real(GetTy(), -1);
    }

    return GetOutput();
} // LogIorInsn::SimplifyOutputAux
Exemplo n.º 2
0
//////////////////////////////////////////////////////////////////////
//
// ShrInsn::SimplifyOutputAux
//
//      (ash 0 n) = 0
//      (ash x 0) = x
//
Operand* ShrInsn::SimplifyOutputAux() const
{
    if (ir_operand_equal(GetSx(), 0)) return ir_make_real(GetTy(), 0);
    if (ir_operand_equal(GetSy(), 0)) return GetSx();
    return GetOutput();
} // ShrInsn::SimplifyOutputAux
Exemplo n.º 3
0
void GlBattery::Translate()
{
  glTranslatef(GetTx(), GetTy(), 0.0f);
}
Exemplo n.º 4
0
void GlCell::Translate()
{
  glTranslatef(GetTx(), 0.f, GetTy());
}