[llvm] [M68k] Add remaining addressing modes for Atomic operations (PR #115523)

John Paul Adrian Glaubitz via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 9 04:07:21 PST 2024


glaubitz wrote:

@knickish Can you tell me what changes are necessary for Rust to generate EM_68K binaries?

I tried your patch on top of the `object` crate plus the following change:

```
diff --git a/compiler/rustc_codegen_ssa/src/back/metadata.rs b/compiler/rustc_codegen_ssa/src/back/metadata.rs
index 3f3cb8b4073..c50a5eb5d64 100644
--- a/compiler/rustc_codegen_ssa/src/back/metadata.rs
+++ b/compiler/rustc_codegen_ssa/src/back/metadata.rs
@@ -197,6 +197,7 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
         ),
         "x86" => (Architecture::I386, None),
         "s390x" => (Architecture::S390x, None),
+        "m68k" => (Architecture::M68k, None),
         "mips" | "mips32r6" => (Architecture::Mips, None),
         "mips64" | "mips64r6" => (Architecture::Mips64, None),
         "x86_64" => (
```

but Rust still uses the generic ELF target for m68k.

https://github.com/llvm/llvm-project/pull/115523


More information about the llvm-commits mailing list