Blame SOURCES/debian-big_endian.patch

44a778
diff --git a/source/compiler/aslcodegen.c b/source/compiler/aslcodegen.c
44a778
index 30e7984..89433b9 100644
44a778
--- a/source/compiler/aslcodegen.c
44a778
+++ b/source/compiler/aslcodegen.c
44a778
@@ -243,16 +243,12 @@ CgWriteAmlOpcode (
44a778
     ACPI_PARSE_OBJECT       *Op)
44a778
 {
44a778
     UINT8                   PkgLenFirstByte;
44a778
-    UINT32                  i;
44a778
-    union {
44a778
-        UINT16                  Opcode;
44a778
-        UINT8                   OpcodeBytes[2];
44a778
-    } Aml;
44a778
-    union {
44a778
-        UINT32                  Len;
44a778
-        UINT8                   LenBytes[4];
44a778
-    } PkgLen;
44a778
-
44a778
+    UINT8                   Byte;
44a778
+    UINT16                  Word;
44a778
+    UINT32                  DWord;
44a778
+    UINT64                  QWord;
44a778
+    UINT16                  AmlOpcode;
44a778
+    UINT32                  PkgLen;
44a778
 
44a778
     /* We expect some DEFAULT_ARGs, just ignore them */
44a778
 
44a778
@@ -276,51 +272,52 @@ CgWriteAmlOpcode (
44a778
 
44a778
         /* Special opcodes for within a field definition */
44a778
 
44a778
-        Aml.Opcode = AML_FIELD_OFFSET_OP;
44a778
+        AmlOpcode = AML_FIELD_OFFSET_OP;
44a778
         break;
44a778
 
44a778
     case AML_INT_ACCESSFIELD_OP:
44a778
 
44a778
-        Aml.Opcode = AML_FIELD_ACCESS_OP;
44a778
+        AmlOpcode = AML_FIELD_ACCESS_OP;
44a778
         break;
44a778
 
44a778
     case AML_INT_CONNECTION_OP:
44a778
 
44a778
-        Aml.Opcode = AML_FIELD_CONNECTION_OP;
44a778
+        AmlOpcode = AML_FIELD_CONNECTION_OP;
44a778
         break;
44a778
 
44a778
     default:
44a778
 
44a778
-        Aml.Opcode = Op->Asl.AmlOpcode;
44a778
+        AmlOpcode = Op->Asl.AmlOpcode;
44a778
         break;
44a778
     }
44a778
 
44a778
 
44a778
-    switch (Aml.Opcode)
44a778
+    switch (AmlOpcode)
44a778
     {
44a778
     case AML_PACKAGE_LENGTH:
44a778
 
44a778
         /* Value is the length to be encoded (Used in field definitions) */
44a778
 
44a778
-        PkgLen.Len = (UINT32) Op->Asl.Value.Integer;
44a778
+        PkgLen = (UINT32) Op->Asl.Value.Integer;
44a778
         break;
44a778
 
44a778
     default:
44a778
 
44a778
         /* Check for two-byte opcode */
44a778
 
44a778
-        if (Aml.Opcode > 0x00FF)
44a778
+        if (AmlOpcode > 0x00FF)
44a778
         {
44a778
             /* Write the high byte first */
44a778
-
44a778
-            CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[1], 1);
44a778
+	    Byte = ACPI_HIBYTE(AmlOpcode);
44a778
+	    CgLocalWriteAmlData (Op, &Byte, 1);
44a778
         }
44a778
 
44a778
-        CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[0], 1);
44a778
+	Byte = ACPI_LOBYTE(AmlOpcode);
44a778
+        CgLocalWriteAmlData (Op, &Byte, 1);
44a778
 
44a778
         /* Subtreelength doesn't include length of package length bytes */
44a778
 
44a778
-        PkgLen.Len = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
44a778
+        PkgLen = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
44a778
         break;
44a778
     }
44a778
 
44a778
@@ -331,8 +328,8 @@ CgWriteAmlOpcode (
44a778
         if (Op->Asl.AmlPkgLenBytes == 1)
44a778
         {
44a778
             /* Simplest case -- no bytes to follow, just write the count */
44a778
-
44a778
-            CgLocalWriteAmlData (Op, &PkgLen.LenBytes[0], 1);
44a778
+            Byte = ACPI_LOBYTE(PkgLen);
44a778
+            CgLocalWriteAmlData (Op, &Byte, 1);
44a778
         }
44a778
         else if (Op->Asl.AmlPkgLenBytes != 0)
44a778
         {
44a778
@@ -342,7 +339,7 @@ CgWriteAmlOpcode (
44a778
              */
44a778
             PkgLenFirstByte = (UINT8)
44a778
                 (((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) |
44a778
-                (PkgLen.LenBytes[0] & 0x0F));
44a778
+                (PkgLen & 0x0F));
44a778
 
44a778
             CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1);
44a778
 
44a778
@@ -350,39 +347,47 @@ CgWriteAmlOpcode (
44a778
              * Shift the length over by the 4 bits we just stuffed
44a778
              * in the first byte
44a778
              */
44a778
-            PkgLen.Len >>= 4;
44a778
+            PkgLen >>= 4;
44a778
 
44a778
             /*
44a778
              * Now we can write the remaining bytes -
44a778
              * either 1, 2, or 3 bytes
44a778
              */
44a778
-            for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++)
44a778
+            Byte = ACPI_LOBYTE(PkgLen);
44a778
+            CgLocalWriteAmlData (Op, &Byte, 1);
44a778
+            if (Op->Asl.AmlPkgLenBytes >= 3)
44a778
+            {
44a778
+                Byte = ACPI_HIBYTE(PkgLen);
44a778
+                CgLocalWriteAmlData (Op, &Byte, 1);
44a778
+            }
44a778
+            if (Op->Asl.AmlPkgLenBytes >= 4)
44a778
             {
44a778
-                CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1);
44a778
+                Byte = ACPI_LOBYTE(ACPI_HIWORD(PkgLen));
44a778
+                CgLocalWriteAmlData (Op, &Byte, 1);
44a778
             }
44a778
         }
44a778
     }
44a778
 
44a778
-    switch (Aml.Opcode)
44a778
+    switch (AmlOpcode)
44a778
     {
44a778
     case AML_BYTE_OP:
44a778
-
44a778
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 1);
44a778
+        Byte = (UINT8) Op->Asl.Value.Integer;
44a778
+        CgLocalWriteAmlData (Op, &Byte, 1);
44a778
         break;
44a778
 
44a778
     case AML_WORD_OP:
44a778
-
44a778
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 2);
44a778
+        ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
44a778
+        CgLocalWriteAmlData (Op, &Word, 2);
44a778
        break;
44a778
 
44a778
     case AML_DWORD_OP:
44a778
-
44a778
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 4);
44a778
+        ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
44a778
+        CgLocalWriteAmlData (Op, &DWord, 4);
44a778
         break;
44a778
 
44a778
     case AML_QWORD_OP:
44a778
-
44a778
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 8);
44a778
+        ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
44a778
+        CgLocalWriteAmlData (Op, &QWord, 8);
44a778
         break;
44a778
 
44a778
     case AML_STRING_OP:
44a778
@@ -416,6 +421,7 @@ CgWriteTableHeader (
44a778
     ACPI_PARSE_OBJECT       *Op)
44a778
 {
44a778
     ACPI_PARSE_OBJECT       *Child;
44a778
+    UINT32 DWord;
44a778
 
44a778
 
44a778
     /* AML filename */
44a778
@@ -452,7 +458,7 @@ CgWriteTableHeader (
44a778
     /* OEM Revision */
44a778
 
44a778
     Child = Child->Asl.Next;
44a778
-    TableHeader.OemRevision = (UINT32) Child->Asl.Value.Integer;
44a778
+    ACPI_MOVE_64_TO_32(&TableHeader.OemRevision, &Child->Asl.Value.Integer);
44a778
 
44a778
     /* Compiler ID */
44a778
 
44a778
@@ -460,12 +466,14 @@ CgWriteTableHeader (
44a778
 
44a778
     /* Compiler version */
44a778
 
44a778
-    TableHeader.AslCompilerRevision = ACPI_CA_VERSION;
44a778
+    DWord = ACPI_CA_VERSION;
44a778
+    ACPI_MOVE_32_TO_32(&TableHeader.AslCompilerRevision, &DWord);
44a778
 
44a778
     /* Table length. Checksum zero for now, will rewrite later */
44a778
 
44a778
-    TableHeader.Length = sizeof (ACPI_TABLE_HEADER) +
44a778
+    DWord = sizeof (ACPI_TABLE_HEADER) +
44a778
         Op->Asl.AmlSubtreeLength;
44a778
+    ACPI_MOVE_32_TO_32(&TableHeader.Length, &DWord);
44a778
     TableHeader.Checksum = 0;
44a778
 
44a778
     Op->Asl.FinalAmlOffset = ftell (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
44a778
@@ -578,7 +586,10 @@ CgWriteNode (
44a778
     ACPI_PARSE_OBJECT       *Op)
44a778
 {
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
-
44a778
+    UINT8                   Byte;
44a778
+    UINT16                  Word;
44a778
+    UINT32                  DWord;
44a778
+    UINT64                  QWord;
44a778
 
44a778
     /* Always check for DEFAULT_ARG and other "Noop" nodes */
44a778
     /* TBD: this may not be the best place for this check */
44a778
@@ -601,13 +612,24 @@ CgWriteNode (
44a778
     switch (Op->Asl.AmlOpcode)
44a778
     {
44a778
     case AML_RAW_DATA_BYTE:
44a778
+        Byte = (UINT8) Op->Asl.Value.Integer;
44a778
+        CgLocalWriteAmlData (Op, &Byte, 1);
44a778
+        return;
44a778
+
44a778
     case AML_RAW_DATA_WORD:
44a778
-    case AML_RAW_DATA_DWORD:
44a778
-    case AML_RAW_DATA_QWORD:
44a778
+        ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
44a778
+        CgLocalWriteAmlData (Op, &Word, 2);
44a778
+        return;
44a778
 
44a778
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, Op->Asl.AmlLength);
44a778
+    case AML_RAW_DATA_DWORD:
44a778
+        ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
44a778
+        CgLocalWriteAmlData (Op, &DWord, 4);
44a778
         return;
44a778
 
44a778
+    case AML_RAW_DATA_QWORD:
44a778
+        ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
44a778
+        CgLocalWriteAmlData (Op, &QWord, 8);
44a778
+        return;
44a778
 
44a778
     case AML_RAW_DATA_BUFFER:
44a778
 
44a778
diff --git a/source/compiler/aslopcodes.c b/source/compiler/aslopcodes.c
44a778
index de9ffe1..81f4ad3 100644
44a778
--- a/source/compiler/aslopcodes.c
44a778
+++ b/source/compiler/aslopcodes.c
44a778
@@ -481,6 +481,7 @@ OpcDoUnicode (
44a778
     UINT32                  i;
44a778
     UINT8                   *AsciiString;
44a778
     UINT16                  *UnicodeString;
44a778
+    UINT16                  UChar;
44a778
     ACPI_PARSE_OBJECT       *BufferLengthOp;
44a778
 
44a778
 
44a778
@@ -507,7 +508,8 @@ OpcDoUnicode (
44a778
 
44a778
     for (i = 0; i < Count; i++)
44a778
     {
44a778
-        UnicodeString[i] = (UINT16) AsciiString[i];
44a778
+        UChar = (UINT16) AsciiString[i];
44a778
+        ACPI_MOVE_16_TO_16(&UnicodeString[i], &UChar);
44a778
     }
44a778
 
44a778
     /*
44a778
diff --git a/source/compiler/aslrestype1.c b/source/compiler/aslrestype1.c
44a778
index 4bd9059..e61fa85 100644
44a778
--- a/source/compiler/aslrestype1.c
44a778
+++ b/source/compiler/aslrestype1.c
44a778
@@ -141,6 +141,11 @@ RsDoMemory24Descriptor (
44a778
     ACPI_PARSE_OBJECT       *MaxOp = NULL;
44a778
     ACPI_PARSE_OBJECT       *LengthOp = NULL;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
+    UINT16                  Minimum = 0;
44a778
+    UINT16                  Maximum = 0;
44a778
+    UINT16                  AddressLength = 0;
44a778
+    UINT16                  Alignment = 0;
44a778
+    UINT16                  ResourceLength;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -151,7 +156,8 @@ RsDoMemory24Descriptor (
44a778
 
44a778
     Descriptor = Rnode->Buffer;
44a778
     Descriptor->Memory24.DescriptorType = ACPI_RESOURCE_NAME_MEMORY24;
44a778
-    Descriptor->Memory24.ResourceLength = 9;
44a778
+    ResourceLength = 9;
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.ResourceLength, &ResourceLength);
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
 
44a778
@@ -168,7 +174,7 @@ RsDoMemory24Descriptor (
44a778
 
44a778
         case 1: /* Min Address */
44a778
 
44a778
-            Descriptor->Memory24.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -176,7 +182,7 @@ RsDoMemory24Descriptor (
44a778
 
44a778
         case 2: /* Max Address */
44a778
 
44a778
-            Descriptor->Memory24.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -184,14 +190,14 @@ RsDoMemory24Descriptor (
44a778
 
44a778
         case 3: /* Alignment */
44a778
 
44a778
-            Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment));
44a778
             break;
44a778
 
44a778
         case 4: /* Length */
44a778
 
44a778
-            Descriptor->Memory24.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -214,12 +220,17 @@ RsDoMemory24Descriptor (
44a778
     /* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */
44a778
 
44a778
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24,
44a778
-        Descriptor->Memory24.Minimum,
44a778
-        Descriptor->Memory24.Maximum,
44a778
-        Descriptor->Memory24.AddressLength,
44a778
-        Descriptor->Memory24.Alignment,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Alignment,
44a778
         MinOp, MaxOp, LengthOp, NULL, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Minimum, &Minimum);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Maximum, &Maximum);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Alignment, &Alignment);
44a778
+
44a778
     return (Rnode);
44a778
 }
44a778
 
44a778
@@ -247,6 +258,11 @@ RsDoMemory32Descriptor (
44a778
     ACPI_PARSE_OBJECT       *LengthOp = NULL;
44a778
     ACPI_PARSE_OBJECT       *AlignOp = NULL;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
+    UINT32                  Minimum = 0;
44a778
+    UINT32                  Maximum = 0;
44a778
+    UINT32                  AddressLength = 0;
44a778
+    UINT32                  Alignment = 0;
44a778
+    UINT16                  ResourceLength;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -257,7 +273,8 @@ RsDoMemory32Descriptor (
44a778
 
44a778
     Descriptor = Rnode->Buffer;
44a778
     Descriptor->Memory32.DescriptorType = ACPI_RESOURCE_NAME_MEMORY32;
44a778
-    Descriptor->Memory32.ResourceLength = 17;
44a778
+    ResourceLength = 17;
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory32.ResourceLength, &ResourceLength);
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
 
44a778
@@ -274,7 +291,7 @@ RsDoMemory32Descriptor (
44a778
 
44a778
         case 1:  /* Min Address */
44a778
 
44a778
-            Descriptor->Memory32.Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -282,7 +299,7 @@ RsDoMemory32Descriptor (
44a778
 
44a778
         case 2: /* Max Address */
44a778
 
44a778
-            Descriptor->Memory32.Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -290,7 +307,7 @@ RsDoMemory32Descriptor (
44a778
 
44a778
         case 3: /* Alignment */
44a778
 
44a778
-            Descriptor->Memory32.Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment));
44a778
             AlignOp = InitializerOp;
44a778
@@ -298,7 +315,7 @@ RsDoMemory32Descriptor (
44a778
 
44a778
         case 4: /* Length */
44a778
 
44a778
-            Descriptor->Memory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -321,12 +338,17 @@ RsDoMemory32Descriptor (
44a778
     /* Validate the Min/Max/Len/Align values */
44a778
 
44a778
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32,
44a778
-        Descriptor->Memory32.Minimum,
44a778
-        Descriptor->Memory32.Maximum,
44a778
-        Descriptor->Memory32.AddressLength,
44a778
-        Descriptor->Memory32.Alignment,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Alignment,
44a778
         MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Minimum, &Minimum);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Maximum, &Maximum);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Alignment, &Alignment);
44a778
+
44a778
     return (Rnode);
44a778
 }
44a778
 
44a778
@@ -350,6 +372,7 @@ RsDoMemory32FixedDescriptor (
44a778
     AML_RESOURCE            *Descriptor;
44a778
     ACPI_PARSE_OBJECT       *InitializerOp;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
+    UINT16                  ResourceLength;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -360,7 +383,8 @@ RsDoMemory32FixedDescriptor (
44a778
 
44a778
     Descriptor = Rnode->Buffer;
44a778
     Descriptor->FixedMemory32.DescriptorType = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
44a778
-    Descriptor->FixedMemory32.ResourceLength = 9;
44a778
+    ResourceLength = 9;
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedMemory32.ResourceLength, &ResourceLength);
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
 
44a778
@@ -377,14 +401,16 @@ RsDoMemory32FixedDescriptor (
44a778
 
44a778
         case 1: /* Address */
44a778
 
44a778
-            Descriptor->FixedMemory32.Address = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.Address,
44a778
+                &InitializerOp->Asl.Value.Integer);
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.Address));
44a778
             break;
44a778
 
44a778
         case 2: /* Length */
44a778
 
44a778
-            Descriptor->FixedMemory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.AddressLength,
44a778
+                &InitializerOp->Asl.Value.Integer);
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength));
44a778
             break;
44a778
diff --git a/source/compiler/aslrestype1i.c b/source/compiler/aslrestype1i.c
44a778
index 0f38e40..26fa7ea 100644
44a778
--- a/source/compiler/aslrestype1i.c
44a778
+++ b/source/compiler/aslrestype1i.c
44a778
@@ -197,6 +197,8 @@ RsDoFixedDmaDescriptor (
44a778
     AML_RESOURCE            *Descriptor;
44a778
     ACPI_PARSE_OBJECT       *InitializerOp;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
+    UINT16                  RequestLines = 0;
44a778
+    UINT16                  Channels = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -217,14 +219,14 @@ RsDoFixedDmaDescriptor (
44a778
         {
44a778
         case 0: /* DMA Request Lines [WORD] (_DMA) */
44a778
 
44a778
-            Descriptor->FixedDma.RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DMA,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.RequestLines));
44a778
             break;
44a778
 
44a778
         case 1: /* DMA Channel [WORD] (_TYP) */
44a778
 
44a778
-            Descriptor->FixedDma.Channels = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Channels = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels));
44a778
             break;
