[LLVMdev] Backend to start with

Evan Cheng evan.cheng at apple.com
Fri Feb 9 00:07:57 PST 2007


On Feb 5, 2007, at 12:35 PM, Seung Jae Lee wrote:
>
>
> If I emit this to SPARC assembly mnemonics through LLVM, it is  
> shown as follows (as you know):
>
>    .text
>    	.align	16
>    	.globl	sum
>    	.type	sum, #function
>    sum:
>    	save -96, %o6, %o6
>    	!IMPLICIT_DEF %i0
>    	restore %g0, %g0, %g0
>    	retl
>    	nop
>
> But, I'd like to emit the source code to the assembly like this:
>
>    Enter sum;  i,j, _mem_sync:1
>    reg k
>    add i,j;k
>    Exit sum;  0, _mem_sync:1
>
> (FYI, "reg" implies "k" will be used in the following instructions.  
> _mem_sync is FIFO for access to a memory.)
>
> Can you recommend any step by step procedure for me so that I can  
> accomplish this if I modify SPARC code? I am begging you easy words  
> because I am not familiar with terminologies related to compiliation.

Are you looking to add a new target that is similar to SPARC? Or are  
you looking to extend the current SPARC backend to output alternative  
assembly format? If it is the later, you would want to look at the  
X86 backend.

Evan

> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list