Compare commits
No commits in common. "682295b04a5087b37da9cf3f3c4fdd1b7c992166" and "8f45c8cf92867e5705fbb987a39778b797cd4b9c" have entirely different histories.
682295b04a
...
8f45c8cf92
@ -629,17 +629,14 @@ impl Type {
|
|||||||
}
|
}
|
||||||
(I32 | U32, I16 | U16 | I8 | U8) => Some(Instr::Trunc(value, other.clone())),
|
(I32 | U32, I16 | U16 | I8 | U8) => Some(Instr::Trunc(value, other.clone())),
|
||||||
(I16 | U16, I8 | U8) => Some(Instr::Trunc(value, other.clone())),
|
(I16 | U16, I8 | U8) => Some(Instr::Trunc(value, other.clone())),
|
||||||
(U8 | I8, U8 | I8 | U16 | I16 | U32 | I32 | U64 | I64 | U128 | I128) => {
|
(U8 | I8, U16 | I16 | U32 | I32 | U64 | I64 | U128 | I128) => {
|
||||||
Some(Instr::ZExt(value, other.clone()))
|
Some(Instr::ZExt(value, other.clone()))
|
||||||
}
|
}
|
||||||
(U16 | I16, U16 | I16 | U32 | I32 | U64 | I64 | U128 | I128) => {
|
(U16 | I16, U32 | I32 | U64 | I64 | U128 | I128) => {
|
||||||
Some(Instr::ZExt(value, other.clone()))
|
Some(Instr::ZExt(value, other.clone()))
|
||||||
}
|
}
|
||||||
(U32 | I32, U32 | I32 | U64 | I64 | U128 | I128) => {
|
(U32 | I32, U64 | I64 | U128 | I128) => Some(Instr::ZExt(value, other.clone())),
|
||||||
Some(Instr::ZExt(value, other.clone()))
|
(U64 | I64, U128 | I128) => Some(Instr::ZExt(value, other.clone())),
|
||||||
}
|
|
||||||
(U64 | I64, U64 | I64 | U128 | I128) => Some(Instr::ZExt(value, other.clone())),
|
|
||||||
(U128 | I128, U128 | I128) => Some(Instr::ZExt(value, other.clone())),
|
|
||||||
(U8 | U16 | U32 | U64 | U128, F16 | F32 | F32B | F64 | F80 | F128 | F128PPC) => {
|
(U8 | U16 | U32 | U64 | U128, F16 | F32 | F32B | F64 | F80 | F128 | F128PPC) => {
|
||||||
Some(Instr::UIToFP(value, other.clone()))
|
Some(Instr::UIToFP(value, other.clone()))
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ impl Parse for PrimaryExpression {
|
|||||||
stream.expect(Token::BracketClose)?;
|
stream.expect(Token::BracketClose)?;
|
||||||
Expression(Kind::Array(expressions), stream.get_range().unwrap())
|
Expression(Kind::Array(expressions), stream.get_range().unwrap())
|
||||||
}
|
}
|
||||||
_ => Err(stream.expected_err("expression inner")?)?,
|
_ => Err(stream.expected_err("expression")?)?,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Err(stream.expected_err("expression")?)?
|
Err(stream.expected_err("expression")?)?
|
||||||
@ -662,11 +662,14 @@ impl Parse for BlockLevelStatement {
|
|||||||
if let Ok(SetStatement(ident, expr, range)) = stream.parse() {
|
if let Ok(SetStatement(ident, expr, range)) = stream.parse() {
|
||||||
Stmt::Set(ident, expr, range)
|
Stmt::Set(ident, expr, range)
|
||||||
} else {
|
} else {
|
||||||
let e = stream.parse()?;
|
if let Ok(e) = stream.parse() {
|
||||||
if stream.expect(Token::Semi).is_ok() {
|
if stream.expect(Token::Semi).is_ok() {
|
||||||
Stmt::Expression(e)
|
Stmt::Expression(e)
|
||||||
|
} else {
|
||||||
|
Stmt::Return(ReturnType::Soft, e)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Stmt::Return(ReturnType::Soft, e)
|
Err(stream.expecting_err("expression")?)?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1085,8 +1085,7 @@ impl mir::Expression {
|
|||||||
},
|
},
|
||||||
(TypeKind::UserPtr(_), TypeKind::UserPtr(_))
|
(TypeKind::UserPtr(_), TypeKind::UserPtr(_))
|
||||||
| (TypeKind::Char, TypeKind::U8)
|
| (TypeKind::Char, TypeKind::U8)
|
||||||
| (TypeKind::U8, TypeKind::Char)
|
| (TypeKind::U8, TypeKind::Char) => Some(StackValue(
|
||||||
| (TypeKind::U8, TypeKind::I8) => Some(StackValue(
|
|
||||||
val.0.derive(
|
val.0.derive(
|
||||||
scope
|
scope
|
||||||
.block
|
.block
|
||||||
|
Loading…
Reference in New Issue
Block a user