--- MiNT/src/trans.c 2018/04/24 17:55:52 1.1 +++ MiNT/src/trans.c 2018/04/24 17:57:17 1.1.1.2 @@ -154,7 +154,7 @@ twoindex(disp, base, index) if (syntax == GAS) { - return concat6(base, "@(", disp, ",", changesiz(index), ")"); + return concat6(base, "@(", disp, ",", changesiz2(index), ")"); } else { @@ -190,6 +190,94 @@ bitfield(op1, op2, op3) char * +postindex(bd, an , index, od) + + char *bd, *an, *index , *od; + +{ + + if (syntax == GAS) { + + return concat8(an, "@(", bd, ")@(", od, ",", changesiz2(index), ")"); + + } else { + + return concat9("([",an, ",", bd, "],", index, ",", od ,")"); + + } + +} + + + +char * + +postindex0(bd) + + char *bd; + +{ + + if (syntax == GAS) { + + return concat3("@(", bd, ")"); + + } else { + + return concat3("([", bd, "])"); + + } + +} + + + +char * + +postindex1(bd,od) + + char *bd, *od; + +{ + + if (syntax == GAS) { + + return concat5("@(", bd, ")@(", od, ")"); + + } else { + + return concat5("([", bd, "],", od, ")"); + + } + +} + + + +char * + +preindex(bd, an , index, od) + + char *bd, *an, *index , *od; + +{ + + if (syntax == GAS) { + + return concat8(an, "@(", bd, ",", changesiz2(index), ")@(", od, ")"); + + } else { + + return concat9("([",an, ",", bd, ",", index, "],", od, ")"); + + } + +} + + + +char * + do_ops(label, opcode, space, operand) char *label, *opcode, *space, *operand; @@ -364,6 +452,36 @@ changesiz(op) op++; + } + + return r; + +} + + + +char * + +changesiz2(op) /* rw: hack for scaled index */ + + char *op; + +{ + + char *r = op; + + + + if (syntax != GAS) return op; + + + + while (*op) { + + if (*op == '.' || *op == '*' ) *op = ':'; + + op++; + } return r;