projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #651 from JoostK/patch-1
[mono.git]
/
mono
/
mini
/
basic-calls.cs
diff --git
a/mono/mini/basic-calls.cs
b/mono/mini/basic-calls.cs
index 01be6a523f803d26b1fa238fb2f9625fb58964bc..d6bd503a954367d02848eb1a58c9430118550352 100644
(file)
--- a/
mono/mini/basic-calls.cs
+++ b/
mono/mini/basic-calls.cs
@@
-23,22
+23,10
@@
using System.Reflection;
* the IL code looks.
*/
* the IL code looks.
*/
-struct Alpha {
- public long a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
-}
-
-struct Beta {
- public Alpha a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
-}
-
-struct Gamma {
- public Beta a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
-}
-
class Tests {
class Tests {
-
static int Main (
) {
- return TestDriver.RunTests (typeof (Tests));
+
public static int Main (string[] args
) {
+ return TestDriver.RunTests (typeof (Tests)
, args
);
}
static void dummy () {
}
static void dummy () {
@@
-288,56
+276,38
@@
class Tests {
return 0;
}
return 0;
}
- static void doit (double value, out long m) {
- m = (long) value;
+ public static void use_long_arg (ulong l) {
+ for (int i = 0; i < 10; ++i)
+ l ++;
}
}
- public static int test_0_ftol_clobber () {
- long m;
- doit (1.3, out m);
- if (m != 1)
- return 2;
- return 0;
- }
+ public static ulong return_long_arg (object o, ulong perm) {
+ use_long_arg (perm);
- static void InitMe (out Gamma noMercyWithTheStack) {
- noMercyWithTheStack = new Gamma ();
- }
+ perm = 0x8000000000000FFF;
- static int FunNoInline () {
- int x = 99;
- if (x > 344 && x < 22)
- return 333;
- return x;
- }
+ use_long_arg (perm);
- static float DoNothingButDontInline (float a, int b) {
- if (b > 0)
- return a;
- else if (b < 0 && b > 10)
- return 444.0f;
- return a;
+ return perm;
}
}
- /*
- * The local register allocator emits loadr8_membase and storer8_membase
- * to do spilling. This code is generated after mono_arch_lowering_pass so
- * mono_arch_output_basic_block must know how to deal with big offsets.
- * This only happens because the call in middle forces the temp for "(float)obj"
- * to be spilled.
- */
- public static int test_0_float_load_and_store_with_big_offset ()
- {
- object obj = 1.0f;
- Gamma noMercyWithTheStack;
- float res;
+ public static int test_0_sparc_long_ret_regress_541577 () {
+ ulong perm = 0x8000000000000FFF;
-
InitMe (out noMercyWithTheStack
);
+
ulong work = return_long_arg (null, perm
);
- res = DoNothingButDontInline ((float)obj, FunNoInline ());
+ return work == perm ? 0 : 1;
+ }
- if (!(res == 1.0f))
- return 1;
+ static void doit (double value, out long m) {
+ m = (long) value;
+ }
+
+ public static int test_0_ftol_clobber () {
+ long m;
+ doit (1.3, out m);
+ if (m != 1)
+ return 2;
return 0;
}
}
return 0;
}
}