diff test/float.c @ 479:51c1b795b4f3

fix broken $gp in jal in code segement
author kono
date Sat, 26 Nov 2005 09:50:55 +0900
parents f8ba383dbc39
children a379da780856
line wrap: on
line diff
--- a/test/float.c	Thu Nov 10 18:51:17 2005 +0900
+++ b/test/float.c	Sat Nov 26 09:50:55 2005 +0900
@@ -6,6 +6,7 @@
 extern double sin(double);
 // extern float fsin(float);
 double test9(double f,int i);
+int test7();
 
 float f = 0.3;
 double d = 0.3;
@@ -95,6 +96,7 @@
     test3(1,2,3,10,11,4);
     test4(1,2,3,10,11,4);
     test5(1,2,3,10,11,4);
+    test7();
 
    g = 1.0;
    g = -g;
@@ -388,4 +390,57 @@
     return h/3-(3.0-(g+3)*test9(f*0.5,i-1)/(h-1));
 }
 
+struct huga0 {
+    char c;
+    short s;
+    int i;
+    long l;
+    float f;
+};
+struct huga {
+    char c;
+    short s;
+    int i;
+    long l;
+    float f;
+    struct huga0 hh;
+};
 
+
+struct enemy{
+    int charno;                 // image number
+    float x;                    // x location
+    float y;                    // y location
+    int ap;                     // armor point
+};
+
+void
+print_param(struct enemy *e)
+{
+    printf("charno:%d   x,y:%f,%f   hp:%d\n",
+           e->charno,e->x,e->y,e->ap);
+}
+
+
+int test7()
+{
+    struct huga h;
+    struct enemy e;
+
+    h.c = 10;
+    h.s = 20;
+    h.i = 30;
+    h.l = 40;
+    h.f = 50;
+    h.hh.c = 10;
+    h.hh.s = 20;
+    h.hh.i = 30;
+    h.hh.l = 40;
+    h.hh.f = 50;
+
+
+    e.charno=5; e.x=50.0; e.y=30.0; e.ap=100;
+    print_param(&e);
+    return (0);
+}
+