diff options
Diffstat (limited to 'test/monniaux/regalloc')
-rw-r--r-- | test/monniaux/regalloc/bigspill.c | 21 | ||||
-rw-r--r-- | test/monniaux/regalloc/invalid_register_allocation.c | 12 | ||||
-rw-r--r-- | test/monniaux/regalloc/invalid_register_allocation2.c | 7 | ||||
-rw-r--r-- | test/monniaux/regalloc/spill_queue_issues.c | 5 |
4 files changed, 45 insertions, 0 deletions
diff --git a/test/monniaux/regalloc/bigspill.c b/test/monniaux/regalloc/bigspill.c new file mode 100644 index 00000000..6191e018 --- /dev/null +++ b/test/monniaux/regalloc/bigspill.c @@ -0,0 +1,21 @@ +extern void callee(void); + +void bigspill(int *t) { + int t0 = t[0]; + int t1 = t[1]; + int t2 = t[2]; + int t3 = t[3]; + int t4 = t[4]; + int t5 = t[5]; + int t6 = t[6]; + int t7 = t[7]; + callee(); + t[0] = t0; + t[1] = t1; + t[2] = t2; + t[3] = t3; + t[4] = t4; + t[5] = t5; + t[6] = t6; + t[7] = t7; +} diff --git a/test/monniaux/regalloc/invalid_register_allocation.c b/test/monniaux/regalloc/invalid_register_allocation.c new file mode 100644 index 00000000..93da30eb --- /dev/null +++ b/test/monniaux/regalloc/invalid_register_allocation.c @@ -0,0 +1,12 @@ +/* simplified version of c-strtod.i */ + +extern double getdouble(void); +extern void intptr(void); + +double bidule (void) +{ + double r; + r = getdouble(); + intptr(); + return r; +} diff --git a/test/monniaux/regalloc/invalid_register_allocation2.c b/test/monniaux/regalloc/invalid_register_allocation2.c new file mode 100644 index 00000000..88a8e184 --- /dev/null +++ b/test/monniaux/regalloc/invalid_register_allocation2.c @@ -0,0 +1,7 @@ +extern void toto(int, double); + +void +report (int x) +{ + toto (1, x/ 10.0); +} diff --git a/test/monniaux/regalloc/spill_queue_issues.c b/test/monniaux/regalloc/spill_queue_issues.c new file mode 100644 index 00000000..8e2019a8 --- /dev/null +++ b/test/monniaux/regalloc/spill_queue_issues.c @@ -0,0 +1,5 @@ +int g(double); + ; +void meow (int x) { + g(100.0 * x); +} |