Skip to content

Long-term planning metabug #12

@CensoredUsername

Description

@CensoredUsername

This bug contains a listing of improvements to be made to the library, sorted by priority.

General

  • High

    • Modularizing different assembly dialects. Currently the only supported assembly language is x64, both in the plugin and the runtime. For the plugin the assembly language to use should be a setting determined by directives or crate attributes preferably, while for the runtime having each dialect in a separate submodule implementing the same traits would be the way to go. As for internal plugin infrastructure, it seems best to me that different assembly languages have completely separate parsing and compiling implementations (dialects like x86/x64 could share them), but all of them end up producing something that a common serialization module can understand.
    • x86 support
    • x64 support needs to be tested thoroughly.
    • a comprehensive testing framework that not only allows to test the current implementation, but also future extensions with reference tools.
  • Medium

    • Toolchain improvement: as the project consists out of several different crates in subfolders, building and testing everything is less than ergonomic currently.
    • Improving the quality of error messages. Mainly the error messages when an instruction isn't found or when an instruction variant doesn't exist are a little bare-bones
    • Currently, no checking is done on redundant prefixes or impossible prefixes.
    • For several ops (like x64 movsx) default to a certain argument size if the size of an argument isn't correctly specified. This should result in an error.
    • ARM support
    • Assembler::align is hardcoded to align as to what is required by x64.
    • Support in the runtime to keep track of all relocations caused by labels. This is important on the roadmap for x86 support, or x64 code only using a 32-bit address space.
    • Review the x64 operand size determination code and how it deals with immediate sizes.
  • Low

    • x64/x86 address displacement size hint
    • automatic size optimization for constant immediate / displacement arguments
    • AVX-512 support
  • Assembly dialect specific

    • x64

      • Jumps with 16-bit relative offsets are illegal in long mode on intel CPUs (they work fine on AMD though.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions