1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00

att style for the lol

This commit is contained in:
julianb0 2019-06-16 19:44:34 +02:00
parent 791e52dafd
commit 76874ad7c3
No known key found for this signature in database
GPG Key ID: DDF8325C95299A62

View File

@ -32,8 +32,22 @@ void dump_instr(ctx_t *ctx,
if (lock)
log("lock");
#ifndef _ATT_STYLE
log("%s\t", in->name);
#else
char s1[2] = {0, 0}, s2[2] = {0, 0};
if (p1 && ACC_IS_MEM(p1))
s1[0] = getmempref(p1->mlen);
if (p2 && ACC_IS_MEM(p2))
s2[0] = getmempref(p2->mlen);
log("%s%s%s\t", in->name, s1, s2);
#endif
if (rep)
log(" rep");
log(".rep");
if (cond)
{
@ -57,37 +71,20 @@ void dump_instr(ctx_t *ctx,
log("\t");
#ifndef _ATT_STYLE
log("%s\t", in->name);
if (p1) {
dump_acc(ctx, p1);
if (p2) {
log(", ");
dump_acc(ctx, p2);
}
}
#else
char s1[2] = {0, 0}, s2[2] = {0, 0};
if (p1 && ACC_IS_MEM(p1))
s1[0] = getmempref(p1->mlen);
if (p2 && ACC_IS_MEM(p2))
s2[0] = getmempref(p2->mlen);
log("%s%s%s\t", in->name, s1, s2);
if (p1) {
if (p2) {
dump_acc(ctx, p2);
log(", ");
}
dump_acc(ctx, p1);
}
#endif
}
log("\n");
}