Skip to content

Commit

Permalink
Fix big endian issue with cardtable and add code for mono_arch_contex…
Browse files Browse the repository at this point in the history
…t_get_int_reg
  • Loading branch information
nealef committed Mar 30, 2011
1 parent b98e93c commit 968a96e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mono/metadata/sgen-cardtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ find_card_offset (mword card)
#elif defined(__x86_64__) && defined(__GNUC__)
return (__builtin_ffsll (card) - 1) / 8;
#elif defined(__s390x__)
return (__builtin_ffsll (card) - 1) / 8;
return (__builtin_ffsll (GUINT64_TO_LE(card)) - 1) / 8;
#else
// FIXME:
g_assert_not_reached ();
Expand Down
6 changes: 2 additions & 4 deletions mono/mini/mini-s390x.c
Original file line number Diff line number Diff line change
Expand Up @@ -5689,16 +5689,14 @@ mono_arch_get_patch_offset (guint8 *code)
/* */
/* Function - */
/* */
/* Returns - Offset for patch. */
/* Returns - Return a register from the context. */
/* */
/*------------------------------------------------------------------*/

mgreg_t
mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
{
/* FIXME: implement */
g_assert_not_reached ();
return NULL;
return ((mgreg_t) ctx->uc_mcontext.gregs[reg]);
}

/*========================= End of Function ========================*/
Expand Down

0 comments on commit 968a96e

Please sign in to comment.