Skip to content

Commit

Permalink
This is Moira 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkwhoffmann committed Jun 27, 2023
1 parent 7a0f9b9 commit 57cc887
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Moira/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 - 2022 Dirk W. Hoffmann
Copyright (c) 2019 - 2023 Dirk W. Hoffmann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions Moira/MoiraDasm_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ Moira::dasmAndiRg(StrWriter &str, u32 &addr, u16 op) const
auto dst = _____________xxx(op);

if (str.style.syntax == DASM_MUSASHI) {
str << Ins<I>{} << Sz<S>{} << str.tab << Imu{src} << Sep{} << Dn{dst};
str << Ins<I>{} << Sz<S>{} << str.tab << Imu<S>{src} << Sep{} << Dn{dst};
} else {
str << Ins<I>{} << Sz<S>{} << str.tab << Ims<S>(src) << Sep{} << Dn{dst};
}
Expand All @@ -475,7 +475,7 @@ Moira::dasmAndiEa(StrWriter &str, u32 &addr, u16 op) const
auto dst = Op <M,S> ( _____________xxx(op), addr );

if (str.style.syntax == DASM_MUSASHI) {
str << Ins<I>{} << Sz<S>{} << str.tab << Imu{src} << Sep{} << dst;
str << Ins<I>{} << Sz<S>{} << str.tab << Imu<S>{src} << Sep{} << dst;
} else {
str << Ins<I>{} << Sz<S>{} << str.tab << Ims<S>(src) << "," << dst;
}
Expand All @@ -487,7 +487,7 @@ Moira::dasmAndiccr(StrWriter &str, u32 &addr, u16 op) const
auto src = dasmIncRead<S>(addr);

if (str.style.syntax == DASM_MUSASHI) {
str << Ins<I>{} << str.tab << Imu{src} << Sep{} << Ccr{};
str << Ins<I>{} << str.tab << Imu<S>{src} << Sep{} << Ccr{};
} else {
str << Ins<I>{} << Sz<S>{} << str.tab << Ims<S>(src) << Sep{} << Ccr{};
}
Expand Down Expand Up @@ -1059,7 +1059,7 @@ Moira::dasmBitImDy(StrWriter &str, u32 &addr, u16 op) const

default:

str << Ins<I>{} << str.tab << Imu(src) << Sep{} << dst;
str << Ins<I>{} << str.tab << Imu<S>(src) << Sep{} << dst;
}
}

Expand All @@ -1079,7 +1079,7 @@ Moira::dasmBitImEa(StrWriter &str, u32 &addr, u16 op) const

default:

str << Ins<I>{} << str.tab << Imu(src) << Sep{} << dst;
str << Ins<I>{} << str.tab << Imu<S>(src) << Sep{} << dst;
}
}

Expand Down
6 changes: 3 additions & 3 deletions Moira/StrWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ struct UInt24 { u32 raw; UInt24(u32 v) : raw(v) { } };
struct UInt32 { u32 raw; UInt32(u32 v) : raw(v) { } };

// Immediate operands
struct Imu { u32 raw; Imu(u32 v) : raw(v) { } };
template <Size S> struct Ims { i32 raw; Ims(i32 v) : raw(v) { } };
template <Size S = Long> struct Imu { u32 raw; Imu(u32 v) : raw(v) { } };
template <Size S = Long> struct Ims { i32 raw; Ims(i32 v) : raw(v) { } };
struct Imd { u32 raw; Imd(u32 v) : raw(v) { } };

// Mnemonics
Expand Down Expand Up @@ -124,7 +124,7 @@ class StrWriter
StrWriter& operator<<(UInt24);
StrWriter& operator<<(UInt32);

StrWriter& operator<<(Imu);
template <Size S> StrWriter& operator<<(Imu<S>);
template <Size S> StrWriter& operator<<(Ims<S>);
StrWriter& operator<<(Imd);

Expand Down
8 changes: 4 additions & 4 deletions Moira/StrWriter_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ StrWriter::operator<<(UInt32 u)
return *this;
}

StrWriter&
StrWriter::operator<<(Imu im)
template <Size S> StrWriter&
StrWriter::operator<<(Imu<S> im)
{
*ptr++ = '#';
*this << UInt(im.raw);
*this << UInt(CLIP<S>(im.raw));
return *this;
}

Expand Down Expand Up @@ -1231,7 +1231,7 @@ StrWriter::operator<<(Im<M, S> wrapper)

default:

*this << Imu(ea.ext1);
*this << Imu<S>(ea.ext1);
break;
}

Expand Down
2 changes: 1 addition & 1 deletion Runner/Testrunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ clock_t muclk[2] = {0,0}, moclk[2] = {0,0};

void run()
{
printf("Moira CPU tester. (C) Dirk W. Hoffmann, 2019 - 2022\n\n");
printf("Moira CPU tester. (C) Dirk W. Hoffmann, 2019 - 2023\n\n");
printf("The test program runs Moira agains Musashi with randomly generated data.\n");
printf("\n");
printf(" Test rounds : %ld\n", ROUNDS);
Expand Down

0 comments on commit 57cc887

Please sign in to comment.