原生目标数据

发布于 2025-01-08 10:23:20 字数 78 浏览 3 评论 0原文

在 llvm 的 doxygen 参考手册中,您可以从模块对象或执行引擎创建目标数据实例。

如何获取当前/原生平台的目标数据?

In the doxygen reference manual for llvm you can create a target data instance from a Module object or execution engine.

How do I get the target data for the current/native platform?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拥有 2025-01-15 10:23:20

嗯...通常要添加到 TargetData 的信息可以从平台 ABI 文档中提取。这是指定所有自然尺寸、对齐方式等的地方。有时,如果您有适合您平台的编译器,您可以尝试将所有条目与您的编译器相匹配。

我相信在后一种情况下,可以编写一些二进制文件来为您生成 TargetData 信息,但在 iirc 之前没有人这样做过。

Well... usually the information to be added to TargetData can be extracted from the platform ABI document. This is where all natural sizes, alignments, etc. are specified. Sometimes if you have a compiler for your platform you can try to match all entries with your compiler.

I believe in the latter case it is possible to write some binary which will generate the TargetData info for you but noone did this before iirc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文