44a778
@@ -249,6 +251,9 @@ RsDoFixedDmaDescriptor (
44a778
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
44a778
     }
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.RequestLines, &RequestLines);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.Channels, &Channels);
44a778
+
44a778
     return (Rnode);
44a778
 }
44a778
 
44a778
@@ -273,6 +278,7 @@ RsDoFixedIoDescriptor (
44a778
     ACPI_PARSE_OBJECT       *InitializerOp;
44a778
     ACPI_PARSE_OBJECT       *AddressOp = NULL;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
+    UINT16                  Address = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -293,8 +299,7 @@ RsDoFixedIoDescriptor (
44a778
         {
44a778
         case 0: /* Base Address */
44a778
 
44a778
-            Descriptor->FixedIo.Address =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Address = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address));
44a778
             AddressOp = InitializerOp;
44a778
@@ -324,11 +329,13 @@ RsDoFixedIoDescriptor (
44a778
 
44a778
     /* Error checks */
44a778
 
44a778
-    if (Descriptor->FixedIo.Address > 0x03FF)
44a778
+    if (Address > 0x03FF)
44a778
     {
44a778
         AslError (ASL_WARNING, ASL_MSG_ISA_ADDRESS, AddressOp, NULL);
44a778
     }
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedIo.Address, &Address);
44a778
+
44a778
     return (Rnode);
44a778
 }
44a778
 
44a778
@@ -356,6 +363,8 @@ RsDoIoDescriptor (
44a778
     ACPI_PARSE_OBJECT       *LengthOp = NULL;
44a778
     ACPI_PARSE_OBJECT       *AlignOp = NULL;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
+    UINT16                  Minimum = 0;
44a778
+    UINT16                  Maximum = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -383,8 +392,7 @@ RsDoIoDescriptor (
44a778
 
44a778
         case 1:  /* Min Address */
44a778
 
44a778
-            Descriptor->Io.Minimum =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -392,8 +400,7 @@ RsDoIoDescriptor (
44a778
 
44a778
         case 2: /* Max Address */
44a778
 
44a778
-            Descriptor->Io.Maximum =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -434,12 +441,15 @@ RsDoIoDescriptor (
44a778
     /* Validate the Min/Max/Len/Align values */
44a778
 
44a778
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO,
44a778
-        Descriptor->Io.Minimum,
44a778
-        Descriptor->Io.Maximum,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
         Descriptor->Io.AddressLength,
44a778
         Descriptor->Io.Alignment,
44a778
         MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Io.Minimum, &Minimum);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Io.Maximum, &Maximum);
44a778
+
44a778
     return (Rnode);
44a778
 }
44a778
 
44a778
@@ -559,9 +569,9 @@ RsDoIrqDescriptor (
44a778
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
44a778
     }
44a778
 
44a778
-    /* Now we can set the channel mask */
44a778
+    /* Now we can set the interrupt mask */
44a778
 
44a778
-    Descriptor->Irq.IrqMask = IrqMask;
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
44a778
     return (Rnode);
44a778
 }
44a778
 
44a778
@@ -660,6 +670,6 @@ RsDoIrqNoFlagsDescriptor (
44a778
 
44a778
     /* Now we can set the interrupt mask */
44a778
 
44a778
-    Descriptor->Irq.IrqMask = IrqMask;
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
44a778
     return (Rnode);
44a778
 }
44a778
diff --git a/source/compiler/aslrestype2.c b/source/compiler/aslrestype2.c
44a778
index b75c118..37dd91b 100644
44a778
--- a/source/compiler/aslrestype2.c
44a778
+++ b/source/compiler/aslrestype2.c
44a778
@@ -75,6 +75,7 @@ RsDoGeneralRegisterDescriptor (
44a778
     AML_RESOURCE            *Descriptor;
44a778
     ACPI_PARSE_OBJECT       *InitializerOp;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
+    UINT16                  ResourceLength;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -85,7 +86,9 @@ RsDoGeneralRegisterDescriptor (
44a778
 
44a778
     Descriptor = Rnode->Buffer;
44a778
     Descriptor->GenericReg.DescriptorType = ACPI_RESOURCE_NAME_GENERIC_REGISTER;
44a778
-    Descriptor->GenericReg.ResourceLength = 12;
44a778
+    ResourceLength = 12;
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->GenericReg.ResourceLength,
44a778
+		    &ResourceLength);
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
 
44a778
@@ -116,7 +119,8 @@ RsDoGeneralRegisterDescriptor (
44a778
 
44a778
         case 3: /* Register Address */
44a778
 
44a778
-            Descriptor->GenericReg.Address = InitializerOp->Asl.Value.Integer;
44a778
+	    ACPI_MOVE_64_TO_64(&Descriptor->GenericReg.Address,
44a778
+			    &InitializerOp->Asl.Value.Integer);
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_ADDRESS,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.Address));
44a778
             break;
44a778
@@ -172,6 +176,7 @@ RsDoInterruptDescriptor (
44a778
     AML_RESOURCE            *Rover = NULL;
44a778
     ACPI_PARSE_OBJECT       *InitializerOp;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
+    UINT16                  ResourceLength = 0;
44a778
     UINT16                  StringLength = 0;
44a778
     UINT32                  OptionIndex = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
@@ -220,7 +225,7 @@ RsDoInterruptDescriptor (
44a778
      * Initial descriptor length -- may be enlarged if there are
44a778
      * optional fields present
44a778
      */
44a778
-    Descriptor->ExtendedIrq.ResourceLength  = 2;  /* Flags and table length byte */
44a778
+    ResourceLength  = 2;  /* Flags and table length byte */
44a778
     Descriptor->ExtendedIrq.InterruptCount  = 0;
44a778
 
44a778
     Rover = ACPI_CAST_PTR (AML_RESOURCE,
44a778
@@ -328,10 +333,11 @@ RsDoInterruptDescriptor (
44a778
 
44a778
             /* Save the integer and move pointer to the next one */
44a778
 
44a778
-            Rover->DwordItem = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            ACPI_MOVE_64_TO_32(&Rover->DwordItem,
44a778
+                &InitializerOp->Asl.Value.Integer);
44a778
             Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->DwordItem), 4);
44a778
             Descriptor->ExtendedIrq.InterruptCount++;
44a778
-            Descriptor->ExtendedIrq.ResourceLength += 4;
44a778
+            ResourceLength += 4;
44a778
 
44a778
             /* Case 7: First interrupt number in list */
44a778
 
44a778
@@ -367,7 +373,7 @@ RsDoInterruptDescriptor (
44a778
     {
44a778
         Rover->ByteItem = ResSourceIndex;
44a778
         Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->ByteItem), 1);
44a778
-        Descriptor->ExtendedIrq.ResourceLength += 1;
44a778
+        ResourceLength += 1;
44a778
     }
44a778
 
44a778
     /* Add optional ResSource string if present */
44a778
@@ -379,14 +385,15 @@ RsDoInterruptDescriptor (
44a778
         Rover = ACPI_ADD_PTR (
44a778
                     AML_RESOURCE, &(Rover->ByteItem), StringLength);
44a778
 
44a778
-        Descriptor->ExtendedIrq.ResourceLength = (UINT16)
44a778
-            (Descriptor->ExtendedIrq.ResourceLength + StringLength);
44a778
+        ResourceLength = (UINT16) (ResourceLength + StringLength);
44a778
     }
44a778
 
44a778
     Rnode->BufferLength =
44a778
         (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
44a778
         ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
44a778
         + OptionIndex + StringLength;
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->ExtendedIrq.ResourceLength,
44a778
+		    &ResourceLength);
44a778
     return (Rnode);
44a778
 }
44a778
 
