예제 #1
0
        public void SimpleLshr_ParseCheck()
        {
            LShl shl = new LShl(_valueResult, _valueOp1, _valueOp2);

            Assert.AreEqual($"{_valueResult.Identifier} = shl {_valueResult.ParseType()} {_valueOp1.ValueOrIdentifier}, {_valueOp2.ValueOrIdentifier}",
                            LHelper.Trim(shl.ParseInstruction()));
        }
예제 #2
0
        public void SimpleLshr_WithConstant_ParseCheck()
        {
            LValueRef op2 = new LValueRef(LType.Int32Type(), "12");
            LShl      shl = new LShl(_valueResult, _valueOp1, op2);

            Assert.AreEqual($"{_valueResult.Identifier} = shl {_valueResult.ParseType()} {_valueOp1.ValueOrIdentifier}, {op2.ValueOrIdentifier}",
                            LHelper.Trim(shl.ParseInstruction()));
        }
예제 #3
0
        public void SimpleLshr_NuwNsw_ParseCheck()
        {
            LShl shl = new LShl(_valueResult, _valueOp1, _valueOp2)
            {
                NoUnsignedWrap = true,
                NoSignedWrap   = true,
            };

            Assert.AreEqual($"{_valueResult.Identifier} = shl nuw nsw {_valueResult.ParseType()} {_valueOp1.ValueOrIdentifier}, {_valueOp2.ValueOrIdentifier}",
                            LHelper.Trim(shl.ParseInstruction()));
        }