[Mono-dev] SIZEOF_VOID_P in the JIT

Zoltan Varga vargaz at gmail.com
Thu Dec 11 09:59:17 EST 2008


Hi,

  Looks ok.

      Zoltan

On Thu, Dec 11, 2008 at 3:29 PM, Mark Mason <mmason at upwardaccess.com> wrote:
> Hello,
>
>
> On Thu, 2008-12-11 at 14:42 +0100, Zoltan Varga wrote:
>> Hi,
>>
>>   The approach looks fine.
>>
>>             Zoltan
>
> Thank you Zoltan.
>
> Here's the patch to mono/configure.in that I came up with to introduce
> SIZEOF_REGISTER. There's no 'portable' test for the size of a machine
> register, so I simply check for mips/n32 directly. If you could look it
> over, I'd appreciate it.
>
> Thanks,
> Mark
>
> Index: configure.in
> ===================================================================
> --- configure.in        (revision 120925)
> +++ configure.in        (working copy)
> @@ -1748,6 +1748,8 @@
>  SQLITE3="libsqlite3.so.0"
>  X11="libX11.so"
>
> +sizeof_register="SIZEOF_VOID_P"
> +
>  jit_wanted=false
>  interp_wanted=false
>  case "$host" in
> @@ -1761,6 +1763,20 @@
>                ACCESS_UNALIGNED="no"
>                JIT_SUPPORTED=yes
>                jit_wanted=true
> +
> +               AC_MSG_CHECKING(for mips n32)
> +               AC_TRY_COMPILE([], [
> +               void main () {
> +               #if _MIPS_SIM != _ABIN32
> +               #error Not mips n32
> +               #endif
> +               }
> +               ],[
> +               AC_MSG_RESULT(yes)
> +               sizeof_register=8
> +               ],[
> +               AC_MSG_RESULT(no)
> +               ])
>                ;;
>        i*86-*-*)
>                TARGET=X86;
> @@ -1916,6 +1932,14 @@
>                ;;
>  esac
>
> +if test "x$sizeof_register" = "x4"; then
> +   AC_DEFINE(SIZEOF_REGISTER,4,[size of machine integer registers])
> +elif test "x$sizeof_register" = "x8"; then
> +   AC_DEFINE(SIZEOF_REGISTER,8,[size of machine integer registers])
> +else
> +   AC_DEFINE(SIZEOF_REGISTER,SIZEOF_VOID_P,[size of machine integer
> registers])
> +fi
> +
>  if test "x$have_visibility_hidden" = "xyes"; then
>    AC_DEFINE(HAVE_VISIBILITY_HIDDEN, 1, [Support for the visibility
> ("hidden") attribute])
>  fi
>
>
>


More information about the Mono-devel-list mailing list