Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -6034,12 +6034,12 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
/* TODO: metadata-update: implement me. If it's an added field, emit a call to the helper method instead of MINT_LDFLDA_UNSAFE */
g_assert (!m_field_is_from_update (field));
int foffset = m_class_is_valuetype (klass) ? m_field_get_offset (field) - MONO_ABI_SIZEOF (MonoObject) : m_field_get_offset (field);
if (td->sp->type == STACK_TYPE_O) {
Comment thread
jandupej marked this conversation as resolved.
if (td->sp->type == STACK_TYPE_O || td->sp->type == STACK_TYPE_I) {
interp_add_ins (td, MINT_LDFLDA);
td->last_ins->data [0] = GINT_TO_UINT16 (foffset);
} else {
int sp_type = td->sp->type;
g_assert (sp_type == STACK_TYPE_MP || sp_type == STACK_TYPE_I);
g_assert (sp_type == STACK_TYPE_MP);
if (foffset) {
interp_add_ins (td, MINT_LDFLDA_UNSAFE);
td->last_ins->data [0] = GINT_TO_UINT16 (foffset);
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -10007,7 +10007,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
}

if (il_op == MONO_CEE_LDFLDA) {
if (sp [0]->type == STACK_OBJ) {
if (sp [0]->type == STACK_OBJ || sp [0]->type == STACK_PTR) {
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, sp [0]->dreg, 0);
MONO_EMIT_NEW_COND_EXC (cfg, EQ, "NullReferenceException");
}
Expand Down
3 changes: 0 additions & 3 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1478,9 +1478,6 @@
<ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/GitHub_15291/GitHub_15291/**">
<Issue>Doesn't pass after LLVM AOT compilation.</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/Runtime_77640/Runtime_77640/**">
<Issue>https://github.com/dotnet/runtime/issues/77647</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16928/b16928/**">
<Issue>Doesn't pass after LLVM AOT compilation.</Issue>
</ExcludeList>
Expand Down