44a778
@@ -434,7 +441,7 @@ RsDoVendorLargeDescriptor (
44a778
 
44a778
     Descriptor = Rnode->Buffer;
44a778
     Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE;
44a778
-    Descriptor->VendorLarge.ResourceLength = (UINT16) i;
44a778
+    ACPI_MOVE_32_TO_16(&Descriptor->VendorLarge.ResourceLength, &i);
44a778
 
44a778
     /* Point to end-of-descriptor for vendor data */
44a778
 
44a778
diff --git a/source/compiler/aslrestype2d.c b/source/compiler/aslrestype2d.c
44a778
index c7841b0..9a782c5 100644
44a778
--- a/source/compiler/aslrestype2d.c
44a778
+++ b/source/compiler/aslrestype2d.c
44a778
@@ -79,7 +79,13 @@ RsDoDwordIoDescriptor (
44a778
     ACPI_PARSE_OBJECT       *GranOp = NULL;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
     UINT16                  StringLength = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
     UINT32                  OptionIndex = 0;
44a778
+    UINT32                  Minimum = 0;
44a778
+    UINT32                  Maximum = 0;
44a778
+    UINT32                  AddressLength = 0;
44a778
+    UINT32                  Granularity = 0;
44a778
+    UINT32                  TranslationOffset = 0;
44a778
     UINT8                   *OptionalFields;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
@@ -102,8 +108,7 @@ RsDoDwordIoDescriptor (
44a778
      * optional fields present
44a778
      */
44a778
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
44a778
-    Descriptor->Address32.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_ADDRESS32) -
44a778
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
@@ -147,8 +152,7 @@ RsDoDwordIoDescriptor (
44a778
 
44a778
         case 5: /* Address Granularity */
44a778
 
44a778
-            Descriptor->Address32.Granularity =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -156,8 +160,7 @@ RsDoDwordIoDescriptor (
44a778
 
44a778
         case 6: /* Address Min */
44a778
 
44a778
-            Descriptor->Address32.Minimum =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -165,8 +168,7 @@ RsDoDwordIoDescriptor (
44a778
 
44a778
         case 7: /* Address Max */
44a778
 
44a778
-            Descriptor->Address32.Maximum =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -174,16 +176,14 @@ RsDoDwordIoDescriptor (
44a778
 
44a778
         case 8: /* Translation Offset */
44a778
 
44a778
-            Descriptor->Address32.TranslationOffset =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 9: /* Address Length */
44a778
 
44a778
-            Descriptor->Address32.AddressLength =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -197,7 +197,7 @@ RsDoDwordIoDescriptor (
44a778
 
44a778
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
44a778
                 OptionIndex++;
44a778
-                Descriptor->Address32.ResourceLength++;
44a778
+                ResourceLength++;
44a778
                 ResSourceIndex = TRUE;
44a778
             }
44a778
             break;
44a778
@@ -211,8 +211,7 @@ RsDoDwordIoDescriptor (
44a778
                 {
44a778
                     /* Found a valid ResourceSource */
44a778
 
44a778
-                    Descriptor->Address32.ResourceLength = (UINT16)
44a778
-                        (Descriptor->Address32.ResourceLength + StringLength);
44a778
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
44a778
 
44a778
                     strcpy ((char *)
44a778
                         &OptionalFields[OptionIndex],
44a778
@@ -272,13 +271,20 @@ RsDoDwordIoDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        (UINT64) Descriptor->Address32.Minimum,
44a778
-        (UINT64) Descriptor->Address32.Maximum,
44a778
-        (UINT64) Descriptor->Address32.AddressLength,
44a778
-        (UINT64) Descriptor->Address32.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->Address32.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
44a778
         OptionIndex + StringLength;
44a778
     return (Rnode);
44a778
@@ -310,7 +316,13 @@ RsDoDwordMemoryDescriptor (
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
     UINT8                   *OptionalFields;
44a778
     UINT16                  StringLength = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
     UINT32                  OptionIndex = 0;
44a778
+    UINT32                  Minimum = 0;
44a778
+    UINT32                  Maximum = 0;
44a778
+    UINT32                  AddressLength = 0;
44a778
+    UINT32                  Granularity = 0;
44a778
+    UINT32                  TranslationOffset = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
     BOOLEAN                 ResSourceIndex = FALSE;
44a778
@@ -332,11 +344,9 @@ RsDoDwordMemoryDescriptor (
44a778
      * optional fields present
44a778
      */
44a778
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
44a778
-    Descriptor->Address32.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_ADDRESS32) -
44a778
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
 
44a778
-
44a778
     /* Process all child initialization nodes */
44a778
 
44a778
     for (i = 0; InitializerOp; i++)
44a778
@@ -385,8 +395,7 @@ RsDoDwordMemoryDescriptor (
44a778
 
44a778
         case 6: /* Address Granularity */
44a778
 
44a778
-            Descriptor->Address32.Granularity =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -394,8 +403,7 @@ RsDoDwordMemoryDescriptor (
44a778
 
44a778
         case 7: /* Min Address */
44a778
 
44a778
-            Descriptor->Address32.Minimum =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -403,8 +411,7 @@ RsDoDwordMemoryDescriptor (
44a778
 
44a778
         case 8: /* Max Address */
44a778
 
44a778
-            Descriptor->Address32.Maximum =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -412,16 +419,14 @@ RsDoDwordMemoryDescriptor (
44a778
 
44a778
         case 9: /* Translation Offset */
44a778
 
44a778
-            Descriptor->Address32.TranslationOffset =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 10: /* Address Length */
44a778
 
44a778
-            Descriptor->Address32.AddressLength =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -433,7 +438,7 @@ RsDoDwordMemoryDescriptor (
44a778
             {
44a778
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
44a778
                 OptionIndex++;
44a778
-                Descriptor->Address32.ResourceLength++;
44a778
+                ResourceLength++;
44a778
                 ResSourceIndex = TRUE;
44a778
             }
44a778
             break;
44a778
@@ -445,8 +450,8 @@ RsDoDwordMemoryDescriptor (
44a778
             {
44a778
                 if (StringLength)
44a778
                 {
44a778
-                    Descriptor->Address32.ResourceLength = (UINT16)
44a778
-                        (Descriptor->Address32.ResourceLength + StringLength);
44a778
+
44a778
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
44a778
 
44a778
                     strcpy ((char *)
44a778
                         &OptionalFields[OptionIndex],
44a778
@@ -507,13 +512,20 @@ RsDoDwordMemoryDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        (UINT64) Descriptor->Address32.Minimum,
44a778
-        (UINT64) Descriptor->Address32.Maximum,
44a778
-        (UINT64) Descriptor->Address32.AddressLength,
44a778
-        (UINT64) Descriptor->Address32.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->Address32.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
44a778
         OptionIndex + StringLength;
44a778
     return (Rnode);
44a778
@@ -545,7 +557,13 @@ RsDoDwordSpaceDescriptor (
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
     UINT8                   *OptionalFields;
44a778
     UINT16                  StringLength = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
     UINT32                  OptionIndex = 0;
44a778
+    UINT32                  Minimum = 0;
44a778
+    UINT32                  Maximum = 0;
44a778
+    UINT32                  AddressLength = 0;
44a778
+    UINT32                  Granularity = 0;
44a778
+    UINT32                  TranslationOffset = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
     BOOLEAN                 ResSourceIndex = FALSE;
44a778
@@ -566,8 +584,7 @@ RsDoDwordSpaceDescriptor (
44a778
      * optional fields present
44a778
      */
44a778
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
44a778
-    Descriptor->Address32.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_ADDRESS32) -
44a778
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
@@ -616,8 +633,7 @@ RsDoDwordSpaceDescriptor (
44a778
 
44a778
         case 6: /* Address Granularity */
44a778
 
44a778
-            Descriptor->Address32.Granularity =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -625,8 +641,7 @@ RsDoDwordSpaceDescriptor (
44a778
 
44a778
         case 7: /* Min Address */
44a778
 
44a778
-            Descriptor->Address32.Minimum =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -634,8 +649,7 @@ RsDoDwordSpaceDescriptor (
44a778
 
44a778
         case 8: /* Max Address */
44a778
 
44a778
-            Descriptor->Address32.Maximum =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -643,16 +657,14 @@ RsDoDwordSpaceDescriptor (
44a778
 
44a778
         case 9: /* Translation Offset */
44a778
 
44a778
-            Descriptor->Address32.TranslationOffset =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 10: /* Address Length */
44a778
 
44a778
-            Descriptor->Address32.AddressLength =
44a778
-                (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -664,7 +676,7 @@ RsDoDwordSpaceDescriptor (
44a778
             {
44a778
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
44a778
                 OptionIndex++;
44a778
-                Descriptor->Address32.ResourceLength++;
44a778
+                ResourceLength++;
44a778
                 ResSourceIndex = TRUE;
44a778
             }
44a778
             break;
44a778
@@ -676,8 +688,7 @@ RsDoDwordSpaceDescriptor (
44a778
             {
44a778
                 if (StringLength)
44a778
                 {
44a778
-                    Descriptor->Address32.ResourceLength = (UINT16)
44a778
-                        (Descriptor->Address32.ResourceLength + StringLength);
44a778
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
44a778
 
44a778
                     strcpy ((char *)
44a778
                         &OptionalFields[OptionIndex],
44a778
@@ -724,13 +735,20 @@ RsDoDwordSpaceDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        (UINT64) Descriptor->Address32.Minimum,
44a778
-        (UINT64) Descriptor->Address32.Maximum,
44a778
-        (UINT64) Descriptor->Address32.AddressLength,
44a778
-        (UINT64) Descriptor->Address32.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->Address32.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
44a778
         OptionIndex + StringLength;
44a778
     return (Rnode);
44a778
diff --git a/source/compiler/aslrestype2e.c b/source/compiler/aslrestype2e.c
44a778
index aa17a75..61abdd3 100644
44a778
--- a/source/compiler/aslrestype2e.c
44a778
+++ b/source/compiler/aslrestype2e.c
44a778
@@ -78,6 +78,13 @@ RsDoExtendedIoDescriptor (
44a778
     ACPI_PARSE_OBJECT       *GranOp = NULL;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
     UINT16                  StringLength = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
+    UINT64                  Minimum = 0;
44a778
+    UINT64                  Maximum = 0;
44a778
+    UINT64                  AddressLength = 0;
44a778
+    UINT64                  Granularity = 0;
44a778
+    UINT64                  TranslationOffset = 0;
44a778
+    UINT64                  TypeSpecific = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -94,9 +101,10 @@ RsDoExtendedIoDescriptor (
44a778
     Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
44a778
     Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
44a778
 
44a778
-    Descriptor->ExtAddress64.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
44a778
+    ResourceLength  = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
44a778
+        &ResourceLength);
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
 
44a778
@@ -139,7 +147,7 @@ RsDoExtendedIoDescriptor (
44a778
 
44a778
         case 5: /* Address Granularity */
44a778
 
44a778
-            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -147,7 +155,7 @@ RsDoExtendedIoDescriptor (
44a778
 
44a778
         case 6: /* Address Min */
44a778
 
44a778
-            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -155,7 +163,7 @@ RsDoExtendedIoDescriptor (
44a778
 
44a778
         case 7: /* Address Max */
44a778
 
44a778
-            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -163,14 +171,14 @@ RsDoExtendedIoDescriptor (
44a778
 
44a778
         case 8: /* Translation Offset */
44a778
 
44a778
-            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 9: /* Address Length */
44a778
 
44a778
-            Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -178,7 +186,7 @@ RsDoExtendedIoDescriptor (
44a778
 
44a778
         case 10: /* Type-Specific Attributes */
44a778
 
44a778
-            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
44a778
+            TypeSpecific = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
44a778
             break;
44a778
@@ -214,13 +222,20 @@ RsDoExtendedIoDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        Descriptor->ExtAddress64.Minimum,
44a778
-        Descriptor->ExtAddress64.Maximum,
44a778
-        Descriptor->ExtAddress64.AddressLength,
44a778
-        Descriptor->ExtAddress64.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->ExtAddress64.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) +
44a778
         StringLength;
44a778
     return (Rnode);
44a778
@@ -251,6 +266,13 @@ RsDoExtendedMemoryDescriptor (
44a778
     ACPI_PARSE_OBJECT       *GranOp = NULL;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
     UINT16                  StringLength = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
+    UINT64                  Minimum = 0;
44a778
+    UINT64                  Maximum = 0;
44a778
+    UINT64                  AddressLength = 0;
44a778
+    UINT64                  Granularity = 0;
44a778
+    UINT64                  TranslationOffset = 0;
44a778
+    UINT64                  TypeSpecific = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -267,9 +289,10 @@ RsDoExtendedMemoryDescriptor (
44a778
     Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
44a778
     Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
44a778
 
44a778
-    Descriptor->ExtAddress64.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
44a778
+    ResourceLength  = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
44a778
+        &ResourceLength);
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
 
44a778
@@ -319,7 +342,7 @@ RsDoExtendedMemoryDescriptor (
44a778
 
44a778
         case 6: /* Address Granularity */
44a778
 
44a778
-            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -327,7 +350,7 @@ RsDoExtendedMemoryDescriptor (
44a778
 
44a778
         case 7: /* Min Address */
44a778
 
44a778
-            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -335,7 +358,7 @@ RsDoExtendedMemoryDescriptor (
44a778
 
44a778
         case 8: /* Max Address */
44a778
 
44a778
-            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -343,14 +366,14 @@ RsDoExtendedMemoryDescriptor (
44a778
 
44a778
         case 9: /* Translation Offset */
44a778
 
44a778
-            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 10: /* Address Length */
44a778
 
44a778
-            Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -358,7 +381,7 @@ RsDoExtendedMemoryDescriptor (
44a778
 
44a778
         case 11: /* Type-Specific Attributes */
44a778
 
44a778
-            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
44a778
+            TypeSpecific = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
44a778
             break;
44a778
@@ -395,13 +418,20 @@ RsDoExtendedMemoryDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        Descriptor->ExtAddress64.Minimum,
44a778
-        Descriptor->ExtAddress64.Maximum,
44a778
-        Descriptor->ExtAddress64.AddressLength,
44a778
-        Descriptor->ExtAddress64.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->ExtAddress64.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) +
44a778
         StringLength;
44a778
     return (Rnode);
44a778
@@ -432,6 +462,13 @@ RsDoExtendedSpaceDescriptor (
44a778
     ACPI_PARSE_OBJECT       *GranOp = NULL;
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
     UINT16                  StringLength = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
+    UINT64                  Minimum = 0;
44a778
+    UINT64                  Maximum = 0;
44a778
+    UINT64                  AddressLength = 0;
44a778
+    UINT64                  Granularity = 0;
44a778
+    UINT64                  TranslationOffset = 0;
44a778
+    UINT64                  TypeSpecific = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -447,9 +484,10 @@ RsDoExtendedSpaceDescriptor (
44a778
     Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
44a778
     Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
44a778
 
44a778
-    Descriptor->ExtAddress64.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
44a778
+    ResourceLength  = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
44a778
+        &ResourceLength);
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
 
44a778
@@ -497,7 +535,7 @@ RsDoExtendedSpaceDescriptor (
44a778
 
44a778
         case 6: /* Address Granularity */
44a778
 
44a778
-            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -505,7 +543,7 @@ RsDoExtendedSpaceDescriptor (
44a778
 
44a778
         case 7: /* Min Address */
44a778
 
44a778
-            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -513,7 +551,7 @@ RsDoExtendedSpaceDescriptor (
44a778
 
44a778
         case 8: /* Max Address */
44a778
 
44a778
-            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -521,14 +559,14 @@ RsDoExtendedSpaceDescriptor (
44a778
 
44a778
         case 9: /* Translation Offset */
44a778
 
44a778
-            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 10: /* Address Length */
44a778
 
44a778
-            Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -536,7 +574,7 @@ RsDoExtendedSpaceDescriptor (
44a778
 
44a778
         case 11: /* Type-Specific Attributes */
44a778
 
44a778
-            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
44a778
+            TypeSpecific = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
44a778
             break;
44a778
@@ -558,13 +596,20 @@ RsDoExtendedSpaceDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        Descriptor->ExtAddress64.Minimum,
44a778
-        Descriptor->ExtAddress64.Maximum,
44a778
-        Descriptor->ExtAddress64.AddressLength,
44a778
-        Descriptor->ExtAddress64.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->ExtAddress64.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) +
44a778
         StringLength;
44a778
     return (Rnode);
44a778
diff --git a/source/compiler/aslrestype2q.c b/source/compiler/aslrestype2q.c
44a778
index c8d8cab..d738ca4 100644
44a778
--- a/source/compiler/aslrestype2q.c
44a778
+++ b/source/compiler/aslrestype2q.c
44a778
@@ -80,7 +80,13 @@ RsDoQwordIoDescriptor (
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
     UINT8                   *OptionalFields;
44a778
     UINT16                  StringLength = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
     UINT32                  OptionIndex = 0;
44a778
+    UINT64                  Minimum = 0;
44a778
+    UINT64                  Maximum = 0;
44a778
+    UINT64                  AddressLength = 0;
44a778
+    UINT64                  Granularity = 0;
44a778
+    UINT64                  TranslationOffset = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
     BOOLEAN                 ResSourceIndex = FALSE;
44a778
@@ -102,8 +108,7 @@ RsDoQwordIoDescriptor (
44a778
      * optional fields present
44a778
      */
44a778
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
44a778
-    Descriptor->Address64.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_ADDRESS64) -
44a778
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
@@ -147,7 +152,7 @@ RsDoQwordIoDescriptor (
44a778
 
44a778
         case 5: /* Address Granularity */
44a778
 
44a778
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -155,7 +160,7 @@ RsDoQwordIoDescriptor (
44a778
 
44a778
         case 6: /* Address Min */
44a778
 
44a778
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -163,7 +168,7 @@ RsDoQwordIoDescriptor (
44a778
 
44a778
         case 7: /* Address Max */
44a778
 
44a778
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -171,14 +176,14 @@ RsDoQwordIoDescriptor (
44a778
 
44a778
         case 8: /* Translation Offset */
44a778
 
44a778
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 9: /* Address Length */
44a778
 
44a778
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -190,7 +195,7 @@ RsDoQwordIoDescriptor (
44a778
             {
44a778
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
44a778
                 OptionIndex++;
44a778
-                Descriptor->Address64.ResourceLength++;
44a778
+                ResourceLength++;
44a778
                 ResSourceIndex = TRUE;
44a778
             }
44a778
             break;
44a778
@@ -202,8 +207,7 @@ RsDoQwordIoDescriptor (
44a778
             {
44a778
                 if (StringLength)
44a778
                 {
44a778
-                    Descriptor->Address64.ResourceLength = (UINT16)
44a778
-                        (Descriptor->Address64.ResourceLength + StringLength);
44a778
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
44a778
 
44a778
                     strcpy ((char *)
44a778
                         &OptionalFields[OptionIndex],
44a778
@@ -263,13 +267,20 @@ RsDoQwordIoDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        Descriptor->Address64.Minimum,
44a778
-        Descriptor->Address64.Maximum,
44a778
-        Descriptor->Address64.AddressLength,
44a778
-        Descriptor->Address64.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->Address64.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
44a778
         OptionIndex + StringLength;
44a778
     return (Rnode);
44a778
@@ -301,7 +312,13 @@ RsDoQwordMemoryDescriptor (
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
     UINT8                   *OptionalFields;
44a778
     UINT16                  StringLength = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
     UINT32                  OptionIndex = 0;
44a778
+    UINT64                  Minimum = 0;
44a778
+    UINT64                  Maximum = 0;
44a778
+    UINT64                  AddressLength = 0;
44a778
+    UINT64                  Granularity = 0;
44a778
+    UINT64                  TranslationOffset = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
     BOOLEAN                 ResSourceIndex = FALSE;
44a778
@@ -323,8 +340,7 @@ RsDoQwordMemoryDescriptor (
44a778
      * optional fields present
44a778
      */
44a778
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
44a778
-    Descriptor->Address64.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_ADDRESS64) -
44a778
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
@@ -375,7 +391,7 @@ RsDoQwordMemoryDescriptor (
44a778
 
44a778
         case 6: /* Address Granularity */
44a778
 
44a778
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -383,7 +399,7 @@ RsDoQwordMemoryDescriptor (
44a778
 
44a778
         case 7: /* Min Address */
44a778
 
44a778
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -391,7 +407,7 @@ RsDoQwordMemoryDescriptor (
44a778
 
44a778
         case 8: /* Max Address */
44a778
 
44a778
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -399,14 +415,14 @@ RsDoQwordMemoryDescriptor (
44a778
 
44a778
         case 9: /* Translation Offset */
44a778
 
44a778
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 10: /* Address Length */
44a778
 
44a778
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -418,7 +434,7 @@ RsDoQwordMemoryDescriptor (
44a778
             {
44a778
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
44a778
                 OptionIndex++;
44a778
-                Descriptor->Address64.ResourceLength++;
44a778
+                ResourceLength++;
44a778
                 ResSourceIndex = TRUE;
44a778
             }
44a778
             break;
44a778
@@ -430,8 +446,7 @@ RsDoQwordMemoryDescriptor (
44a778
             {
44a778
                 if (StringLength)
44a778
                 {
44a778
-                    Descriptor->Address64.ResourceLength = (UINT16)
44a778
-                        (Descriptor->Address64.ResourceLength + StringLength);
44a778
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
44a778
 
44a778
                     strcpy ((char *)
44a778
                         &OptionalFields[OptionIndex],
44a778
@@ -492,13 +507,20 @@ RsDoQwordMemoryDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        Descriptor->Address64.Minimum,
44a778
-        Descriptor->Address64.Maximum,
44a778
-        Descriptor->Address64.AddressLength,
44a778
-        Descriptor->Address64.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->Address64.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
44a778
         OptionIndex + StringLength;
44a778
     return (Rnode);
44a778
@@ -530,9 +552,15 @@ RsDoQwordSpaceDescriptor (
44a778
     ASL_RESOURCE_NODE       *Rnode;
44a778
     UINT8                   *OptionalFields;
44a778
     UINT16                  StringLength = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
     UINT32                  OptionIndex = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
+    UINT64                  Minimum = 0;
44a778
+    UINT64                  Maximum = 0;
44a778
+    UINT64                  AddressLength = 0;
44a778
+    UINT64                  Granularity = 0;
44a778
+    UINT64                  TranslationOffset = 0;
44a778
     BOOLEAN                 ResSourceIndex = FALSE;
44a778
 
44a778
 
44a778
@@ -551,8 +579,7 @@ RsDoQwordSpaceDescriptor (
44a778
      * optional fields present
44a778
      */
44a778
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
44a778
-    Descriptor->Address64.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_ADDRESS64) -
44a778
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
@@ -601,7 +628,7 @@ RsDoQwordSpaceDescriptor (
44a778
 
44a778
         case 6: /* Address Granularity */
44a778
 
44a778
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -609,7 +636,7 @@ RsDoQwordSpaceDescriptor (
44a778
 
44a778
         case 7: /* Min Address */
44a778
 
44a778
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -617,7 +644,7 @@ RsDoQwordSpaceDescriptor (
44a778
 
44a778
         case 8: /* Max Address */
44a778
 
44a778
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -625,14 +652,14 @@ RsDoQwordSpaceDescriptor (
44a778
 
44a778
         case 9: /* Translation Offset */
44a778
 
44a778
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 10: /* Address Length */
44a778
 
44a778
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = InitializerOp->Asl.Value.Integer;
44a778
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -644,7 +671,7 @@ RsDoQwordSpaceDescriptor (
44a778
             {
44a778
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
44a778
                 OptionIndex++;
44a778
-                Descriptor->Address64.ResourceLength++;
44a778
+                ResourceLength++;
44a778
                 ResSourceIndex = TRUE;
44a778
             }
44a778
             break;
44a778
@@ -656,8 +683,7 @@ RsDoQwordSpaceDescriptor (
44a778
             {
44a778
                 if (StringLength)
44a778
                 {
44a778
-                    Descriptor->Address64.ResourceLength = (UINT16)
44a778
-                        (Descriptor->Address64.ResourceLength + StringLength);
44a778
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
44a778
 
44a778
                     strcpy ((char *)
44a778
                         &OptionalFields[OptionIndex],
44a778
@@ -703,13 +729,20 @@ RsDoQwordSpaceDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        Descriptor->Address64.Minimum,
44a778
-        Descriptor->Address64.Maximum,
44a778
-        Descriptor->Address64.AddressLength,
44a778
-        Descriptor->Address64.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->Address64.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
44a778
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
44a778
         OptionIndex + StringLength;
44a778
     return (Rnode);
44a778
diff --git a/source/compiler/aslrestype2s.c b/source/compiler/aslrestype2s.c
44a778
index fcd8e23..b7394b7 100644
44a778
--- a/source/compiler/aslrestype2s.c
44a778
+++ b/source/compiler/aslrestype2s.c
44a778
@@ -290,6 +290,9 @@ RsDoGpioIntDescriptor (
44a778
     UINT16                  VendorLength;
44a778
     UINT16                  InterruptLength;
44a778
     UINT16                  DescriptorSize;
44a778
+    UINT16                  IntFlags = 0;
44a778
+    UINT16                  DebounceTimeout = 0;
44a778
+    UINT16                  Flags = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  PinCount = 0;
44a778
     UINT32                  i;
44a778
@@ -346,21 +349,21 @@ RsDoGpioIntDescriptor (
44a778
         {
44a778
         case 0: /* Interrupt Mode - edge/level [Flag] (_MOD) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0);
44a778
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0);
44a778
             RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0);
44a778
             break;
44a778
 
44a778
         case 1: /* Interrupt Polarity - Active high/low [Flags] (_POL) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 1, 0);
44a778
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 1, 0);
44a778
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_POLARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 1, 2);
44a778
             break;
44a778
 
44a778
         case 2: /* Share Type - Default: exclusive (0) [Flags] (_SHR) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0);
44a778
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0);
44a778
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3, 2);
44a778
             break;
44a778
@@ -374,7 +377,7 @@ RsDoGpioIntDescriptor (
44a778
 
44a778
         case 4: /* Debounce Timeout [WORD] (_DBT) */
44a778
 
44a778
-            Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
44a778
             break;
44a778
@@ -401,7 +404,7 @@ RsDoGpioIntDescriptor (
44a778
 
44a778
         case 7: /* Resource Usage (consumer/producer) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
44a778
+            RsSetFlagBits16 (&Flags, InitializerOp, 0, 1);
44a778
             break;
44a778
 
44a778
         case 8: /* Resource Tag (Descriptor Name) */
44a778
@@ -466,6 +469,10 @@ RsDoGpioIntDescriptor (
44a778
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
44a778
     }
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
44a778
+
44a778
     MpSaveGpioInfo (Info->MappingOp, Descriptor,
44a778
         PinCount, PinList, ResourceSource);
44a778
     return (Rnode);
44a778
@@ -499,6 +506,10 @@ RsDoGpioIoDescriptor (
44a778
     UINT16                  VendorLength;
44a778
     UINT16                  InterruptLength;
44a778
     UINT16                  DescriptorSize;
44a778
+    UINT16                  IntFlags = 0;
44a778
+    UINT16                  DebounceTimeout = 0;
44a778
+    UINT16                  DriveStrength = 0;
44a778
+    UINT16                  Flags = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  PinCount = 0;
44a778
     UINT32                  i;
44a778
@@ -555,7 +566,7 @@ RsDoGpioIoDescriptor (
44a778
         {
44a778
         case 0: /* Share Type [Flags] (_SHR) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0);
44a778
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0);
44a778
             RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3);
44a778
             break;
44a778
@@ -569,21 +580,21 @@ RsDoGpioIoDescriptor (
44a778
 
44a778
         case 2: /* Debounce Timeout [WORD] (_DBT) */
44a778
 
44a778
-            Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
44a778
             break;
44a778
 
44a778
         case 3: /* Drive Strength [WORD] (_DRS) */
44a778
 
44a778
-            Descriptor->Gpio.DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DRIVESTRENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DriveStrength));
44a778
             break;
44a778
 
44a778
         case 4: /* I/O Restriction [Flag] (_IOR) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0);
44a778
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0);
44a778
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_IORESTRICTION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0, 2);
44a778
             break;
44a778
@@ -609,7 +620,7 @@ RsDoGpioIoDescriptor (
44a778
 
44a778
         case 7: /* Resource Usage (consumer/producer) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
44a778
+            RsSetFlagBits16 (&Flags, InitializerOp, 0, 1);
44a778
             break;
44a778
 
44a778
         case 8: /* Resource Tag (Descriptor Name) */
44a778
@@ -673,6 +684,11 @@ RsDoGpioIoDescriptor (
44a778
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
44a778
     }
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DriveStrength, &DriveStrength);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
44a778
+
44a778
     MpSaveGpioInfo (Info->MappingOp, Descriptor,
44a778
         PinCount, PinList, ResourceSource);
44a778
     return (Rnode);
44a778
@@ -703,6 +719,9 @@ RsDoI2cSerialBusDescriptor (
44a778
     UINT16                  ResSourceLength;
44a778
     UINT16                  VendorLength;
44a778
     UINT16                  DescriptorSize;
44a778
+    UINT16                  SlaveAddress = 0;
44a778
+    UINT32                  ConnectionSpeed = 0;
44a778
+    UINT16                  TypeSpecificFlags = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -752,7 +771,7 @@ RsDoI2cSerialBusDescriptor (
44a778
         {
44a778
         case 0: /* Slave Address [WORD] (_ADR) */
44a778
 
44a778
-            Descriptor->I2cSerialBus.SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.SlaveAddress));
44a778
             break;
44a778
@@ -766,14 +785,14 @@ RsDoI2cSerialBusDescriptor (
44a778
 
44a778
         case 2: /* Connection Speed [DWORD] (_SPE) */
44a778
 
44a778
-            Descriptor->I2cSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed));
44a778
             break;
44a778
 
44a778
         case 3: /* Addressing Mode [Flag] (_MOD) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->I2cSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
44a778
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
44a778
             RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.TypeSpecificFlags), 0);
44a778
             break;
44a778
@@ -833,6 +852,10 @@ RsDoI2cSerialBusDescriptor (
44a778
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
44a778
     }
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.SlaveAddress, &SlaveAddress);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->I2cSerialBus.ConnectionSpeed, &ConnectionSpeed);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
44a778
+
44a778
     MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
44a778
     return (Rnode);
44a778
 }
44a778
@@ -862,6 +885,9 @@ RsDoSpiSerialBusDescriptor (
44a778
     UINT16                  ResSourceLength;
44a778
     UINT16                  VendorLength;
44a778
     UINT16                  DescriptorSize;
44a778
+    UINT16                  DeviceSelection = 0;
44a778
+    UINT32                  ConnectionSpeed = 0;
44a778
+    UINT16                  TypeSpecificFlags = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -912,21 +938,21 @@ RsDoSpiSerialBusDescriptor (
44a778
         {
44a778
         case 0: /* Device Selection [WORD] (_ADR) */
44a778
 
44a778
-            Descriptor->SpiSerialBus.DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.DeviceSelection));
44a778
             break;
44a778
 
44a778
         case 1: /* Device Polarity [Flag] (_DPL) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 1, 0);
44a778
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 1, 0);
44a778
             RsCreateBitField (InitializerOp, ACPI_RESTAG_DEVICEPOLARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 1);
44a778
             break;
44a778
 
44a778
         case 2: /* Wire Mode [Flag] (_MOD) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
44a778
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
44a778
             RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 0);
44a778
             break;
44a778
@@ -947,7 +973,7 @@ RsDoSpiSerialBusDescriptor (
44a778
 
44a778
         case 5: /* Connection Speed [DWORD] (_SPE) */
44a778
 
44a778
-            Descriptor->SpiSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.ConnectionSpeed));
44a778
             break;
44a778
@@ -1021,6 +1047,10 @@ RsDoSpiSerialBusDescriptor (
44a778
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
44a778
     }
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.DeviceSelection, &DeviceSelection);
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->SpiSerialBus.ConnectionSpeed, &ConnectionSpeed);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
44a778
+
44a778
     MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
44a778
     return (Rnode);
44a778
 }
44a778
@@ -1050,6 +1080,10 @@ RsDoUartSerialBusDescriptor (
44a778
     UINT16                  ResSourceLength;
44a778
     UINT16                  VendorLength;
44a778
     UINT16                  DescriptorSize;
44a778
+    UINT32                  DefaultBaudRate = 0;
44a778
+    UINT16                  TypeSpecificFlags = 0;
44a778
+    UINT16                  RxFifoSize = 0;
44a778
+    UINT16                  TxFifoSize = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
 
44a778
@@ -1099,21 +1133,21 @@ RsDoUartSerialBusDescriptor (
44a778
         {
44a778
         case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */
44a778
 
44a778
-            Descriptor->UartSerialBus.DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
+            DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.DefaultBaudRate));
44a778
             break;
44a778
 
44a778
         case 1: /* Bits Per Byte [Flags] (_LEN) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 4, 3);
44a778
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 4, 3);
44a778
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 4, 3);
44a778
             break;
44a778
 
44a778
         case 2: /* Stop Bits [Flags] (_STB) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 2, 1);
44a778
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 2, 1);
44a778
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_STOPBITS,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 2, 2);
44a778
             break;
44a778
@@ -1127,7 +1161,7 @@ RsDoUartSerialBusDescriptor (
44a778
 
44a778
         case 4: /* Endianness [Flag] (_END) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 7, 0);
44a778
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 7, 0);
44a778
             RsCreateBitField (InitializerOp, ACPI_RESTAG_ENDIANNESS,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 7);
44a778
             break;
44a778
@@ -1141,21 +1175,21 @@ RsDoUartSerialBusDescriptor (
44a778
 
44a778
         case 6: /* Flow Control [Flags] (_FLC) */
44a778
 
44a778
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
44a778
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
44a778
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_FLOWCONTROL,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 0, 2);
44a778
             break;
44a778
 
44a778
         case 7: /* Rx Buffer Size [WORD] (_RXL) */
44a778
 
44a778
-            Descriptor->UartSerialBus.RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_RX,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.RxFifoSize));
44a778
             break;
44a778
 
44a778
         case 8: /* Tx Buffer Size [WORD] (_TXL) */
44a778
 
44a778
-            Descriptor->UartSerialBus.TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_TX,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TxFifoSize));
44a778
             break;
44a778
@@ -1225,6 +1259,11 @@ RsDoUartSerialBusDescriptor (
44a778
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
44a778
     }
44a778
 
44a778
+    ACPI_MOVE_32_TO_32(&Descriptor->UartSerialBus.DefaultBaudRate, &DefaultBaudRate);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.RxFifoSize, &RxFifoSize);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TxFifoSize, &TxFifoSize);
44a778
+
44a778
     MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
44a778
     return (Rnode);
44a778
 }
44a778
diff --git a/source/compiler/aslrestype2w.c b/source/compiler/aslrestype2w.c
44a778
index 0b88c70..a971d5a 100644
44a778
--- a/source/compiler/aslrestype2w.c
44a778
+++ b/source/compiler/aslrestype2w.c
44a778
@@ -81,6 +81,12 @@ RsDoWordIoDescriptor (
44a778
     UINT8                   *OptionalFields;
44a778
     UINT16                  StringLength = 0;
44a778
     UINT32                  OptionIndex = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
+    UINT16                  Minimum = 0;
44a778
+    UINT16                  Maximum = 0;
44a778
+    UINT16                  AddressLength = 0;
44a778
+    UINT16                  Granularity = 0;
44a778
+    UINT16                  TranslationOffset = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
     BOOLEAN                 ResSourceIndex = FALSE;
44a778
@@ -102,8 +108,7 @@ RsDoWordIoDescriptor (
44a778
      * optional fields present
44a778
      */
44a778
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
44a778
-    Descriptor->Address16.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_ADDRESS16) -
44a778
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
@@ -147,7 +152,7 @@ RsDoWordIoDescriptor (
44a778
 
44a778
         case 5: /* Address Granularity */
44a778
 
44a778
-            Descriptor->Address16.Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -155,7 +160,7 @@ RsDoWordIoDescriptor (
44a778
 
44a778
         case 6: /* Address Min */
44a778
 
44a778
-            Descriptor->Address16.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -163,7 +168,7 @@ RsDoWordIoDescriptor (
44a778
 
44a778
         case 7: /* Address Max */
44a778
 
44a778
-            Descriptor->Address16.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -171,14 +176,14 @@ RsDoWordIoDescriptor (
44a778
 
44a778
         case 8: /* Translation Offset */
44a778
 
44a778
-            Descriptor->Address16.TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 9: /* Address Length */
44a778
 
44a778
-            Descriptor->Address16.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -190,7 +195,7 @@ RsDoWordIoDescriptor (
44a778
             {
44a778
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
44a778
                 OptionIndex++;
44a778
-                Descriptor->Address16.ResourceLength++;
44a778
+                ResourceLength++;
44a778
                 ResSourceIndex = TRUE;
44a778
             }
44a778
             break;
44a778
@@ -202,8 +207,7 @@ RsDoWordIoDescriptor (
44a778
             {
44a778
                 if (StringLength)
44a778
                 {
44a778
-                    Descriptor->Address16.ResourceLength = (UINT16)
44a778
-                        (Descriptor->Address16.ResourceLength + StringLength);
44a778
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
44a778
 
44a778
                     strcpy ((char *)
44a778
                         &OptionalFields[OptionIndex],
44a778
@@ -263,13 +267,20 @@ RsDoWordIoDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        (UINT64) Descriptor->Address16.Minimum,
44a778
-        (UINT64) Descriptor->Address16.Maximum,
44a778
-        (UINT64) Descriptor->Address16.AddressLength,
44a778
-        (UINT64) Descriptor->Address16.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->Address16.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
44a778
         OptionIndex + StringLength;
44a778
     return (Rnode);
44a778
@@ -302,6 +313,12 @@ RsDoWordBusNumberDescriptor (
44a778
     UINT8                   *OptionalFields;
44a778
     UINT16                  StringLength = 0;
44a778
     UINT32                  OptionIndex = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
+    UINT16                  Minimum = 0;
44a778
+    UINT16                  Maximum = 0;
44a778
+    UINT16                  AddressLength = 0;
44a778
+    UINT16                  Granularity = 0;
44a778
+    UINT16                  TranslationOffset = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
     BOOLEAN                 ResSourceIndex = FALSE;
44a778
@@ -323,8 +340,7 @@ RsDoWordBusNumberDescriptor (
44a778
      * optional fields present
44a778
      */
44a778
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
44a778
-    Descriptor->Address16.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_ADDRESS16) -
44a778
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
@@ -361,8 +377,7 @@ RsDoWordBusNumberDescriptor (
44a778
 
44a778
         case 4: /* Address Granularity */
44a778
 
44a778
-            Descriptor->Address16.Granularity =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -370,8 +385,7 @@ RsDoWordBusNumberDescriptor (
44a778
 
44a778
         case 5: /* Min Address */
44a778
 
44a778
-            Descriptor->Address16.Minimum =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -379,8 +393,7 @@ RsDoWordBusNumberDescriptor (
44a778
 
44a778
         case 6: /* Max Address */
44a778
 
44a778
-            Descriptor->Address16.Maximum =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -388,16 +401,14 @@ RsDoWordBusNumberDescriptor (
44a778
 
44a778
         case 7: /* Translation Offset */
44a778
 
44a778
-            Descriptor->Address16.TranslationOffset =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 8: /* Address Length */
44a778
 
44a778
-            Descriptor->Address16.AddressLength =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -409,7 +420,7 @@ RsDoWordBusNumberDescriptor (
44a778
             {
44a778
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
44a778
                 OptionIndex++;
44a778
-                Descriptor->Address16.ResourceLength++;
44a778
+                ResourceLength++;
44a778
                 ResSourceIndex = TRUE;
44a778
             }
44a778
             break;
44a778
@@ -421,8 +432,7 @@ RsDoWordBusNumberDescriptor (
44a778
             {
44a778
                 if (StringLength)
44a778
                 {
44a778
-                    Descriptor->Address16.ResourceLength = (UINT16)
44a778
-                        (Descriptor->Address16.ResourceLength + StringLength);
44a778
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
44a778
 
44a778
                     strcpy ((char *)
44a778
                         &OptionalFields[OptionIndex],
44a778
@@ -468,13 +478,20 @@ RsDoWordBusNumberDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        (UINT64) Descriptor->Address16.Minimum,
44a778
-        (UINT64) Descriptor->Address16.Maximum,
44a778
-        (UINT64) Descriptor->Address16.AddressLength,
44a778
-        (UINT64) Descriptor->Address16.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->Address16.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
44a778
         OptionIndex + StringLength;
44a778
     return (Rnode);
44a778
@@ -507,6 +524,12 @@ RsDoWordSpaceDescriptor (
44a778
     UINT8                   *OptionalFields;
44a778
     UINT16                  StringLength = 0;
44a778
     UINT32                  OptionIndex = 0;
44a778
+    UINT16                  Minimum = 0;
44a778
+    UINT16                  Maximum = 0;
44a778
+    UINT16                  AddressLength = 0;
44a778
+    UINT16                  Granularity = 0;
44a778
+    UINT16                  TranslationOffset = 0;
44a778
+    UINT16                  ResourceLength = 0;
44a778
     UINT32                  CurrentByteOffset;
44a778
     UINT32                  i;
44a778
     BOOLEAN                 ResSourceIndex = FALSE;
44a778
@@ -527,8 +550,7 @@ RsDoWordSpaceDescriptor (
44a778
      * optional fields present
44a778
      */
44a778
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
44a778
-    Descriptor->Address16.ResourceLength = (UINT16)
44a778
-        (sizeof (AML_RESOURCE_ADDRESS16) -
44a778
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
44a778
          sizeof (AML_RESOURCE_LARGE_HEADER));
44a778
 
44a778
     /* Process all child initialization nodes */
44a778
@@ -577,8 +599,7 @@ RsDoWordSpaceDescriptor (
44a778
 
44a778
         case 6: /* Address Granularity */
44a778
 
44a778
-            Descriptor->Address16.Granularity =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
44a778
             GranOp = InitializerOp;
44a778
@@ -586,8 +607,7 @@ RsDoWordSpaceDescriptor (
44a778
 
44a778
         case 7: /* Min Address */
44a778
 
44a778
-            Descriptor->Address16.Minimum =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
44a778
             MinOp = InitializerOp;
44a778
@@ -595,8 +615,7 @@ RsDoWordSpaceDescriptor (
44a778
 
44a778
         case 8: /* Max Address */
44a778
 
44a778
-            Descriptor->Address16.Maximum =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
44a778
             MaxOp = InitializerOp;
44a778
@@ -604,16 +623,14 @@ RsDoWordSpaceDescriptor (
44a778
 
44a778
         case 9: /* Translation Offset */
44a778
 
44a778
-            Descriptor->Address16.TranslationOffset =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
44a778
             break;
44a778
 
44a778
         case 10: /* Address Length */
44a778
 
44a778
-            Descriptor->Address16.AddressLength =
44a778
-                (UINT16) InitializerOp->Asl.Value.Integer;
44a778
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
44a778
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
44a778
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
44a778
             LengthOp = InitializerOp;
44a778
@@ -625,7 +642,7 @@ RsDoWordSpaceDescriptor (
44a778
             {
44a778
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
44a778
                 OptionIndex++;
44a778
-                Descriptor->Address16.ResourceLength++;
44a778
+                ResourceLength++;
44a778
                 ResSourceIndex = TRUE;
44a778
             }
44a778
             break;
44a778
@@ -637,8 +654,7 @@ RsDoWordSpaceDescriptor (
44a778
             {
44a778
                 if (StringLength)
44a778
                 {
44a778
-                    Descriptor->Address16.ResourceLength = (UINT16)
44a778
-                        (Descriptor->Address16.ResourceLength + StringLength);
44a778
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
44a778
 
44a778
                     strcpy ((char *)
44a778
                         &OptionalFields[OptionIndex],
44a778
@@ -684,13 +700,20 @@ RsDoWordSpaceDescriptor (
44a778
     /* Validate the Min/Max/Len/Gran values */
44a778
 
44a778
     RsLargeAddressCheck (
44a778
-        (UINT64) Descriptor->Address16.Minimum,
44a778
-        (UINT64) Descriptor->Address16.Maximum,
44a778
-        (UINT64) Descriptor->Address16.AddressLength,
44a778
-        (UINT64) Descriptor->Address16.Granularity,
44a778
+        Minimum,
44a778
+        Maximum,
44a778
+        AddressLength,
44a778
+        Granularity,
44a778
         Descriptor->Address16.Flags,
44a778
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
44a778
 
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
44a778
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
44a778
+
44a778
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
44a778
         OptionIndex + StringLength;
44a778
     return (Rnode);
44a778
diff --git a/source/include/acmacros.h b/source/include/acmacros.h
44a778
index 21256cb..3649ff0 100644
44a778
--- a/source/include/acmacros.h
44a778
+++ b/source/include/acmacros.h
44a778
@@ -100,7 +100,8 @@
44a778
 
44a778
 /* 32-bit source, 16/32/64 destination */
44a778
 
44a778
-#define ACPI_MOVE_32_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
44a778
+#define ACPI_MOVE_32_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
44a778
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];}
44a778
 
44a778
 #define ACPI_MOVE_32_TO_32(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
44a778
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\
44a778
@@ -115,9 +116,13 @@
44a778
 
44a778
 /* 64-bit source, 16/32/64 destination */
44a778
 
44a778
-#define ACPI_MOVE_64_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
44a778
+#define ACPI_MOVE_64_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
44a778
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];}
44a778
 
44a778
-#define ACPI_MOVE_64_TO_32(d, s)        ACPI_MOVE_32_TO_32(d, s)    /* Truncate to 32 */
44a778
+#define ACPI_MOVE_64_TO_32(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
44a778
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
44a778
+                                         ((  UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\
44a778
+                                         ((  UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];}
44a778
 
44a778
 #define ACPI_MOVE_64_TO_64(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
44a778
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
44a778
@@ -144,7 +149,9 @@
44a778
 
44a778
 /* 32-bit source, 16/32/64 destination */
44a778
 
44a778
-#define ACPI_MOVE_32_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
44a778
+#define ACPI_MOVE_32_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
44a778
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
44a778
+
44a778
 #define ACPI_MOVE_32_TO_32(d, s)        *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
44a778
 #define ACPI_MOVE_32_TO_64(d, s)        *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s)
44a778
 
44a778
diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h
44a778
index bd45cdb..3eeb572 100644
44a778
--- a/source/include/platform/aclinux.h
44a778
+++ b/source/include/platform/aclinux.h
44a778
@@ -178,6 +178,7 @@
44a778
 #include <stdlib.h>
44a778
 #include <ctype.h>
44a778
 #include <unistd.h>
44a778
+#include <endian.h>
44a778
 
44a778
 /* Define/disable kernel-specific declarators */
44a778
 
44a778
@@ -190,8 +191,7 @@
44a778
 #define ACPI_FLUSH_CPU_CACHE()
44a778
 #define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread))
44a778
 
44a778
-#if defined(__ia64__)    || defined(__x86_64__) ||\
44a778
-    defined(__aarch64__) || defined(__PPC64__)
44a778
+#if __SIZEOF_LONG__ == 8
44a778
 #define ACPI_MACHINE_WIDTH          64
44a778
 #define COMPILER_DEPENDENT_INT64    long
44a778
 #define COMPILER_DEPENDENT_UINT64   unsigned long
44a778
@@ -202,6 +202,10 @@
44a778
 #define ACPI_USE_NATIVE_DIVIDE
44a778
 #endif
44a778
 
44a778
+#if __BYTE_ORDER == __BIG_ENDIAN
44a778
+#define ACPI_BIG_ENDIAN
44a778
+#endif
44a778
+
44a778
 #ifndef __cdecl
44a778
 #define __cdecl
44a778
 #endif