[Mono-bugs] [Bug 58343][Nor] Changed - AOT failure for classpath.dll from ikvm
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 23 May 2004 14:17:30 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by totte@hiddenpeaks.com.
http://bugzilla.ximian.com/show_bug.cgi?id=58343
--- shadow/58343 2004-05-23 11:42:48.000000000 -0400
+++ shadow/58343.tmp.24755 2004-05-23 14:17:30.000000000 -0400
@@ -10,13 +10,12 @@
Component: misc
AssignedTo: massi@ximian.com
ReportedBy: vargaz@freemail.hu
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
-Cc:
Summary: AOT failure for classpath.dll from ikvm
When running
mono -O=-all --aot classpath.dll
@@ -160,6 +159,37 @@
The problem looks like it's due to that a imm8 branch (imm eb) is now
out of range (disp 151 and max is -127 to +127 ) probably due to some
loop optimizations.
+
+------- Additional Comments From totte@hiddenpeaks.com 2004-05-23 14:17 -------
+Found the problem,
+
+When loop optimization (that doesn't do any real optimization it
+self) is enabled the mono_arch_output_basic_block for x86 does
+padding for loop blocks (could help performance, padding is 8 byte)
+but for this method it breaks the local branches (because it padds a
+lot of loop blocks).
+
+To fix the problem we can disable the padding, going to test how it
+affects performance tomorrow. The code is on line 2105 in mini-x86.c :
+
+ if (cfg->opt & MONO_OPT_LOOP) {
+ int pad, align = 8;
+ /* set alignment depending on cpu */
+ if (bb->nesting && (bb->in_count == 1) && (pad = (cfg-
+>code_len & (align - 1)))) {
+ pad = align - pad;
+ /*g_print ("adding %d pad at %x to loop in %
+s\n", pad, cfg->code_len, cfg->method->name);*/
+ x86_padding (code, pad);
+ cfg->code_len += pad;
+ bb->native_offset = cfg->code_len;
+ }
+ }
+
+If we going to pad we need to insert this code in a earlier phase.
+
+Lupus, comments about performance? maybee better that we work for -
+O=all then having the correct padding?