make fehler39 work with gcc at least
authorMatthias Braun <matze@braunis.de>
Wed, 11 Jul 2007 07:27:23 +0000 (07:27 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 11 Jul 2007 07:27:23 +0000 (07:27 +0000)
[r15018]

ir/be/test/fehler39.c

index a6fea79..ee96d98 100644 (file)
@@ -1,19 +1,34 @@
-typedef   signed short  INT16;
-typedef   signed int    INT32;
+/* register allocator fails to resolve IMul Constraints correctly */
 
 
+#ifdef __GNUC__
+#define NO_INLINE __attribute__((noinline))
+#else
+#define NO_INLINE __declspec(noinline)
+#endif
+
+int LightSpriteCreate()
+{
+       return 42;
+}
+
+void LightSpritePosition(int x, int y, int z)
+{
+       (void) x;
+       (void) y;
+       (void) z;
+}
 
 typedef struct
 {
 
 typedef struct
 {
-       INT16 sX;
-       INT16 sY;
-       INT32 iLightID;
+       short sX;
+       short sY;
+       int iLightID;
 } EXPLOSIONTYPE;
 
 } EXPLOSIONTYPE;
 
-
 static void GenerateExplosionFromExplosionPointer(EXPLOSIONTYPE* pExplosion)
 {
 static void GenerateExplosionFromExplosionPointer(EXPLOSIONTYPE* pExplosion)
 {
-       INT16 sX = pExplosion->sX;
-       INT16 sY = pExplosion->sY;
+       short sX = pExplosion->sX;
+       short sY = pExplosion->sY;
 
        if (pExplosion->iLightID = LightSpriteCreate())
        {
 
        if (pExplosion->iLightID = LightSpriteCreate())
        {