|
From: Stepan D. <stp...@na...> - 2013-06-27 18:01:28
|
Good ) Currently I'm working on multi-byte constraints. Once it would be
done, hope we can compile avr-libc.
-Stepan.
Borja Ferrer wrote:
> 1) I think this now resolved.
> 2) I will take a look, no idea about it now.
>
>
> 2013/6/27 Stepan Dyatkovskiy <stp...@na... <mailto:stp...@na...>>
>
> BTW, for X86 target and memory constraint I got the same as for ARM:
>
> call void asm "instr $0", "=*m,~{dirflag},~{fpsr},~{__flags}"(i32*
> @a) #1, !srcloc !0
>
> It just uses 'm' instead of 'Q'. Note it also contains '*' before 'm'.
>
> -Stepan.
>
>
> Stepan Dyatkovskiy wrote:
>
> Agh!! MY grammar: Subject: One more differencE in clang. Would
> you fix
> it in your reply please.
> Thanks.
> -Stepan.
>
> Stepan Dyatkovskiy wrote:
>
> Hi guys.
>
> Today I went through whole AVR-Libc Inline Assembler
> Cookbook chapter.
> I have checked all examples with two commands:
> 1. clang -S -o - -emit-llvm example.c
> 2. avr-clang -S -o - -emit-llvm example.c
>
> I've found two difference:
>
> 1. As I mentioned before difference for memory constraint.
> For string "asm("instr %0": "=Q"(a):)"
>
> clang emits:
> %0 = call i32 asm "instr $0",
> "=Q,~{dirflag},~{fpsr},~{__flags}"()
>
> arm-linux-gnueabi emits:
> call void asm "instr $0", "=*Q"(i32* @a) #1, !srcloc !0
>
> avr-clang:
> %0 = call i16 asm "instr $0", "=Q"()
>
> I'll try to use current syntax here. Though ARM syntax is
> working well
> now, but I din't find explanation of =*Q sequence yet.
>
> 2. asm names.
>
> // example.c:
> extern long Calc(void) asm ("CALCULATE");
> void f() { Calc(); }
>
> clang emits:
> %call = call i64 @CALCULATE()
> ...
> declare i64 @CALCULATE()
>
> avr-clang emits:
> %call = call i32 @"\01CALCULATE"()
> ...
> declare i32 @"\01CALCULATE"()
>
> Does somebody know what \01 is used for here?
>
> -Stepan
>
> ------------------------------__------------------------------__------------------
>
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-__dev2dev
> <http://p.sf.net/sfu/windows-dev2dev>
> _________________________________________________
> avr-llvm-devel mailing list
> avr-llvm-devel@lists.__sourceforge.net
> <mailto:avr...@li...>
> https://lists.sourceforge.net/__lists/listinfo/avr-llvm-devel <https://lists.sourceforge.net/lists/listinfo/avr-llvm-devel>
>
>
>
>
|