summaryrefslogtreecommitdiff
path: root/disasm.h
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-05-22 21:37:47 +0300
committerOxore <oxore@protonmail.com>2023-05-22 21:40:56 +0300
commit8de6e3253b614f2b751cb760b489f487b927d1c5 (patch)
tree07b3db01ec39cdc72f83d8206d05ff47551f8da8 /disasm.h
parentcdabbbcfa0717b2253f79e04eb6ac14996cf9dca (diff)
Fix Clang errors and warnings
Diffstat (limited to 'disasm.h')
-rw-r--r--disasm.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/disasm.h b/disasm.h
index 68bb824..441f7da 100644
--- a/disasm.h
+++ b/disasm.h
@@ -213,7 +213,7 @@ struct Arg {
return 0;
}
static constexpr auto AddrModeXn(const ArgType type, const uint8_t xn) {
- Arg a{type, 0};
+ Arg a{{type}, {0}};
a.xn = xn;
return a;
}
@@ -230,67 +230,67 @@ struct Arg {
}
static constexpr auto D16AnAddr(const uint8_t xn, const int16_t d16)
{
- Arg a{ArgType::kD16AnAddr, 0};
+ Arg a{{ArgType::kD16AnAddr}, {0}};
a.d16_an = D16AnPCAddr{xn, d16};
return a;
}
static constexpr auto D16PCAddr(const int16_t d16)
{
- Arg a{ArgType::kD16PCAddr, 0};
+ Arg a{{ArgType::kD16PCAddr}, {0}};
a.d16_pc = D16AnPCAddr{0, d16};
return a;
}
static constexpr auto Word(const int16_t w)
{
- Arg a{ArgType::kWord, 0};
+ Arg a{{ArgType::kWord}, {0}};
a.lword = w;
return a;
}
static constexpr auto Long(const int32_t l)
{
- Arg a{ArgType::kLong, 0};
+ Arg a{{ArgType::kLong}, {0}};
a.lword = l;
return a;
}
static constexpr auto D8AnXiAddr(
const uint8_t xn, const uint8_t xi, const OpSize s, const int8_t d8)
{
- Arg a{ArgType::kD8AnXiAddr, 0};
+ Arg a{{ArgType::kD8AnXiAddr}, {0}};
a.d8_an_xi = D8AnPCXiAddr{xn, uint8_t(xi | (s == OpSize::kLong ? 0x10u : 0u)), d8};
return a;
}
static constexpr auto D8PCXiAddr(
const uint8_t xn, const uint8_t xi, const OpSize s, const int8_t d8)
{
- Arg a{ArgType::kD8PCXiAddr, 0};
+ Arg a{{ArgType::kD8PCXiAddr}, {0}};
a.d8_pc_xi = D8AnPCXiAddr{xn, uint8_t(xi | (s == OpSize::kLong ? 0x10u : 0u)), d8};
return a;
}
static constexpr auto Immediate(const int32_t value) {
- Arg a{ArgType::kImmediate, 0};
+ Arg a{{ArgType::kImmediate}, {0}};
a.lword = value;
return a;
}
static constexpr auto RegMask(const uint16_t regmask) {
- Arg a{ArgType::kRegMask, 0};
+ Arg a{{ArgType::kRegMask}, {0}};
a.uword = regmask;
return a;
}
static constexpr auto RegMaskPredecrement(const uint16_t regmask) {
- Arg a{ArgType::kRegMaskPredecrement, 0};
+ Arg a{{ArgType::kRegMaskPredecrement}, {0}};
a.uword = regmask;
return a;
}
static constexpr auto Displacement(const int32_t displacement) {
- Arg a{ArgType::kDisplacement, 0};
+ Arg a{{ArgType::kDisplacement}, {0}};
a.lword = displacement;
return a;
}
- static constexpr auto CCR() { return Arg{ArgType::kCCR, 0}; }
- static constexpr auto SR() { return Arg{ArgType::kSR, 0}; }
- static constexpr auto USP() { return Arg{ArgType::kUSP, 0}; }
+ static constexpr auto CCR() { return Arg{{ArgType::kCCR}, {0}}; }
+ static constexpr auto SR() { return Arg{{ArgType::kSR}, {0}}; }
+ static constexpr auto USP() { return Arg{{ArgType::kUSP}, {0}}; }
static constexpr auto Raw(const uint16_t instr) {
- Arg a{ArgType::kRaw, 0};
+ Arg a{{ArgType::kRaw}, {0}};
a.uword = instr;
return a;
}