[llvm-commits] [llvm] r156593 - in /llvm/trunk: docs/LangRef.html include/llvm/CodeGen/ISDOpcodes.h include/llvm/Intrinsics.td include/llvm/Target/TargetSelectionDAG.td lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp lib/Target/X86/X86InstrSystem.td test/CodeGen/X86/trap.ll

Nick Lewycky nicholas at mxc.ca
Thu May 10 22:26:48 PDT 2012


Dan Gohman wrote:
> Author: djg
> Date: Thu May 10 19:19:32 2012
> New Revision: 156593
>
> URL: http://llvm.org/viewvc/llvm-project?rev=156593&view=rev
> Log:
> Define a new intrinsic, @llvm.debugger. It will be similar to __builtin_trap(),
> but it generates int3 on x86 instead of ud2.
>
> Modified:
>      llvm/trunk/docs/LangRef.html
>      llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h
>      llvm/trunk/include/llvm/Intrinsics.td
>      llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
>      llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
>      llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
>      llvm/trunk/lib/Target/X86/X86InstrSystem.td
>      llvm/trunk/test/CodeGen/X86/trap.ll
>
> Modified: llvm/trunk/docs/LangRef.html
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=156593&r1=156592&r2=156593&view=diff
> ==============================================================================
> --- llvm/trunk/docs/LangRef.html (original)
> +++ llvm/trunk/docs/LangRef.html Thu May 10 19:19:32 2012
> @@ -307,6 +307,8 @@
>               '<tt>llvm.annotation.*</tt>' Intrinsic</a></li>
>             <li><a href="#int_trap">
>               '<tt>llvm.trap</tt>' Intrinsic</a></li>
> +<li><a href="#int_debugger">
> +            '<tt>llvm.debugger</tt>' Intrinsic</a></li>
>             <li><a href="#int_stackprotector">
>               '<tt>llvm.stackprotector</tt>' Intrinsic</a></li>
>   	<li><a href="#int_objectsize">
> @@ -8400,6 +8402,30 @@
>
>   <!-- _______________________________________________________________________ -->
>   <h4>
> +<a name="int_debugger">'<tt>llvm.debugger</tt>' Intrinsic</a>
> +</h4>
> +
> +<div>
> +
> +<h5>Syntax:</h5>
> +<pre>
> +  declare void @llvm.debugger()
> +</pre>
> +
> +<h5>Overview:</h5>
> +<p>The '<tt>llvm.debugger</tt>' intrinsic.</p>
> +
> +<h5>Arguments:</h5>
> +<p>None.</p>
> +
> +<h5>Semantics:</h5>
> +<p>This intrinsic is lowered to code which is intended to cause an execution
> +   trap with the intention of requesting the attention of a debugger.</p>

... but no other effect? Is that how it's different from @llvm.trap, 
that if there is no debugger, the program continue running normally?

> +
> +</div>
> +
> +<!-- _______________________________________________________________________ -->
> +<h4>
>     <a name="int_stackprotector">'<tt>llvm.stackprotector</tt>' Intrinsic</a>
>   </h4>
>
>
> Modified: llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h?rev=156593&r1=156592&r2=156593&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h Thu May 10 19:19:32 2012
> @@ -582,6 +582,9 @@
>       // TRAP - Trapping instruction
>       TRAP,
>
> +    // DEBUGGER - Trap intented to get the attention of a debugger.

Typo "intented"

Nick



More information about the llvm-commits mailing list