<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 9/12/2018 6:36 AM, ÉòÌìºÀ via llvm-dev
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:72d82c65.f299.165cdff9bd5.Coremail.17862703959@163.com">
      <meta http-equiv="content-type" content="text/html; charset=gbk">
      <div
        style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
        <div>Hello£¬everyone.</div>
        <div><span id="result_box" class="short_text" tabindex="-1"
            lang="en"><span class="">I am very embarrassed to ask such a
              simple question.</span></span></div>
        <div>I want to add an intrinsics(named max_qb) in x86 backend.</div>
        <div>In include/llvm/IR/IntrinsicsX86.td, I add a intrinsics
          (GCCBuiltin)<code class="language-cpp hljs">.</code></div>
        <div>In clang( BuiltinsX86.def ), I add a <code class="hljs
            java">BUILTIN.</code></div>
        <div>And in x86 backend , I change :<br>
        </div>
        <div>the X86InstrInfo.td to add def X86max_qb_flag , <br>
        </div>
        <div>X86InstrArithmetic.td to add define of instruction ,</div>
        <div>X86ISelLowering.cpp to add SDnode.</div>
        <div>It's succeed when <span id="result_box" class="short_text"
            tabindex="-1" lang="en"><span class="">LLVM compilates.But
              there is an error ¡°use of unknown builtin
              '__builtin_x86_max_qb' ¡±£¬when I test the</span></span><span
            id="result_box" class="short_text" tabindex="-1" lang="en"><span
              class=""> intrinsics.</span></span></div>
      </div>
    </blockquote>
    <br>
    All clang builtins are required to have a C language signature
    defined in clang; for x86, look in
    include/clang/Basic/BuiltinsX86.def .<br>
    <br>
    -Eli
    <pre class="moz-signature" cols="72">-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
  </body>
</html>