jhuber6 wrote: > @jhuber6 , something I care about for LLDB is being able to use different > disassemblers for ptx and sass. The unique situation here is that sass is not > part of LLVM code generation, and it seems that's why LLVM is unaware of > sass. LLVM can only generate ptx and folks rely on an nvidia proprietary > compiler to go from ptx to sass. But at runtime, LLDB sees both sass and > nvptx. > > I guess that a simpler patch that would exist only within LLDB is to add two > flavors to the nvptx architecture, one for nvptx and for sass in the ArchSpec > class in LLDB. I for sure can do that without doing major architectural > changes like this.
LLVM's backend can only emit PTX, but as a toolchain we simply export that handling to `ptxas` as our assembler. The toolchain handles the binaries as the `nvptx64` triple because they correspond to ELF files created with `--target=nvptx64-nvidia-cuda`. You can generate SASS yourself with something similar to https://godbolt.org/z/ofWE6baPT. This is as far as I understand it at least, because as far as I'm aware, if a file has ELF magic and the `EM_CUDA` machine, it is SASS. https://github.com/llvm/llvm-project/pull/159459 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
