gpt4 book ai didi

haskell - LLVM 对 GHC 的调用约定

转载 作者:行者123 更新时间:2023-12-04 11:43:40 24 4
gpt4 key购买 nike

这是LLVM's doc "langref"中的文字:

"cc 10" - GHC convention

This calling convention has been implemented specifically for use by the Glasgow Haskell Compiler (GHC). It passes everything in registers, going to extremes to achieve this by disabling callee save registers. This calling convention should not be used lightly but only for specific situations such as an alternative to the register pinning performance technique often used when implementing functional programming languages.At the moment only X86 supports this convention and it has the following limitations:

  • On X86-32 only supports up to 4 bit type parameters. No floating point types are supported.
  • On X86-64 only supports up to 10 bit type parameters and 6 floating point parameters.


问:
  • “寄存器固定”是否意味着或指“通过寄存器中的所有内容”,可能。
  • 什么是“4 位类型参数”?我刚刚搜索了英特尔的 IA 手册,但没有找到任何东西。它是英特尔 CPU 的功能吗?
  • 最佳答案

  • “寄存器固定”似乎是指将特定的东西分配给特定的硬件寄存器;见"Register Pinning" section of these GHC LLVM back-end noteslinked discussion .
  • Dirk 是对的——你可以在 LLVM tblgen code which defines these conventions 中清楚地看到它。 (寻找 CC_X86_64_GHCCC_X86_32_GHC )。
  • 关于haskell - LLVM 对 GHC 的调用约定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6394937/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com