[Mono-bugs] [Bug 70637][Nor] Changed - ssapre creates invalid IL on amd64

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 17 Dec 2004 17:05:43 -0500 (EST)

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 massi@ximian.com.


--- shadow/70637	2004-12-17 13:13:13.000000000 -0500
+++ shadow/70637.tmp.8620	2004-12-17 17:05:43.000000000 -0500
@@ -1,14 +1,14 @@
 Bug#: 70637
 Product: Mono: Runtime
 Version: 1.0
+OS: unknown
 OS Details: 
-Status: NEW   
+Status: ASSIGNED   
+Severity: Unknown
 Priority: Normal
 Component: JIT
 AssignedTo: massi@ximian.com                            
 ReportedBy: vargaz@gmail.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -32,6 +32,40 @@
 hope it helps.
 ------- Additional Comments From vargaz@gmail.com  2004-12-17 13:13 -------
 Created an attachment (id=13541)
 output of -v -v -v -v
+------- Additional Comments From massi@ximian.com  2004-12-17 17:05 -------
+Yes, this is a problem.
+SSAPRE relies on the fact that an inst has a stack type which is one
+of STACK_I4, STACK_I8 or STACK_R8 to decide that it is an expression",
+and it later uses an helper function to get the MonoType from the
+stack type to decide the type of the temporary.
+Inside "analyze_expression" in "ssapre.c" there's a big switch where
+several opcodes are forced to be ignored (the case with the has the
+"result->opcode = 0" statement).
+All the platform independent "OUTARG" opcodes are there, probably also
+OP_SPARC_OUTARG_DOUBLE_REG for Sparc should be added to the switch.
+This evening I don't have time to produce a proper patch (my tree is
+too different from svn in that file), I'll do it on Monday (or maybe
+on the weekend...).
+However, even if I do it, I cannot test it (no hardware), so, Zoltan,
+would you please try it out yourself if you have time?
+Just locate "analyze_expression" in "ssapre.c" and add those opcodes
+to the switch, and report what happens...
+By the way, my bad!
+The proper fix is simply to avoid processing the "tree roots" in the
+list of MonoInst trees (being roots they cannot have an "output
+I'll code this and commit the fix in Monday.