Remove `expect(clippy::allow_attributes_without_reason)` from cranelift-codegen (#11182)* Remove `expect(clippy::allow_attributes_without_reason)` from cranelift-codegenThis commit gets around to
Remove `expect(clippy::allow_attributes_without_reason)` from cranelift-codegen (#11182)* Remove `expect(clippy::allow_attributes_without_reason)` from cranelift-codegenThis commit gets around to migrating the `cranelift-codegen` crate torequire a reason on lint directives and additionally switch to`#[expect]` where possible.prtest:full* Move x64-only item to x64 backend
show more ...
Cranelift: Add a new backend for emitting Pulley bytecode (#9089)* Cranelift: Add a new backend for emitting Pulley bytecodeThis commit adds two new backends for Cranelift that emits 32- and 64-b
Cranelift: Add a new backend for emitting Pulley bytecode (#9089)* Cranelift: Add a new backend for emitting Pulley bytecodeThis commit adds two new backends for Cranelift that emits 32- and 64-bit Pulleybytecode. The backends are both actually the same, with a common implementationliving in `cranelift/codegen/src/isa/pulley_shared`. Each backend configures anISA flag that determines the pointer size, and lowering inspects this flag'svalue when lowering memory accesses.To avoid multiple ISLE compilation units, and to avoid compiling duplicatecopies of Pulley's generated `MInst`, I couldn't use `MInst` as the `MachInst`implementation directly. Instead, there is an `InstAndKind` type that is anewtype over the generated `MInst` but which also carries a phantom typeparameter that implements the `PulleyTargetKind` trait. There are twoimplementations of this trait, a 32- and 64-bit version. This is necessarybecause there are various static trait methods for the mach backend which wemust implement, and which return the pointer width, but don't have access to any`self`. Therefore, we are forced to monomorphize some amount of code. This typeparameter is fairly infectious, and all the "big" backendtypes (`PulleyBackend<P>`, `PulleyABICallSite<P>`, etc...) are parameterizedover it. Nonetheless, not everything is parameterized over a `PulleyTargetKind`,and we manage to avoid duplicate `MInst` definitions and lowering code.Note that many methods are still stubbed out with `todo!`s. It is expected thatwe will fill in those implementations as the work on Pulley progresses.* Trust the `pulley-interpreter` crate, as it is part of our workspace* fix some clippy warnings* Fix a dead-code warning from inside generated code* Use a helper for emitting br_if+comparison instructions* Add a helper for converting `Reg` to `pulley_interpreter::XReg`* Add version to pulley workspace dependency* search the pulley directory for crates in the publish script