-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
I've been poking at the new x64 assembler and I'm starting to accumulate a number of various things here and there so I wanted to write these down before I forgot. I had a rough high-level goal of "I'd like to implement mul (and imul) instructions" and it led to most of these issues:
- Fixed registers don't show up in ISLE right now. We need to represent them as
Gprin Cranelift but something likeRaxduring fuzzing. - The first argument of many ISLE constructors is
AssemblerReadWriteGprbut this technically isn't correct, they should all takeAssemblerReadGpr(note the lack of "Write"). (x64: Refactor assembler ISLE constructors #10276) - Return values from ISLE are
AssemblerReadWriteGpr, but like above they should probably beAssemblerReadGprinstead. Basically the "write" part should mostly just be an internal detail that the ISLE bindings don't expose. (x64: Refactor assembler ISLE constructors #10276) - Instructions that modify memory, such as
x64_addb_mi, should probably have two constructors in ISLE: one for the version that modifies a register and one that modifies memory. The former would returnAssemblerReadGprand the latter would returnSideEffectNoResult. (x64: Refactor assembler ISLE constructors #10276) - Instructions that return multiple results, such as
mul, should returnValueRegsinstead of a single GPR. - ISLE constructors for new instructions can overlap in priorities when the types are disjoint (e.g. no need to do 1-12, only 1-3 for within one type) (x64: rework new assembler rule priorities, remove old emission rules #10260)
- Previous ISLE constructors/
emit.rsshould be removed instead of acting as a catch-all (to help catch mistakes and additionally gradually clean things up) (x64: rework new assembler rule priorities, remove old emission rules #10260) - If
Assembler*Write*is removed from ISLE bindings (above bullets) then auto-conversions and various methods to/from other ISLE types should be removed as they shouldn't be necessary. (x64: Refactor assembler ISLE constructors #10276)
cc @abrown
Metadata
Metadata
Assignees
Labels
No labels