* src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
[fw/sdcc] / device / lib / _mullong.c
index 58ee9915ca51207c2c9d58097281e0744632b3bc..1a37ce255c5e68d83237cb5185c9b09f59299714 100644 (file)
@@ -496,12 +496,24 @@ struct some_struct {
        short a ;
        char b;
        long c ;};
+#if defined(SDCC_hc08)
+/* big endian order */
+union bil {
+        struct {unsigned char b3,b2,b1,b0 ;} b;
+        struct {unsigned short hi,lo ;} i;
+        unsigned long l;
+        struct { unsigned char b3; unsigned short i12; unsigned char b0;} bi;
+} ;
+#else
+/* little endian order */
 union bil {
         struct {unsigned char b0,b1,b2,b3 ;} b;
         struct {unsigned short lo,hi ;} i;
         unsigned long l;
         struct { unsigned char b0; unsigned short i12; unsigned char b3;} bi;
 } ;
+#endif
+
 #if defined(SDCC_USE_XSTACK)
 #  define bcast(x) ((union bil pdata *)&(x))
 #elif (defined(SDCC_MODEL_LARGE) || defined (SDCC_ds390) || defined (SDCC_ds400)) && !defined(SDCC_STACK_AUTO)