don't remove typecasts in asmsub argument lists

This commit is contained in:
Irmen de Jong 2021-03-09 21:29:48 +01:00
parent 6bd205c02a
commit 2431ed811a

View File

@ -154,16 +154,6 @@ internal class BeforeAsmGenerationAstChanger(val program: Program, val errors: I
// The only place for now where we can do this is for: // The only place for now where we can do this is for:
// asmsub register pair parameter. // asmsub register pair parameter.
if(typecast.type in WordDatatypes) {
val fcall = typecast.parent as? IFunctionCall
if (fcall != null) {
val sub = fcall.target.targetStatement(program) as? Subroutine
if (sub != null && sub.isAsmSubroutine) {
return listOf(IAstModification.ReplaceNode(typecast, typecast.expression, parent))
}
}
}
if(sourceDt in PassByReferenceDatatypes) { if(sourceDt in PassByReferenceDatatypes) {
if(typecast.type==DataType.UWORD) { if(typecast.type==DataType.UWORD) {
if(typecast.expression is IdentifierReference) { if(typecast.expression is IdentifierReference) {