From e3b1fa5ffa6b1680d0df0f895fcfbe430d6cc4c7 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 20 Jan 2024 09:51:53 +0100 Subject: Revision 95: Breaking changes, update flags to be standard. Also added bpp/32asm as a MPCC module. Signed-off-by: Amlal El Mahrouss --- CompilerKit/AsmKit/AsmKit.hpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'CompilerKit') diff --git a/CompilerKit/AsmKit/AsmKit.hpp b/CompilerKit/AsmKit/AsmKit.hpp index 9160035..eeb1de0 100644 --- a/CompilerKit/AsmKit/AsmKit.hpp +++ b/CompilerKit/AsmKit/AsmKit.hpp @@ -67,6 +67,8 @@ namespace CompilerKit explicit PlatformAssembler() = default; ~PlatformAssembler() = default; + CXXKIT_COPY_DEFAULT(PlatformAssembler); + virtual std::string CheckLine(std::string &line, const std::string &file) = 0; virtual bool WriteLine(std::string &line, const std::string &file) = 0; virtual bool WriteNumber(const std::size_t &pos, std::string &from_what) = 0; @@ -81,6 +83,8 @@ namespace CompilerKit explicit PlatformAssembler64x0() = default; ~PlatformAssembler64x0() = default; + CXXKIT_COPY_DEFAULT(PlatformAssembler64x0); + virtual std::string CheckLine(std::string &line, const std::string &file) override; virtual bool WriteLine(std::string &line, const std::string &file) override; virtual bool WriteNumber(const std::size_t& pos, std::string& from_what) override; @@ -89,6 +93,24 @@ namespace CompilerKit #endif // __ASM_NEED_64x0__ +#ifdef __ASM_NEED_32x0__ + + class PlatformAssembler32x0 final : public PlatformAssembler + { + public: + explicit PlatformAssembler32x0() = default; + ~PlatformAssembler32x0() = default; + + CXXKIT_COPY_DEFAULT(PlatformAssembler32x0); + + virtual std::string CheckLine(std::string &line, const std::string &file) override; + virtual bool WriteLine(std::string &line, const std::string &file) override; + virtual bool WriteNumber(const std::size_t& pos, std::string& from_what) override; + + }; + +#endif // __ASM_NEED_32x0__ + union NumberCast final { explicit NumberCast(UInt64 raw) : raw(raw) {} @@ -103,4 +125,6 @@ namespace CompilerKit # define MPCC_MODULE(name) int name(int argc, char** argv) #else # define MPCC_MODULE(name) int main(int argc, char** argv) -#endif /* ifdef __MODULE_NEED__ */ \ No newline at end of file +#endif /* ifdef __MODULE_NEED__ */ + + -- cgit v1.2.3