[Mono-list] Mono on Xeon Phi

Rodrigo Kumpera kumpera at gmail.com
Wed Feb 6 16:53:13 UTC 2013


Well, you're porting to a new archtecture, it's expected that you'll need
to fix the whole codebase to handle it.

Given the xeon-phi is not a proper x86 derivative, the porting won't be
trivial.

Good luck


On Wed, Feb 6, 2013 at 7:25 AM, Yury Serdyuk <Yury at serdyuk.botik.ru> wrote:

> **
> Rodrigo Kumpera wrote:
>
> Mono is not usually build with icc, so it might be the case that it
> doesn't support some gcc flags. Just hack your way by removing them from
> configure.in for now.
>
> I've tried to compile the problematic module without any flags at all.
> The result is the following:
>
> 2 utils]# icc -I. -I../..  -I../.. -I../../mono -I../../libgc/include
> -I../../eglib/src -I../../eglib/src -mmic -o hazard-pointer.lo
> hazard-pointer.c
> /tmp/icciSatYwas_.s: Assembler messages:
> /tmp/icciSatYwas_.s:139: Error: `sfence' is not supported on `k1om'
> /tmp/icciSatYwas_.s:517: Error: `sfence' is not supported on `k1om'
>
> The assembler output points out the problematic place inside
> hazard-pointer.c:
>
> ..B1.23:                        # Preds ..B1.22 Latency 1
>         movl      %ebx, highest_small_id(%rip)
> #hazard-pointer.c:113.3 c1
> # Begin ASM
>         sfence
> # End ASM
> #hazard-pointer.c:114.3
>
> The corresponding line 114 in hazard-pointer.c is
>
>  112          if (id > highest_small_id) {
>    113                  highest_small_id = id;
>    114                  mono_memory_write_barrier ();
>    115          }
>
> Finally we have
>
> $ cat mono-membar.h
> /*
>  * mono-membar.h: Memory barrier inline functions
>  *
>  * Author:
>  *      Mark Probst (mark.probst at gmail.com)
>  *
>  * (C) 2007 Novell, Inc
>  */
>
> #ifndef _MONO_UTILS_MONO_MEMBAR_H_
> #define _MONO_UTILS_MONO_MEMBAR_H_
>
>                              .   .    .
>
> static inline void mono_memory_write_barrier (void)
> {
>         __asm__ __volatile__ ("sfence" : : : "memory");
> }
>
> Yury
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130206/b3dac146/attachment.html>


More information about the Mono-list mailing list