Blame SOURCES/debian-big_endian.patch

32dd66
Patch carried over from the prior iasl package and updated.  This allows
32dd66
for builds on big endian systems and cleans up endianness.  Please see
32dd66
http://lists.acpica.org/pipermail/devel/2010-July/000159.html.  Resolves
32dd66
BZ#865013 and BZ#856856.
32dd66
--
32dd66
32dd66
Support compiling DSDT tables on big endian architectures.
32dd66
32dd66
use the ACPI_MOVE_<N>_TO_<M> macros to swap the data written to the AML file on
32dd66
big endian architectures (the macros themselves required a few fixes to work
32dd66
correctly).
32dd66
In some areas the use of temporary variables was necessary to be able to perform
32dd66
sanity checks on the data before actually swapping the bytes.
32dd66
32dd66
Signed-off-by: Mattia Dongili <malattia@linux.it>
32dd66
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
32dd66
---
32dd66
 source/compiler/aslcodegen.c      | 108 +++++++++++++++++-------------
32dd66
 source/compiler/aslopcodes.c      |   4 +-
32dd66
 source/compiler/aslrestype1.c     |  69 ++++++++++++++------
32dd66
 source/compiler/aslrestype1i.c    |  38 +++++++----
32dd66
 source/compiler/aslrestype2.c     |  25 ++++---
32dd66
 source/compiler/aslrestype2d.c    | 134 +++++++++++++++++++++-----------------
32dd66
 source/compiler/aslrestype2e.c    | 117 +++++++++++++++++++++++----------
32dd66
 source/compiler/aslrestype2q.c    | 117 +++++++++++++++++++++------------
32dd66
 source/compiler/aslrestype2s.c    |  86 +++++++++++++++++-------
32dd66
 source/compiler/aslrestype2w.c    | 127 +++++++++++++++++++++---------------
32dd66
 source/include/acmacros.h         |  15 +++--
32dd66
 source/include/platform/aclinux.h |   7 +-
32dd66
 12 file modificati, 541 inserzioni(+), 306 rimozioni(-)
32dd66
32dd66
diff --git a/source/compiler/aslcodegen.c b/source/compiler/aslcodegen.c
32dd66
index 2252ab4..c3c3e06 100644
32dd66
--- a/source/compiler/aslcodegen.c
32dd66
+++ b/source/compiler/aslcodegen.c
32dd66
@@ -238,16 +238,12 @@ CgWriteAmlOpcode (
32dd66
     ACPI_PARSE_OBJECT       *Op)
32dd66
 {
32dd66
     UINT8                   PkgLenFirstByte;
32dd66
-    UINT32                  i;
32dd66
-    union {
32dd66
-        UINT16                  Opcode;
32dd66
-        UINT8                   OpcodeBytes[2];
32dd66
-    } Aml;
32dd66
-    union {
32dd66
-        UINT32                  Len;
32dd66
-        UINT8                   LenBytes[4];
32dd66
-    } PkgLen;
32dd66
-
32dd66
+    UINT8                   Byte;
32dd66
+    UINT16                  Word;
32dd66
+    UINT32                  DWord;
32dd66
+    UINT64                  QWord;
32dd66
+    UINT16                  AmlOpcode;
32dd66
+    UINT32                  PkgLen;
32dd66
 
32dd66
     /* We expect some DEFAULT_ARGs, just ignore them */
32dd66
 
32dd66
@@ -270,51 +266,52 @@
32dd66
 
32dd66
         /* Special opcodes for within a field definition */
32dd66
 
32dd66
-        Aml.Opcode = AML_FIELD_OFFSET_OP;
32dd66
+        AmlOpcode = AML_FIELD_OFFSET_OP;
32dd66
         break;
32dd66
 
32dd66
     case AML_INT_ACCESSFIELD_OP:
32dd66
 
32dd66
-        Aml.Opcode = AML_FIELD_ACCESS_OP;
32dd66
+        AmlOpcode = AML_FIELD_ACCESS_OP;
32dd66
         break;
32dd66
 
32dd66
     case AML_INT_CONNECTION_OP:
32dd66
 
32dd66
-        Aml.Opcode = AML_FIELD_CONNECTION_OP;
32dd66
+        AmlOpcode = AML_FIELD_CONNECTION_OP;
32dd66
         break;
32dd66
 
32dd66
     default:
32dd66
 
32dd66
-        Aml.Opcode = Op->Asl.AmlOpcode;
32dd66
+        AmlOpcode = Op->Asl.AmlOpcode;
32dd66
         break;
32dd66
     }
32dd66
 
32dd66
 
32dd66
-    switch (Aml.Opcode)
32dd66
+    switch (AmlOpcode)
32dd66
     {
32dd66
     case AML_PACKAGE_LENGTH:
32dd66
 
32dd66
         /* Value is the length to be encoded (Used in field definitions) */
32dd66
 
32dd66
-        PkgLen.Len = (UINT32) Op->Asl.Value.Integer;
32dd66
+        PkgLen = (UINT32) Op->Asl.Value.Integer;
32dd66
         break;
32dd66
 
32dd66
     default:
32dd66
 
32dd66
         /* Check for two-byte opcode */
32dd66
 
32dd66
-        if (Aml.Opcode > 0x00FF)
32dd66
+        if (AmlOpcode > 0x00FF)
32dd66
         {
32dd66
             /* Write the high byte first */
32dd66
-
32dd66
-            CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[1], 1);
32dd66
+	    Byte = ACPI_HIBYTE(AmlOpcode);
32dd66
+	    CgLocalWriteAmlData (Op, &Byte, 1);
32dd66
         }
32dd66
 
32dd66
-        CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[0], 1);
32dd66
+	Byte = ACPI_LOBYTE(AmlOpcode);
32dd66
+        CgLocalWriteAmlData (Op, &Byte, 1);
32dd66
 
32dd66
         /* Subtreelength doesn't include length of package length bytes */
32dd66
 
32dd66
-        PkgLen.Len = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
32dd66
+        PkgLen = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
32dd66
         break;
32dd66
     }
32dd66
 
32dd66
@@ -325,8 +321,8 @@ CgWriteAmlOpcode (
32dd66
         if (Op->Asl.AmlPkgLenBytes == 1)
32dd66
         {
32dd66
             /* Simplest case -- no bytes to follow, just write the count */
32dd66
-
32dd66
-            CgLocalWriteAmlData (Op, &PkgLen.LenBytes[0], 1);
32dd66
+            Byte = ACPI_LOBYTE(PkgLen);
32dd66
+            CgLocalWriteAmlData (Op, &Byte, 1);
32dd66
         }
32dd66
         else if (Op->Asl.AmlPkgLenBytes != 0)
32dd66
         {
32dd66
@@ -336,7 +332,7 @@ CgWriteAmlOpcode (
32dd66
              */
32dd66
             PkgLenFirstByte = (UINT8)
32dd66
                 (((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) |
32dd66
-                (PkgLen.LenBytes[0] & 0x0F));
32dd66
+                (PkgLen & 0x0F));
32dd66
 
32dd66
             CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1);
32dd66
 
32dd66
@@ -344,37 +340,44 @@ CgWriteAmlOpcode (
32dd66
              * Shift the length over by the 4 bits we just stuffed
32dd66
              * in the first byte
32dd66
              */
32dd66
-            PkgLen.Len >>= 4;
32dd66
+            PkgLen >>= 4;
32dd66
 
32dd66
             /* Now we can write the remaining bytes - either 1, 2, or 3 bytes */
32dd66
-
32dd66
-            for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++)
32dd66
+            Byte = ACPI_LOBYTE(PkgLen);
32dd66
+            CgLocalWriteAmlData (Op, &Byte, 1);
32dd66
+            if (Op->Asl.AmlPkgLenBytes >= 3)
32dd66
+            {
32dd66
+                Byte = ACPI_HIBYTE(PkgLen);
32dd66
+                CgLocalWriteAmlData (Op, &Byte, 1);
32dd66
+            }
32dd66
+            if (Op->Asl.AmlPkgLenBytes >= 4)
32dd66
             {
32dd66
-                CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1);
32dd66
+                Byte = ACPI_LOBYTE(ACPI_HIWORD(PkgLen));
32dd66
+                CgLocalWriteAmlData (Op, &Byte, 1);
32dd66
             }
32dd66
         }
32dd66
     }
32dd66
 
32dd66
-    switch (Aml.Opcode)
32dd66
+    switch (AmlOpcode)
32dd66
     {
32dd66
     case AML_BYTE_OP:
32dd66
-
32dd66
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 1);
32dd66
+        Byte = (UINT8) Op->Asl.Value.Integer;
32dd66
+        CgLocalWriteAmlData (Op, &Byte, 1);
32dd66
         break;
32dd66
 
32dd66
     case AML_WORD_OP:
32dd66
-
32dd66
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 2);
32dd66
+        ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
32dd66
+        CgLocalWriteAmlData (Op, &Word, 2);
32dd66
        break;
32dd66
 
32dd66
     case AML_DWORD_OP:
32dd66
-
32dd66
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 4);
32dd66
+        ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
32dd66
+        CgLocalWriteAmlData (Op, &DWord, 4);
32dd66
         break;
32dd66
 
32dd66
     case AML_QWORD_OP:
32dd66
-
32dd66
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 8);
32dd66
+        ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
32dd66
+        CgLocalWriteAmlData (Op, &QWord, 8);
32dd66
         break;
32dd66
 
32dd66
     case AML_STRING_OP:
32dd66
@@ -408,6 +409,7 @@ CgWriteTableHeader (
32dd66
     ACPI_PARSE_OBJECT       *Op)
32dd66
 {
32dd66
     ACPI_PARSE_OBJECT       *Child;
32dd66
+    UINT32 DWord;
32dd66
 
32dd66
 
32dd66
     /* AML filename */
32dd66
@@ -444,7 +446,7 @@ CgWriteTableHeader (
32dd66
     /* OEM Revision */
32dd66
 
32dd66
     Child = Child->Asl.Next;
32dd66
-    TableHeader.OemRevision = (UINT32) Child->Asl.Value.Integer;
32dd66
+    ACPI_MOVE_64_TO_32(&TableHeader.OemRevision, &Child->Asl.Value.Integer);
32dd66
 
32dd66
     /* Compiler ID */
32dd66
 
32dd66
@@ -452,11 +453,12 @@ CgWriteTableHeader (
32dd66
 
32dd66
     /* Compiler version */
32dd66
 
32dd66
-    TableHeader.AslCompilerRevision = ASL_REVISION;
32dd66
+    DWord = ASL_REVISION;
32dd66
+    ACPI_MOVE_32_TO_32(&TableHeader.AslCompilerRevision, &DWord);
32dd66
 
32dd66
     /* Table length. Checksum zero for now, will rewrite later */
32dd66
 
32dd66
-    TableHeader.Length   = Gbl_TableLength;
32dd66
+    ACPI_MOVE_32_TO_32(&TableHeader.Length, &Gbl_TableLength);
32dd66
     TableHeader.Checksum = 0;
32dd66
 
32dd66
     CgLocalWriteAmlData (Op, &TableHeader, sizeof (ACPI_TABLE_HEADER));
32dd66
@@ -520,7 +523,10 @@ CgWriteNode (
32dd66
     ACPI_PARSE_OBJECT       *Op)
32dd66
 {
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
-
32dd66
+    UINT8                   Byte;
32dd66
+    UINT16                  Word;
32dd66
+    UINT32                  DWord;
32dd66
+    UINT64                  QWord;
32dd66
 
32dd66
     /* Always check for DEFAULT_ARG and other "Noop" nodes */
32dd66
     /* TBD: this may not be the best place for this check */
32dd66
@@ -538,13 +544,24 @@ CgWriteNode (
32dd66
     switch (Op->Asl.AmlOpcode)
32dd66
     {
32dd66
     case AML_RAW_DATA_BYTE:
32dd66
+        Byte = (UINT8) Op->Asl.Value.Integer;
32dd66
+        CgLocalWriteAmlData (Op, &Byte, 1);
32dd66
+        return;
32dd66
+
32dd66
     case AML_RAW_DATA_WORD:
32dd66
-    case AML_RAW_DATA_DWORD:
32dd66
-    case AML_RAW_DATA_QWORD:
32dd66
+        ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
32dd66
+        CgLocalWriteAmlData (Op, &Word, 2);
32dd66
+        return;
32dd66
 
32dd66
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, Op->Asl.AmlLength);
32dd66
+    case AML_RAW_DATA_DWORD:
32dd66
+        ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
32dd66
+        CgLocalWriteAmlData (Op, &DWord, 4);
32dd66
         return;
32dd66
 
32dd66
+    case AML_RAW_DATA_QWORD:
32dd66
+        ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
32dd66
+        CgLocalWriteAmlData (Op, &QWord, 8);
32dd66
+        return;
32dd66
 
32dd66
     case AML_RAW_DATA_BUFFER:
32dd66
 
32dd66
diff --git a/source/compiler/aslopcodes.c b/source/compiler/aslopcodes.c
32dd66
index cddc945..6deddc9 100644
32dd66
--- a/source/compiler/aslopcodes.c
32dd66
+++ b/source/compiler/aslopcodes.c
32dd66
@@ -476,6 +475,7 @@ OpcDoUnicode (
32dd66
     UINT32                  i;
32dd66
     UINT8                   *AsciiString;
32dd66
     UINT16                  *UnicodeString;
32dd66
+    UINT16                  UChar;
32dd66
     ACPI_PARSE_OBJECT       *BufferLengthOp;
32dd66
 
32dd66
 
32dd66
@@ -502,7 +502,8 @@ OpcDoUnicode (
32dd66
 
32dd66
     for (i = 0; i < Count; i++)
32dd66
     {
32dd66
-        UnicodeString[i] = (UINT16) AsciiString[i];
32dd66
+        UChar = (UINT16) AsciiString[i];
32dd66
+        ACPI_MOVE_16_TO_16(&UnicodeString[i], &UChar);
32dd66
     }
32dd66
 
32dd66
     /*
32dd66
diff --git a/source/compiler/aslrestype1.c b/source/compiler/aslrestype1.c
32dd66
index 5b92151..b1fa5f5 100644
32dd66
--- a/source/compiler/aslrestype1.c
32dd66
+++ b/source/compiler/aslrestype1.c
32dd66
@@ -152,6 +152,11 @@ RsDoMemory24Descriptor (
32dd66
     ACPI_PARSE_OBJECT       *MaxOp = NULL;
32dd66
     ACPI_PARSE_OBJECT       *LengthOp = NULL;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
+    UINT16                  Minimum = 0;
32dd66
+    UINT16                  Maximum = 0;
32dd66
+    UINT16                  AddressLength = 0;
32dd66
+    UINT16                  Alignment = 0;
32dd66
+    UINT16                  ResourceLength;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -160,7 +165,8 @@ RsDoMemory24Descriptor (
32dd66
 
32dd66
     Descriptor = Rnode->Buffer;
32dd66
     Descriptor->Memory24.DescriptorType  = ACPI_RESOURCE_NAME_MEMORY24;
32dd66
-    Descriptor->Memory24.ResourceLength = 9;
32dd66
+    ResourceLength = 9;
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.ResourceLength, &ResourceLength);
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
 
32dd66
@@ -177,7 +183,7 @@ RsDoMemory24Descriptor (
32dd66
 
32dd66
         case 1: /* Min Address */
32dd66
 
32dd66
-            Descriptor->Memory24.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -185,7 +191,7 @@ RsDoMemory24Descriptor (
32dd66
 
32dd66
         case 2: /* Max Address */
32dd66
 
32dd66
-            Descriptor->Memory24.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -193,14 +199,14 @@ RsDoMemory24Descriptor (
32dd66
 
32dd66
         case 3: /* Alignment */
32dd66
 
32dd66
-            Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment));
32dd66
             break;
32dd66
 
32dd66
         case 4: /* Length */
32dd66
 
32dd66
-            Descriptor->Memory24.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -223,12 +229,17 @@ RsDoMemory24Descriptor (
32dd66
     /* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */
32dd66
 
32dd66
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24,
32dd66
-        Descriptor->Memory24.Minimum,
32dd66
-        Descriptor->Memory24.Maximum,
32dd66
-        Descriptor->Memory24.AddressLength,
32dd66
-        Descriptor->Memory24.Alignment,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Alignment,
32dd66
         MinOp, MaxOp, LengthOp, NULL, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Alignment, &Alignment);
32dd66
+
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -259,6 +270,11 @@ RsDoMemory32Descriptor (
32dd66
     ACPI_PARSE_OBJECT       *LengthOp = NULL;
32dd66
     ACPI_PARSE_OBJECT       *AlignOp = NULL;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
+    UINT32                  Minimum = 0;
32dd66
+    UINT32                  Maximum = 0;
32dd66
+    UINT32                  AddressLength = 0;
32dd66
+    UINT32                  Alignment = 0;
32dd66
+    UINT16                  ResourceLength;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -267,7 +283,8 @@ RsDoMemory32Descriptor (
32dd66
 
32dd66
     Descriptor = Rnode->Buffer;
32dd66
     Descriptor->Memory32.DescriptorType  = ACPI_RESOURCE_NAME_MEMORY32;
32dd66
-    Descriptor->Memory32.ResourceLength = 17;
32dd66
+    ResourceLength = 17;
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory32.ResourceLength, &ResourceLength);
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
 
32dd66
@@ -284,7 +301,7 @@ RsDoMemory32Descriptor (
32dd66
 
32dd66
         case 1:  /* Min Address */
32dd66
 
32dd66
-            Descriptor->Memory32.Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -292,7 +309,7 @@ RsDoMemory32Descriptor (
32dd66
 
32dd66
         case 2: /* Max Address */
32dd66
 
32dd66
-            Descriptor->Memory32.Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -300,7 +317,7 @@ RsDoMemory32Descriptor (
32dd66
 
32dd66
         case 3: /* Alignment */
32dd66
 
32dd66
-            Descriptor->Memory32.Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment));
32dd66
             AlignOp = InitializerOp;
32dd66
@@ -308,7 +325,7 @@ RsDoMemory32Descriptor (
32dd66
 
32dd66
         case 4: /* Length */
32dd66
 
32dd66
-            Descriptor->Memory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -331,12 +348,17 @@ RsDoMemory32Descriptor (
32dd66
     /* Validate the Min/Max/Len/Align values */
32dd66
 
32dd66
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32,
32dd66
-        Descriptor->Memory32.Minimum,
32dd66
-        Descriptor->Memory32.Maximum,
32dd66
-        Descriptor->Memory32.AddressLength,
32dd66
-        Descriptor->Memory32.Alignment,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Alignment,
32dd66
         MinOp, MaxOp, LengthOp, AlignOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Alignment, &Alignment);
32dd66
+
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -363,6 +385,7 @@ RsDoMemory32FixedDescriptor (
32dd66
     AML_RESOURCE            *Descriptor;
32dd66
     ACPI_PARSE_OBJECT       *InitializerOp;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
+    UINT16                  ResourceLength;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -371,7 +394,8 @@ RsDoMemory32FixedDescriptor (
32dd66
 
32dd66
     Descriptor = Rnode->Buffer;
32dd66
     Descriptor->FixedMemory32.DescriptorType  = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
32dd66
-    Descriptor->FixedMemory32.ResourceLength = 9;
32dd66
+    ResourceLength = 9;
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedMemory32.ResourceLength, &ResourceLength);
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
 
32dd66
@@ -388,14 +412,16 @@ RsDoMemory32FixedDescriptor (
32dd66
 
32dd66
         case 1: /* Address */
32dd66
 
32dd66
-            Descriptor->FixedMemory32.Address = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.Address,
32dd66
+                &InitializerOp->Asl.Value.Integer);
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.Address));
32dd66
             break;
32dd66
 
32dd66
         case 2: /* Length */
32dd66
 
32dd66
-            Descriptor->FixedMemory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.AddressLength,
32dd66
+                &InitializerOp->Asl.Value.Integer);
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength));
32dd66
             break;
32dd66
diff --git a/source/compiler/aslrestype1i.c b/source/compiler/aslrestype1i.c
32dd66
index 8335e8f..097eb05 100644
32dd66
--- a/source/compiler/aslrestype1i.c
32dd66
+++ b/source/compiler/aslrestype1i.c
32dd66
@@ -202,6 +202,8 @@ RsDoFixedDmaDescriptor (
32dd66
     AML_RESOURCE            *Descriptor;
32dd66
     ACPI_PARSE_OBJECT       *InitializerOp;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
+    UINT16                  RequestLines = 0;
32dd66
+    UINT16                  Channels = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -220,14 +222,14 @@ RsDoFixedDmaDescriptor (
32dd66
         {
32dd66
         case 0: /* DMA Request Lines [WORD] (_DMA) */
32dd66
 
32dd66
-            Descriptor->FixedDma.RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DMA,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.RequestLines));
32dd66
             break;
32dd66
 
32dd66
         case 1: /* DMA Channel [WORD] (_TYP) */
32dd66
 
32dd66
-            Descriptor->FixedDma.Channels = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Channels = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels));
32dd66
             break;
32dd66
@@ -252,6 +253,9 @@ RsDoFixedDmaDescriptor (
32dd66
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
32dd66
     }
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.RequestLines, &RequestLines);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.Channels, &Channels);
32dd66
+
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -279,6 +283,7 @@ RsDoFixedIoDescriptor (
32dd66
     ACPI_PARSE_OBJECT       *InitializerOp;
32dd66
     ACPI_PARSE_OBJECT       *AddressOp = NULL;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
+    UINT16                  Address = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -297,8 +302,7 @@ RsDoFixedIoDescriptor (
32dd66
         {
32dd66
         case 0: /* Base Address */
32dd66
 
32dd66
-            Descriptor->FixedIo.Address =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Address = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address));
32dd66
             AddressOp = InitializerOp;
32dd66
@@ -328,11 +332,13 @@ RsDoFixedIoDescriptor (
32dd66
 
32dd66
     /* Error checks */
32dd66
 
32dd66
-    if (Descriptor->FixedIo.Address > 0x03FF)
32dd66
+    if (Address > 0x03FF)
32dd66
     {
32dd66
         AslError (ASL_WARNING, ASL_MSG_ISA_ADDRESS, AddressOp, NULL);
32dd66
     }
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedIo.Address, &Address);
32dd66
+
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -363,6 +369,8 @@ RsDoIoDescriptor (
32dd66
     ACPI_PARSE_OBJECT       *LengthOp = NULL;
32dd66
     ACPI_PARSE_OBJECT       *AlignOp = NULL;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
+    UINT16                  Minimum = 0;
32dd66
+    UINT16                  Maximum = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -388,8 +396,7 @@ RsDoIoDescriptor (
32dd66
 
32dd66
         case 1:  /* Min Address */
32dd66
 
32dd66
-            Descriptor->Io.Minimum =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -397,8 +404,7 @@ RsDoIoDescriptor (
32dd66
 
32dd66
         case 2: /* Max Address */
32dd66
 
32dd66
-            Descriptor->Io.Maximum =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -439,12 +445,15 @@ RsDoIoDescriptor (
32dd66
     /* Validate the Min/Max/Len/Align values */
32dd66
 
32dd66
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO,
32dd66
-        Descriptor->Io.Minimum,
32dd66
-        Descriptor->Io.Maximum,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
         Descriptor->Io.AddressLength,
32dd66
         Descriptor->Io.Alignment,
32dd66
         MinOp, MaxOp, LengthOp, AlignOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Io.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Io.Maximum, &Maximum);
32dd66
+
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -565,9 +574,9 @@ RsDoIrqDescriptor (
32dd66
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
32dd66
     }
32dd66
 
32dd66
-    /* Now we can set the channel mask */
32dd66
+    /* Now we can set the interrupt mask */
32dd66
 
32dd66
-    Descriptor->Irq.IrqMask = IrqMask;
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -667,6 +676,6 @@ RsDoIrqNoFlagsDescriptor (
32dd66
 
32dd66
     /* Now we can set the interrupt mask */
32dd66
 
32dd66
-    Descriptor->Irq.IrqMask = IrqMask;
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
32dd66
     return (Rnode);
32dd66
 }
32dd66
diff --git a/source/compiler/aslrestype2.c b/source/compiler/aslrestype2.c
32dd66
index f0de854..b6d8d1d 100644
32dd66
--- a/source/compiler/aslrestype2.c
32dd66
+++ b/source/compiler/aslrestype2.c
32dd66
@@ -79,6 +79,7 @@ RsDoGeneralRegisterDescriptor (
32dd66
     AML_RESOURCE            *Descriptor;
32dd66
     ACPI_PARSE_OBJECT       *InitializerOp;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
+    UINT16                  ResourceLength;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -87,7 +88,9 @@ RsDoGeneralRegisterDescriptor (
32dd66
 
32dd66
     Descriptor = Rnode->Buffer;
32dd66
     Descriptor->GenericReg.DescriptorType = ACPI_RESOURCE_NAME_GENERIC_REGISTER;
32dd66
-    Descriptor->GenericReg.ResourceLength = 12;
32dd66
+    ResourceLength = 12;
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->GenericReg.ResourceLength,
32dd66
+		    &ResourceLength);
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
 
32dd66
@@ -118,7 +121,8 @@ RsDoGeneralRegisterDescriptor (
32dd66
 
32dd66
         case 3: /* Register Address */
32dd66
 
32dd66
-            Descriptor->GenericReg.Address = InitializerOp->Asl.Value.Integer;
32dd66
+	    ACPI_MOVE_64_TO_64(&Descriptor->GenericReg.Address,
32dd66
+			    &InitializerOp->Asl.Value.Integer);
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_ADDRESS,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.Address));
32dd66
             break;
32dd66
@@ -176,6 +180,7 @@ RsDoInterruptDescriptor (
32dd66
     AML_RESOURCE            *Rover = NULL;
32dd66
     ACPI_PARSE_OBJECT       *InitializerOp;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
     UINT16                  StringLength = 0;
32dd66
     UINT32                  OptionIndex = 0;
32dd66
     UINT32                  i;
32dd66
@@ -222,7 +227,7 @@ RsDoInterruptDescriptor (
32dd66
      * Initial descriptor length -- may be enlarged if there are
32dd66
      * optional fields present
32dd66
      */
32dd66
-    Descriptor->ExtendedIrq.ResourceLength  = 2;  /* Flags and table length byte */
32dd66
+    ResourceLength  = 2;  /* Flags and table length byte */
32dd66
     Descriptor->ExtendedIrq.InterruptCount  = 0;
32dd66
 
32dd66
     Rover = ACPI_CAST_PTR (AML_RESOURCE,
32dd66
@@ -330,10 +335,11 @@ RsDoInterruptDescriptor (
32dd66
 
32dd66
             /* Save the integer and move pointer to the next one */
32dd66
 
32dd66
-            Rover->DwordItem = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            ACPI_MOVE_64_TO_32(&Rover->DwordItem,
32dd66
+                &InitializerOp->Asl.Value.Integer);
32dd66
             Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->DwordItem), 4);
32dd66
             Descriptor->ExtendedIrq.InterruptCount++;
32dd66
-            Descriptor->ExtendedIrq.ResourceLength += 4;
32dd66
+            ResourceLength += 4;
32dd66
 
32dd66
             /* Case 7: First interrupt number in list */
32dd66
 
32dd66
@@ -369,7 +376,7 @@ RsDoInterruptDescriptor (
32dd66
     {
32dd66
         Rover->ByteItem = ResSourceIndex;
32dd66
         Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->ByteItem), 1);
32dd66
-        Descriptor->ExtendedIrq.ResourceLength += 1;
32dd66
+        ResourceLength += 1;
32dd66
     }
32dd66
 
32dd66
     /* Add optional ResSource string if present */
32dd66
@@ -381,13 +387,14 @@ RsDoInterruptDescriptor (
32dd66
         Rover = ACPI_ADD_PTR (
32dd66
                     AML_RESOURCE, &(Rover->ByteItem), StringLength);
32dd66
 
32dd66
-        Descriptor->ExtendedIrq.ResourceLength = (UINT16)
32dd66
-            (Descriptor->ExtendedIrq.ResourceLength + StringLength);
32dd66
+        ResourceLength = (UINT16) (ResourceLength + StringLength);
32dd66
     }
32dd66
 
32dd66
     Rnode->BufferLength = (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
32dd66
                            ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
32dd66
                            + OptionIndex + StringLength;
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->ExtendedIrq.ResourceLength,
32dd66
+		    &ResourceLength);
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -438,7 +445,7 @@ RsDoVendorLargeDescriptor (
32dd66
 
32dd66
     Descriptor = Rnode->Buffer;
32dd66
     Descriptor->VendorLarge.DescriptorType  = ACPI_RESOURCE_NAME_VENDOR_LARGE;
32dd66
-    Descriptor->VendorLarge.ResourceLength = (UINT16) i;
32dd66
+    ACPI_MOVE_32_TO_16(&Descriptor->VendorLarge.ResourceLength, &i);
32dd66
 
32dd66
     /* Point to end-of-descriptor for vendor data */
32dd66
 
32dd66
diff --git a/source/compiler/aslrestype2d.c b/source/compiler/aslrestype2d.c
32dd66
index 1ca0f2d..5bebd30 100644
32dd66
--- a/source/compiler/aslrestype2d.c
32dd66
+++ b/source/compiler/aslrestype2d.c
32dd66
@@ -83,7 +83,13 @@ RsDoDwordIoDescriptor (
32dd66
     ACPI_PARSE_OBJECT       *GranOp = NULL;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
     UINT16                  StringLength = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
     UINT32                  OptionIndex = 0;
32dd66
+    UINT32                  Minimum = 0;
32dd66
+    UINT32                  Maximum = 0;
32dd66
+    UINT32                  AddressLength = 0;
32dd66
+    UINT32                  Granularity = 0;
32dd66
+    UINT32                  TranslationOffset = 0;
32dd66
     UINT8                   *OptionalFields;
32dd66
     UINT32                  i;
32dd66
     BOOLEAN                 ResSourceIndex = FALSE;
32dd66
@@ -104,8 +110,7 @@ RsDoDwordIoDescriptor (
32dd66
      * optional fields present
32dd66
      */
32dd66
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
32dd66
-    Descriptor->Address32.ResourceLength = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_ADDRESS32) -
32dd66
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
@@ -149,8 +154,7 @@ RsDoDwordIoDescriptor (
32dd66
 
32dd66
         case 5: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->Address32.Granularity =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -158,8 +162,7 @@ RsDoDwordIoDescriptor (
32dd66
 
32dd66
         case 6: /* Address Min */
32dd66
 
32dd66
-            Descriptor->Address32.Minimum =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -167,8 +170,7 @@ RsDoDwordIoDescriptor (
32dd66
 
32dd66
         case 7: /* Address Max */
32dd66
 
32dd66
-            Descriptor->Address32.Maximum =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -176,16 +178,14 @@ RsDoDwordIoDescriptor (
32dd66
 
32dd66
         case 8: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->Address32.TranslationOffset =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 9: /* Address Length */
32dd66
 
32dd66
-            Descriptor->Address32.AddressLength =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -199,7 +199,7 @@ RsDoDwordIoDescriptor (
32dd66
 
32dd66
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
32dd66
                 OptionIndex++;
32dd66
-                Descriptor->Address32.ResourceLength++;
32dd66
+                ResourceLength++;
32dd66
                 ResSourceIndex = TRUE;
32dd66
             }
32dd66
             break;
32dd66
@@ -213,8 +213,7 @@ RsDoDwordIoDescriptor (
32dd66
                 {
32dd66
                     /* Found a valid ResourceSource */
32dd66
 
32dd66
-                    Descriptor->Address32.ResourceLength = (UINT16)
32dd66
-                        (Descriptor->Address32.ResourceLength + StringLength);
32dd66
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
32dd66
 
32dd66
                     strcpy ((char *)
32dd66
                         &OptionalFields[OptionIndex],
32dd66
@@ -274,13 +273,20 @@ RsDoDwordIoDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        (UINT64) Descriptor->Address32.Minimum,
32dd66
-        (UINT64) Descriptor->Address32.Maximum,
32dd66
-        (UINT64) Descriptor->Address32.AddressLength,
32dd66
-        (UINT64) Descriptor->Address32.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->Address32.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
32dd66
                             OptionIndex + StringLength;
32dd66
     return (Rnode);
32dd66
@@ -315,7 +321,13 @@ RsDoDwordMemoryDescriptor (
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
     UINT8                   *OptionalFields;
32dd66
     UINT16                  StringLength = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
     UINT32                  OptionIndex = 0;
32dd66
+    UINT32                  Minimum = 0;
32dd66
+    UINT32                  Maximum = 0;
32dd66
+    UINT32                  AddressLength = 0;
32dd66
+    UINT32                  Granularity = 0;
32dd66
+    UINT32                  TranslationOffset = 0;
32dd66
     UINT32                  i;
32dd66
     BOOLEAN                 ResSourceIndex = FALSE;
32dd66
 
32dd66
@@ -335,11 +347,9 @@ RsDoDwordMemoryDescriptor (
32dd66
      * optional fields present
32dd66
      */
32dd66
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
32dd66
-    Descriptor->Address32.ResourceLength = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_ADDRESS32) -
32dd66
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
 
32dd66
-
32dd66
     /* Process all child initialization nodes */
32dd66
 
32dd66
     for (i = 0; InitializerOp; i++)
32dd66
@@ -388,8 +398,7 @@ RsDoDwordMemoryDescriptor (
32dd66
 
32dd66
         case 6: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->Address32.Granularity =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -397,8 +406,7 @@ RsDoDwordMemoryDescriptor (
32dd66
 
32dd66
         case 7: /* Min Address */
32dd66
 
32dd66
-            Descriptor->Address32.Minimum =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -406,8 +414,7 @@ RsDoDwordMemoryDescriptor (
32dd66
 
32dd66
         case 8: /* Max Address */
32dd66
 
32dd66
-            Descriptor->Address32.Maximum =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -415,16 +422,14 @@ RsDoDwordMemoryDescriptor (
32dd66
 
32dd66
         case 9: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->Address32.TranslationOffset =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 10: /* Address Length */
32dd66
 
32dd66
-            Descriptor->Address32.AddressLength =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -436,7 +441,7 @@ RsDoDwordMemoryDescriptor (
32dd66
             {
32dd66
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
32dd66
                 OptionIndex++;
32dd66
-                Descriptor->Address32.ResourceLength++;
32dd66
+                ResourceLength++;
32dd66
                 ResSourceIndex = TRUE;
32dd66
             }
32dd66
             break;
32dd66
@@ -448,8 +453,8 @@ RsDoDwordMemoryDescriptor (
32dd66
             {
32dd66
                 if (StringLength)
32dd66
                 {
32dd66
-                    Descriptor->Address32.ResourceLength = (UINT16)
32dd66
-                        (Descriptor->Address32.ResourceLength + StringLength);
32dd66
+
32dd66
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
32dd66
 
32dd66
                     strcpy ((char *)
32dd66
                         &OptionalFields[OptionIndex],
32dd66
@@ -510,13 +515,20 @@ RsDoDwordMemoryDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        (UINT64) Descriptor->Address32.Minimum,
32dd66
-        (UINT64) Descriptor->Address32.Maximum,
32dd66
-        (UINT64) Descriptor->Address32.AddressLength,
32dd66
-        (UINT64) Descriptor->Address32.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->Address32.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
32dd66
                             OptionIndex + StringLength;
32dd66
     return (Rnode);
32dd66
@@ -551,7 +563,13 @@ RsDoDwordSpaceDescriptor (
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
     UINT8                   *OptionalFields;
32dd66
     UINT16                  StringLength = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
     UINT32                  OptionIndex = 0;
32dd66
+    UINT32                  Minimum = 0;
32dd66
+    UINT32                  Maximum = 0;
32dd66
+    UINT32                  AddressLength = 0;
32dd66
+    UINT32                  Granularity = 0;
32dd66
+    UINT32                  TranslationOffset = 0;
32dd66
     UINT32                  i;
32dd66
     BOOLEAN                 ResSourceIndex = FALSE;
32dd66
 
32dd66
@@ -570,8 +588,7 @@ RsDoDwordSpaceDescriptor (
32dd66
      * optional fields present
32dd66
      */
32dd66
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
32dd66
-    Descriptor->Address32.ResourceLength = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_ADDRESS32) -
32dd66
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
@@ -620,8 +637,7 @@ RsDoDwordSpaceDescriptor (
32dd66
 
32dd66
         case 6: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->Address32.Granularity =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -629,8 +645,7 @@ RsDoDwordSpaceDescriptor (
32dd66
 
32dd66
         case 7: /* Min Address */
32dd66
 
32dd66
-            Descriptor->Address32.Minimum =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -638,8 +651,7 @@ RsDoDwordSpaceDescriptor (
32dd66
 
32dd66
         case 8: /* Max Address */
32dd66
 
32dd66
-            Descriptor->Address32.Maximum =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -647,16 +661,14 @@ RsDoDwordSpaceDescriptor (
32dd66
 
32dd66
         case 9: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->Address32.TranslationOffset =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 10: /* Address Length */
32dd66
 
32dd66
-            Descriptor->Address32.AddressLength =
32dd66
-                (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -668,7 +680,7 @@ RsDoDwordSpaceDescriptor (
32dd66
             {
32dd66
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
32dd66
                 OptionIndex++;
32dd66
-                Descriptor->Address32.ResourceLength++;
32dd66
+                ResourceLength++;
32dd66
                 ResSourceIndex = TRUE;
32dd66
             }
32dd66
             break;
32dd66
@@ -680,8 +692,7 @@ RsDoDwordSpaceDescriptor (
32dd66
             {
32dd66
                 if (StringLength)
32dd66
                 {
32dd66
-                    Descriptor->Address32.ResourceLength = (UINT16)
32dd66
-                        (Descriptor->Address32.ResourceLength + StringLength);
32dd66
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
32dd66
 
32dd66
                     strcpy ((char *)
32dd66
                         &OptionalFields[OptionIndex],
32dd66
@@ -728,13 +739,20 @@ RsDoDwordSpaceDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        (UINT64) Descriptor->Address32.Minimum,
32dd66
-        (UINT64) Descriptor->Address32.Maximum,
32dd66
-        (UINT64) Descriptor->Address32.AddressLength,
32dd66
-        (UINT64) Descriptor->Address32.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->Address32.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
32dd66
                             OptionIndex + StringLength;
32dd66
     return (Rnode);
32dd66
diff --git a/source/compiler/aslrestype2e.c b/source/compiler/aslrestype2e.c
32dd66
index e5fff47..d701880 100644
32dd66
--- a/source/compiler/aslrestype2e.c
32dd66
+++ b/source/compiler/aslrestype2e.c
32dd66
@@ -82,6 +82,13 @@ RsDoExtendedIoDescriptor (
32dd66
     ACPI_PARSE_OBJECT       *GranOp = NULL;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
     UINT16                  StringLength = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
+    UINT64                  Minimum = 0;
32dd66
+    UINT64                  Maximum = 0;
32dd66
+    UINT64                  AddressLength = 0;
32dd66
+    UINT64                  Granularity = 0;
32dd66
+    UINT64                  TranslationOffset = 0;
32dd66
+    UINT64                  TypeSpecific = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -96,9 +103,10 @@ RsDoExtendedIoDescriptor (
32dd66
     Descriptor->ExtAddress64.ResourceType    = ACPI_ADDRESS_TYPE_IO_RANGE;
32dd66
     Descriptor->ExtAddress64.RevisionID      = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
32dd66
 
32dd66
-    Descriptor->ExtAddress64.ResourceLength  = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
32dd66
+    ResourceLength  = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
32dd66
+        &ResourceLength);
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
 
32dd66
@@ -141,7 +149,7 @@ RsDoExtendedIoDescriptor (
32dd66
 
32dd66
         case 5: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -149,7 +157,7 @@ RsDoExtendedIoDescriptor (
32dd66
 
32dd66
         case 6: /* Address Min */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -157,7 +165,7 @@ RsDoExtendedIoDescriptor (
32dd66
 
32dd66
         case 7: /* Address Max */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -165,14 +173,14 @@ RsDoExtendedIoDescriptor (
32dd66
 
32dd66
         case 8: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 9: /* Address Length */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -180,7 +188,7 @@ RsDoExtendedIoDescriptor (
32dd66
 
32dd66
         case 10: /* Type-Specific Attributes */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
32dd66
+            TypeSpecific = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
32dd66
             break;
32dd66
@@ -216,13 +224,20 @@ RsDoExtendedIoDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        Descriptor->ExtAddress64.Minimum,
32dd66
-        Descriptor->ExtAddress64.Maximum,
32dd66
-        Descriptor->ExtAddress64.AddressLength,
32dd66
-        Descriptor->ExtAddress64.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->ExtAddress64.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength;
32dd66
     return (Rnode);
32dd66
 }
32dd66
@@ -255,6 +270,13 @@ RsDoExtendedMemoryDescriptor (
32dd66
     ACPI_PARSE_OBJECT       *GranOp = NULL;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
     UINT16                  StringLength = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
+    UINT64                  Minimum = 0;
32dd66
+    UINT64                  Maximum = 0;
32dd66
+    UINT64                  AddressLength = 0;
32dd66
+    UINT64                  Granularity = 0;
32dd66
+    UINT64                  TranslationOffset = 0;
32dd66
+    UINT64                  TypeSpecific = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -269,9 +291,10 @@ RsDoExtendedMemoryDescriptor (
32dd66
     Descriptor->ExtAddress64.ResourceType    = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
32dd66
     Descriptor->ExtAddress64.RevisionID      = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
32dd66
 
32dd66
-    Descriptor->ExtAddress64.ResourceLength  = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
32dd66
+    ResourceLength  = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
32dd66
+        &ResourceLength);
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
 
32dd66
@@ -321,7 +344,7 @@ RsDoExtendedMemoryDescriptor (
32dd66
 
32dd66
         case 6: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -329,7 +352,7 @@ RsDoExtendedMemoryDescriptor (
32dd66
 
32dd66
         case 7: /* Min Address */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -337,7 +360,7 @@ RsDoExtendedMemoryDescriptor (
32dd66
 
32dd66
         case 8: /* Max Address */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -345,14 +368,14 @@ RsDoExtendedMemoryDescriptor (
32dd66
 
32dd66
         case 9: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 10: /* Address Length */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -360,7 +383,7 @@ RsDoExtendedMemoryDescriptor (
32dd66
 
32dd66
         case 11: /* Type-Specific Attributes */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
32dd66
+            TypeSpecific = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
32dd66
             break;
32dd66
@@ -397,13 +420,20 @@ RsDoExtendedMemoryDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        Descriptor->ExtAddress64.Minimum,
32dd66
-        Descriptor->ExtAddress64.Maximum,
32dd66
-        Descriptor->ExtAddress64.AddressLength,
32dd66
-        Descriptor->ExtAddress64.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->ExtAddress64.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength;
32dd66
     return (Rnode);
32dd66
 }
32dd66
@@ -436,6 +466,13 @@ RsDoExtendedSpaceDescriptor (
32dd66
     ACPI_PARSE_OBJECT       *GranOp = NULL;
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
     UINT16                  StringLength = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
+    UINT64                  Minimum = 0;
32dd66
+    UINT64                  Maximum = 0;
32dd66
+    UINT64                  AddressLength = 0;
32dd66
+    UINT64                  Granularity = 0;
32dd66
+    UINT64                  TranslationOffset = 0;
32dd66
+    UINT64                  TypeSpecific = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -449,9 +486,10 @@ RsDoExtendedSpaceDescriptor (
32dd66
     Descriptor->ExtAddress64.DescriptorType  = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
32dd66
     Descriptor->ExtAddress64.RevisionID      = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
32dd66
 
32dd66
-    Descriptor->ExtAddress64.ResourceLength  = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
32dd66
+    ResourceLength  = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
32dd66
+        &ResourceLength);
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
 
32dd66
@@ -499,7 +537,7 @@ RsDoExtendedSpaceDescriptor (
32dd66
 
32dd66
         case 6: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -507,7 +545,7 @@ RsDoExtendedSpaceDescriptor (
32dd66
 
32dd66
         case 7: /* Min Address */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -515,7 +553,7 @@ RsDoExtendedSpaceDescriptor (
32dd66
 
32dd66
         case 8: /* Max Address */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -523,14 +561,14 @@ RsDoExtendedSpaceDescriptor (
32dd66
 
32dd66
         case 9: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 10: /* Address Length */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -538,7 +576,7 @@ RsDoExtendedSpaceDescriptor (
32dd66
 
32dd66
         case 11: /* Type-Specific Attributes */
32dd66
 
32dd66
-            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
32dd66
+            TypeSpecific = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
32dd66
             break;
32dd66
@@ -560,13 +598,20 @@ RsDoExtendedSpaceDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        Descriptor->ExtAddress64.Minimum,
32dd66
-        Descriptor->ExtAddress64.Maximum,
32dd66
-        Descriptor->ExtAddress64.AddressLength,
32dd66
-        Descriptor->ExtAddress64.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->ExtAddress64.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength;
32dd66
     return (Rnode);
32dd66
 }
32dd66
diff --git a/source/compiler/aslrestype2q.c b/source/compiler/aslrestype2q.c
32dd66
index 65c242a..c92d545 100644
32dd66
--- a/source/compiler/aslrestype2q.c
32dd66
+++ b/source/compiler/aslrestype2q.c
32dd66
@@ -84,7 +84,13 @@ RsDoQwordIoDescriptor (
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
     UINT8                   *OptionalFields;
32dd66
     UINT16                  StringLength = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
     UINT32                  OptionIndex = 0;
32dd66
+    UINT64                  Minimum = 0;
32dd66
+    UINT64                  Maximum = 0;
32dd66
+    UINT64                  AddressLength = 0;
32dd66
+    UINT64                  Granularity = 0;
32dd66
+    UINT64                  TranslationOffset = 0;
32dd66
     UINT32                  i;
32dd66
     BOOLEAN                 ResSourceIndex = FALSE;
32dd66
 
32dd66
@@ -104,8 +110,7 @@ RsDoQwordIoDescriptor (
32dd66
      * optional fields present
32dd66
      */
32dd66
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
32dd66
-    Descriptor->Address64.ResourceLength = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_ADDRESS64) -
32dd66
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
@@ -149,7 +154,7 @@ RsDoQwordIoDescriptor (
32dd66
 
32dd66
         case 5: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -157,7 +162,7 @@ RsDoQwordIoDescriptor (
32dd66
 
32dd66
         case 6: /* Address Min */
32dd66
 
32dd66
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -165,7 +170,7 @@ RsDoQwordIoDescriptor (
32dd66
 
32dd66
         case 7: /* Address Max */
32dd66
 
32dd66
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -173,14 +178,14 @@ RsDoQwordIoDescriptor (
32dd66
 
32dd66
         case 8: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 9: /* Address Length */
32dd66
 
32dd66
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -192,7 +197,7 @@ RsDoQwordIoDescriptor (
32dd66
             {
32dd66
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
32dd66
                 OptionIndex++;
32dd66
-                Descriptor->Address64.ResourceLength++;
32dd66
+                ResourceLength++;
32dd66
                 ResSourceIndex = TRUE;
32dd66
             }
32dd66
             break;
32dd66
@@ -204,8 +209,7 @@ RsDoQwordIoDescriptor (
32dd66
             {
32dd66
                 if (StringLength)
32dd66
                 {
32dd66
-                    Descriptor->Address64.ResourceLength = (UINT16)
32dd66
-                        (Descriptor->Address64.ResourceLength + StringLength);
32dd66
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
32dd66
 
32dd66
                     strcpy ((char *)
32dd66
                         &OptionalFields[OptionIndex],
32dd66
@@ -265,13 +269,20 @@ RsDoQwordIoDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        Descriptor->Address64.Minimum,
32dd66
-        Descriptor->Address64.Maximum,
32dd66
-        Descriptor->Address64.AddressLength,
32dd66
-        Descriptor->Address64.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->Address64.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
32dd66
                             OptionIndex + StringLength;
32dd66
     return (Rnode);
32dd66
@@ -306,7 +317,13 @@ RsDoQwordMemoryDescriptor (
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
     UINT8                   *OptionalFields;
32dd66
     UINT16                  StringLength = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
     UINT32                  OptionIndex = 0;
32dd66
+    UINT64                  Minimum = 0;
32dd66
+    UINT64                  Maximum = 0;
32dd66
+    UINT64                  AddressLength = 0;
32dd66
+    UINT64                  Granularity = 0;
32dd66
+    UINT64                  TranslationOffset = 0;
32dd66
     UINT32                  i;
32dd66
     BOOLEAN                 ResSourceIndex = FALSE;
32dd66
 
32dd66
@@ -326,8 +343,7 @@ RsDoQwordMemoryDescriptor (
32dd66
      * optional fields present
32dd66
      */
32dd66
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
32dd66
-    Descriptor->Address64.ResourceLength = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_ADDRESS64) -
32dd66
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
@@ -378,7 +394,7 @@ RsDoQwordMemoryDescriptor (
32dd66
 
32dd66
         case 6: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -386,7 +402,7 @@ RsDoQwordMemoryDescriptor (
32dd66
 
32dd66
         case 7: /* Min Address */
32dd66
 
32dd66
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -394,7 +410,7 @@ RsDoQwordMemoryDescriptor (
32dd66
 
32dd66
         case 8: /* Max Address */
32dd66
 
32dd66
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -402,14 +418,14 @@ RsDoQwordMemoryDescriptor (
32dd66
 
32dd66
         case 9: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 10: /* Address Length */
32dd66
 
32dd66
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -421,7 +437,7 @@ RsDoQwordMemoryDescriptor (
32dd66
             {
32dd66
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
32dd66
                 OptionIndex++;
32dd66
-                Descriptor->Address64.ResourceLength++;
32dd66
+                ResourceLength++;
32dd66
                 ResSourceIndex = TRUE;
32dd66
             }
32dd66
             break;
32dd66
@@ -433,8 +449,7 @@ RsDoQwordMemoryDescriptor (
32dd66
             {
32dd66
                 if (StringLength)
32dd66
                 {
32dd66
-                    Descriptor->Address64.ResourceLength = (UINT16)
32dd66
-                        (Descriptor->Address64.ResourceLength + StringLength);
32dd66
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
32dd66
 
32dd66
                     strcpy ((char *)
32dd66
                         &OptionalFields[OptionIndex],
32dd66
@@ -495,13 +510,20 @@ RsDoQwordMemoryDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        Descriptor->Address64.Minimum,
32dd66
-        Descriptor->Address64.Maximum,
32dd66
-        Descriptor->Address64.AddressLength,
32dd66
-        Descriptor->Address64.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->Address64.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
32dd66
                             OptionIndex + StringLength;
32dd66
     return (Rnode);
32dd66
@@ -536,8 +558,14 @@ RsDoQwordSpaceDescriptor (
32dd66
     ASL_RESOURCE_NODE       *Rnode;
32dd66
     UINT8                   *OptionalFields;
32dd66
     UINT16                  StringLength = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
     UINT32                  OptionIndex = 0;
32dd66
     UINT32                  i;
32dd66
+    UINT64                  Minimum = 0;
32dd66
+    UINT64                  Maximum = 0;
32dd66
+    UINT64                  AddressLength = 0;
32dd66
+    UINT64                  Granularity = 0;
32dd66
+    UINT64                  TranslationOffset = 0;
32dd66
     BOOLEAN                 ResSourceIndex = FALSE;
32dd66
 
32dd66
 
32dd66
@@ -555,8 +583,7 @@ RsDoQwordSpaceDescriptor (
32dd66
      * optional fields present
32dd66
      */
32dd66
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
32dd66
-    Descriptor->Address64.ResourceLength = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_ADDRESS64) -
32dd66
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
@@ -605,7 +632,7 @@ RsDoQwordSpaceDescriptor (
32dd66
 
32dd66
         case 6: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -613,7 +640,7 @@ RsDoQwordSpaceDescriptor (
32dd66
 
32dd66
         case 7: /* Min Address */
32dd66
 
32dd66
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -621,7 +648,7 @@ RsDoQwordSpaceDescriptor (
32dd66
 
32dd66
         case 8: /* Max Address */
32dd66
 
32dd66
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -629,14 +656,14 @@ RsDoQwordSpaceDescriptor (
32dd66
 
32dd66
         case 9: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 10: /* Address Length */
32dd66
 
32dd66
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -648,7 +675,7 @@ RsDoQwordSpaceDescriptor (
32dd66
             {
32dd66
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
32dd66
                 OptionIndex++;
32dd66
-                Descriptor->Address64.ResourceLength++;
32dd66
+                ResourceLength++;
32dd66
                 ResSourceIndex = TRUE;
32dd66
             }
32dd66
             break;
32dd66
@@ -660,8 +687,7 @@ RsDoQwordSpaceDescriptor (
32dd66
             {
32dd66
                 if (StringLength)
32dd66
                 {
32dd66
-                    Descriptor->Address64.ResourceLength = (UINT16)
32dd66
-                        (Descriptor->Address64.ResourceLength + StringLength);
32dd66
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
32dd66
 
32dd66
                     strcpy ((char *)
32dd66
                         &OptionalFields[OptionIndex],
32dd66
@@ -707,13 +733,20 @@ RsDoQwordSpaceDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        Descriptor->Address64.Minimum,
32dd66
-        Descriptor->Address64.Maximum,
32dd66
-        Descriptor->Address64.AddressLength,
32dd66
-        Descriptor->Address64.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->Address64.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
32dd66
                             OptionIndex + StringLength;
32dd66
     return (Rnode);
32dd66
diff --git a/source/compiler/aslrestype2s.c b/source/compiler/aslrestype2s.c
32dd66
index a9d24cd..4d9c7db 100644
32dd66
--- a/source/compiler/aslrestype2s.c
32dd66
+++ b/source/compiler/aslrestype2s.c
32dd66
@@ -293,6 +293,9 @@ RsDoGpioIntDescriptor (
32dd66
     UINT16                  VendorLength;
32dd66
     UINT16                  InterruptLength;
32dd66
     UINT16                  DescriptorSize;
32dd66
+    UINT16                  IntFlags = 0;
32dd66
+    UINT16                  DebounceTimeout = 0;
32dd66
+    UINT16                  Flags = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -348,21 +351,21 @@ RsDoGpioIntDescriptor (
32dd66
         {
32dd66
         case 0: /* Interrupt Mode - edge/level [Flag] (_MOD) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0);
32dd66
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0);
32dd66
             RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0);
32dd66
             break;
32dd66
 
32dd66
         case 1: /* Interrupt Polarity - Active high/low [Flags] (_POL) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 1, 0);
32dd66
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 1, 0);
32dd66
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_POLARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 1, 2);
32dd66
             break;
32dd66
 
32dd66
         case 2: /* Share Type - Default: exclusive (0) [Flags] (_SHR) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0);
32dd66
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0);
32dd66
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3, 2);
32dd66
             break;
32dd66
@@ -376,7 +379,7 @@ RsDoGpioIntDescriptor (
32dd66
 
32dd66
         case 4: /* Debounce Timeout [WORD] (_DBT) */
32dd66
 
32dd66
-            Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
32dd66
             break;
32dd66
@@ -402,7 +405,7 @@ RsDoGpioIntDescriptor (
32dd66
 
32dd66
         case 7: /* Resource Usage (consumer/producer) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
32dd66
+            RsSetFlagBits16 (&Flags, InitializerOp, 0, 1);
32dd66
             break;
32dd66
 
32dd66
         case 8: /* Resource Tag (Descriptor Name) */
32dd66
@@ -466,6 +469,10 @@ RsDoGpioIntDescriptor (
32dd66
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
32dd66
     }
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
32dd66
+
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -499,6 +506,10 @@ RsDoGpioIoDescriptor (
32dd66
     UINT16                  VendorLength;
32dd66
     UINT16                  InterruptLength;
32dd66
     UINT16                  DescriptorSize;
32dd66
+    UINT16                  IntFlags = 0;
32dd66
+    UINT16                  DebounceTimeout = 0;
32dd66
+    UINT16                  DriveStrength = 0;
32dd66
+    UINT16                  Flags = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -554,7 +565,7 @@ RsDoGpioIoDescriptor (
32dd66
         {
32dd66
         case 0: /* Share Type [Flags] (_SHR) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0);
32dd66
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0);
32dd66
             RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3);
32dd66
             break;
32dd66
@@ -568,21 +579,21 @@ RsDoGpioIoDescriptor (
32dd66
 
32dd66
         case 2: /* Debounce Timeout [WORD] (_DBT) */
32dd66
 
32dd66
-            Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
32dd66
             break;
32dd66
 
32dd66
         case 3: /* Drive Strength [WORD] (_DRS) */
32dd66
 
32dd66
-            Descriptor->Gpio.DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DRIVESTRENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DriveStrength));
32dd66
             break;
32dd66
 
32dd66
         case 4: /* I/O Restriction [Flag] (_IOR) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0);
32dd66
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0);
32dd66
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_IORESTRICTION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0, 2);
32dd66
             break;
32dd66
@@ -608,7 +619,7 @@ RsDoGpioIoDescriptor (
32dd66
 
32dd66
         case 7: /* Resource Usage (consumer/producer) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
32dd66
+            RsSetFlagBits16 (&Flags, InitializerOp, 0, 1);
32dd66
             break;
32dd66
 
32dd66
         case 8: /* Resource Tag (Descriptor Name) */
32dd66
@@ -671,6 +683,11 @@ RsDoGpioIoDescriptor (
32dd66
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
32dd66
     }
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DriveStrength, &DriveStrength);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
32dd66
+
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -702,6 +719,9 @@ RsDoI2cSerialBusDescriptor (
32dd66
     UINT16                  ResSourceLength;
32dd66
     UINT16                  VendorLength;
32dd66
     UINT16                  DescriptorSize;
32dd66
+    UINT16                  SlaveAddress = 0;
32dd66
+    UINT32                  ConnectionSpeed = 0;
32dd66
+    UINT16                  TypeSpecificFlags = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -749,7 +769,7 @@ RsDoI2cSerialBusDescriptor (
32dd66
         {
32dd66
         case 0: /* Slave Address [WORD] (_ADR) */
32dd66
 
32dd66
-            Descriptor->I2cSerialBus.SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.SlaveAddress));
32dd66
             break;
32dd66
@@ -763,14 +783,14 @@ RsDoI2cSerialBusDescriptor (
32dd66
 
32dd66
         case 2: /* Connection Speed [DWORD] (_SPE) */
32dd66
 
32dd66
-            Descriptor->I2cSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed));
32dd66
             break;
32dd66
 
32dd66
         case 3: /* Addressing Mode [Flag] (_MOD) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->I2cSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
32dd66
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
32dd66
             RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.TypeSpecificFlags), 0);
32dd66
             break;
32dd66
@@ -818,6 +837,9 @@ RsDoI2cSerialBusDescriptor (
32dd66
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
32dd66
     }
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.SlaveAddress, &SlaveAddress);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->I2cSerialBus.ConnectionSpeed, &ConnectionSpeed);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -849,6 +871,9 @@ RsDoSpiSerialBusDescriptor (
32dd66
     UINT16                  ResSourceLength;
32dd66
     UINT16                  VendorLength;
32dd66
     UINT16                  DescriptorSize;
32dd66
+    UINT16                  DeviceSelection = 0;
32dd66
+    UINT32                  ConnectionSpeed = 0;
32dd66
+    UINT16                  TypeSpecificFlags = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -896,21 +921,21 @@ RsDoSpiSerialBusDescriptor (
32dd66
         {
32dd66
         case 0: /* Device Selection [WORD] (_ADR) */
32dd66
 
32dd66
-            Descriptor->SpiSerialBus.DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.DeviceSelection));
32dd66
             break;
32dd66
 
32dd66
         case 1: /* Device Polarity [Flag] (_DPL) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 1, 0);
32dd66
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 1, 0);
32dd66
             RsCreateBitField (InitializerOp, ACPI_RESTAG_DEVICEPOLARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 1);
32dd66
             break;
32dd66
 
32dd66
         case 2: /* Wire Mode [Flag] (_MOD) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
32dd66
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
32dd66
             RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 0);
32dd66
             break;
32dd66
@@ -931,7 +956,7 @@ RsDoSpiSerialBusDescriptor (
32dd66
 
32dd66
         case 5: /* Connection Speed [DWORD] (_SPE) */
32dd66
 
32dd66
-            Descriptor->SpiSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.ConnectionSpeed));
32dd66
             break;
32dd66
@@ -993,6 +1017,10 @@ RsDoSpiSerialBusDescriptor (
32dd66
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
32dd66
     }
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.DeviceSelection, &DeviceSelection);
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->SpiSerialBus.ConnectionSpeed, &ConnectionSpeed);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
32dd66
+
32dd66
     return (Rnode);
32dd66
 }
32dd66
 
32dd66
@@ -1024,6 +1052,10 @@ RsDoUartSerialBusDescriptor (
32dd66
     UINT16                  ResSourceLength;
32dd66
     UINT16                  VendorLength;
32dd66
     UINT16                  DescriptorSize;
32dd66
+    UINT32                  DefaultBaudRate = 0;
32dd66
+    UINT16                  TypeSpecificFlags = 0;
32dd66
+    UINT16                  RxFifoSize = 0;
32dd66
+    UINT16                  TxFifoSize = 0;
32dd66
     UINT32                  i;
32dd66
 
32dd66
 
32dd66
@@ -1071,21 +1103,21 @@ RsDoUartSerialBusDescriptor (
32dd66
         {
32dd66
         case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */
32dd66
 
32dd66
-            Descriptor->UartSerialBus.DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
+            DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.DefaultBaudRate));
32dd66
             break;
32dd66
 
32dd66
         case 1: /* Bits Per Byte [Flags] (_LEN) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 4, 3);
32dd66
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 4, 3);
32dd66
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 4, 3);
32dd66
             break;
32dd66
 
32dd66
         case 2: /* Stop Bits [Flags] (_STB) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 2, 1);
32dd66
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 2, 1);
32dd66
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_STOPBITS,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 2, 2);
32dd66
             break;
32dd66
@@ -1099,7 +1131,7 @@ RsDoUartSerialBusDescriptor (
32dd66
 
32dd66
         case 4: /* Endianness [Flag] (_END) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 7, 0);
32dd66
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 7, 0);
32dd66
             RsCreateBitField (InitializerOp, ACPI_RESTAG_ENDIANNESS,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 7);
32dd66
             break;
32dd66
@@ -1113,21 +1145,21 @@ RsDoUartSerialBusDescriptor (
32dd66
 
32dd66
         case 6: /* Flow Control [Flags] (_FLC) */
32dd66
 
32dd66
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
32dd66
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
32dd66
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_FLOWCONTROL,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 0, 2);
32dd66
             break;
32dd66
 
32dd66
         case 7: /* Rx Buffer Size [WORD] (_RXL) */
32dd66
 
32dd66
-            Descriptor->UartSerialBus.RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_RX,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.RxFifoSize));
32dd66
             break;
32dd66
 
32dd66
         case 8: /* Tx Buffer Size [WORD] (_TXL) */
32dd66
 
32dd66
-            Descriptor->UartSerialBus.TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_TX,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TxFifoSize));
32dd66
             break;
32dd66
@@ -1185,5 +1216,10 @@ RsDoUartSerialBusDescriptor (
32dd66
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
32dd66
     }
32dd66
 
32dd66
+    ACPI_MOVE_32_TO_32(&Descriptor->UartSerialBus.DefaultBaudRate, &DefaultBaudRate);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.RxFifoSize, &RxFifoSize);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TxFifoSize, &TxFifoSize);
32dd66
+
32dd66
     return (Rnode);
32dd66
 }
32dd66
diff --git a/source/compiler/aslrestype2w.c b/source/compiler/aslrestype2w.c
32dd66
index 79d7bcc..77acbcc 100644
32dd66
--- a/source/compiler/aslrestype2w.c
32dd66
+++ b/source/compiler/aslrestype2w.c
32dd66
@@ -85,6 +85,12 @@ RsDoWordIoDescriptor (
32dd66
     UINT8                   *OptionalFields;
32dd66
     UINT16                  StringLength = 0;
32dd66
     UINT32                  OptionIndex = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
+    UINT16                  Minimum = 0;
32dd66
+    UINT16                  Maximum = 0;
32dd66
+    UINT16                  AddressLength = 0;
32dd66
+    UINT16                  Granularity = 0;
32dd66
+    UINT16                  TranslationOffset = 0;
32dd66
     UINT32                  i;
32dd66
     BOOLEAN                 ResSourceIndex = FALSE;
32dd66
 
32dd66
@@ -104,8 +110,7 @@ RsDoWordIoDescriptor (
32dd66
      * optional fields present
32dd66
      */
32dd66
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
32dd66
-    Descriptor->Address16.ResourceLength = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_ADDRESS16) -
32dd66
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
@@ -149,7 +154,7 @@ RsDoWordIoDescriptor (
32dd66
 
32dd66
         case 5: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->Address16.Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -157,7 +162,7 @@ RsDoWordIoDescriptor (
32dd66
 
32dd66
         case 6: /* Address Min */
32dd66
 
32dd66
-            Descriptor->Address16.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -165,7 +170,7 @@ RsDoWordIoDescriptor (
32dd66
 
32dd66
         case 7: /* Address Max */
32dd66
 
32dd66
-            Descriptor->Address16.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -173,14 +178,14 @@ RsDoWordIoDescriptor (
32dd66
 
32dd66
         case 8: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->Address16.TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 9: /* Address Length */
32dd66
 
32dd66
-            Descriptor->Address16.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -192,7 +197,7 @@ RsDoWordIoDescriptor (
32dd66
             {
32dd66
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
32dd66
                 OptionIndex++;
32dd66
-                Descriptor->Address16.ResourceLength++;
32dd66
+                ResourceLength++;
32dd66
                 ResSourceIndex = TRUE;
32dd66
             }
32dd66
             break;
32dd66
@@ -204,8 +209,7 @@ RsDoWordIoDescriptor (
32dd66
             {
32dd66
                 if (StringLength)
32dd66
                 {
32dd66
-                    Descriptor->Address16.ResourceLength = (UINT16)
32dd66
-                        (Descriptor->Address16.ResourceLength + StringLength);
32dd66
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
32dd66
 
32dd66
                     strcpy ((char *)
32dd66
                         &OptionalFields[OptionIndex],
32dd66
@@ -265,13 +269,20 @@ RsDoWordIoDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        (UINT64) Descriptor->Address16.Minimum,
32dd66
-        (UINT64) Descriptor->Address16.Maximum,
32dd66
-        (UINT64) Descriptor->Address16.AddressLength,
32dd66
-        (UINT64) Descriptor->Address16.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->Address16.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
32dd66
                             OptionIndex + StringLength;
32dd66
     return (Rnode);
32dd66
@@ -307,6 +318,12 @@ RsDoWordBusNumberDescriptor (
32dd66
     UINT8                   *OptionalFields;
32dd66
     UINT16                  StringLength = 0;
32dd66
     UINT32                  OptionIndex = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
+    UINT16                  Minimum = 0;
32dd66
+    UINT16                  Maximum = 0;
32dd66
+    UINT16                  AddressLength = 0;
32dd66
+    UINT16                  Granularity = 0;
32dd66
+    UINT16                  TranslationOffset = 0;
32dd66
     UINT32                  i;
32dd66
     BOOLEAN                 ResSourceIndex = FALSE;
32dd66
 
32dd66
@@ -326,8 +343,7 @@ RsDoWordBusNumberDescriptor (
32dd66
      * optional fields present
32dd66
      */
32dd66
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
32dd66
-    Descriptor->Address16.ResourceLength = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_ADDRESS16) -
32dd66
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
@@ -364,8 +380,7 @@ RsDoWordBusNumberDescriptor (
32dd66
 
32dd66
         case 4: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->Address16.Granularity =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -373,8 +388,7 @@ RsDoWordBusNumberDescriptor (
32dd66
 
32dd66
         case 5: /* Min Address */
32dd66
 
32dd66
-            Descriptor->Address16.Minimum =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -382,8 +396,7 @@ RsDoWordBusNumberDescriptor (
32dd66
 
32dd66
         case 6: /* Max Address */
32dd66
 
32dd66
-            Descriptor->Address16.Maximum =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -391,16 +404,14 @@ RsDoWordBusNumberDescriptor (
32dd66
 
32dd66
         case 7: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->Address16.TranslationOffset =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 8: /* Address Length */
32dd66
 
32dd66
-            Descriptor->Address16.AddressLength =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -412,7 +423,7 @@ RsDoWordBusNumberDescriptor (
32dd66
             {
32dd66
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
32dd66
                 OptionIndex++;
32dd66
-                Descriptor->Address16.ResourceLength++;
32dd66
+                ResourceLength++;
32dd66
                 ResSourceIndex = TRUE;
32dd66
             }
32dd66
             break;
32dd66
@@ -424,8 +435,7 @@ RsDoWordBusNumberDescriptor (
32dd66
             {
32dd66
                 if (StringLength)
32dd66
                 {
32dd66
-                    Descriptor->Address16.ResourceLength = (UINT16)
32dd66
-                        (Descriptor->Address16.ResourceLength + StringLength);
32dd66
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
32dd66
 
32dd66
                     strcpy ((char *)
32dd66
                         &OptionalFields[OptionIndex],
32dd66
@@ -471,13 +481,20 @@ RsDoWordBusNumberDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        (UINT64) Descriptor->Address16.Minimum,
32dd66
-        (UINT64) Descriptor->Address16.Maximum,
32dd66
-        (UINT64) Descriptor->Address16.AddressLength,
32dd66
-        (UINT64) Descriptor->Address16.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->Address16.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
32dd66
                             OptionIndex + StringLength;
32dd66
     return (Rnode);
32dd66
@@ -513,6 +530,12 @@ RsDoWordSpaceDescriptor (
32dd66
     UINT8                   *OptionalFields;
32dd66
     UINT16                  StringLength = 0;
32dd66
     UINT32                  OptionIndex = 0;
32dd66
+    UINT16                  Minimum = 0;
32dd66
+    UINT16                  Maximum = 0;
32dd66
+    UINT16                  AddressLength = 0;
32dd66
+    UINT16                  Granularity = 0;
32dd66
+    UINT16                  TranslationOffset = 0;
32dd66
+    UINT16                  ResourceLength = 0;
32dd66
     UINT32                  i;
32dd66
     BOOLEAN                 ResSourceIndex = FALSE;
32dd66
 
32dd66
@@ -531,8 +554,7 @@ RsDoWordSpaceDescriptor (
32dd66
      * optional fields present
32dd66
      */
32dd66
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
32dd66
-    Descriptor->Address16.ResourceLength = (UINT16)
32dd66
-        (sizeof (AML_RESOURCE_ADDRESS16) -
32dd66
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
32dd66
          sizeof (AML_RESOURCE_LARGE_HEADER));
32dd66
 
32dd66
     /* Process all child initialization nodes */
32dd66
@@ -581,8 +603,7 @@ RsDoWordSpaceDescriptor (
32dd66
 
32dd66
         case 6: /* Address Granularity */
32dd66
 
32dd66
-            Descriptor->Address16.Granularity =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
32dd66
             GranOp = InitializerOp;
32dd66
@@ -590,8 +611,7 @@ RsDoWordSpaceDescriptor (
32dd66
 
32dd66
         case 7: /* Min Address */
32dd66
 
32dd66
-            Descriptor->Address16.Minimum =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
32dd66
             MinOp = InitializerOp;
32dd66
@@ -599,8 +619,7 @@ RsDoWordSpaceDescriptor (
32dd66
 
32dd66
         case 8: /* Max Address */
32dd66
 
32dd66
-            Descriptor->Address16.Maximum =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
32dd66
             MaxOp = InitializerOp;
32dd66
@@ -608,16 +627,14 @@ RsDoWordSpaceDescriptor (
32dd66
 
32dd66
         case 9: /* Translation Offset */
32dd66
 
32dd66
-            Descriptor->Address16.TranslationOffset =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
32dd66
             break;
32dd66
 
32dd66
         case 10: /* Address Length */
32dd66
 
32dd66
-            Descriptor->Address16.AddressLength =
32dd66
-                (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
32dd66
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
32dd66
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
32dd66
             LengthOp = InitializerOp;
32dd66
@@ -629,7 +646,7 @@ RsDoWordSpaceDescriptor (
32dd66
             {
32dd66
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
32dd66
                 OptionIndex++;
32dd66
-                Descriptor->Address16.ResourceLength++;
32dd66
+                ResourceLength++;
32dd66
                 ResSourceIndex = TRUE;
32dd66
             }
32dd66
             break;
32dd66
@@ -641,8 +658,7 @@ RsDoWordSpaceDescriptor (
32dd66
             {
32dd66
                 if (StringLength)
32dd66
                 {
32dd66
-                    Descriptor->Address16.ResourceLength = (UINT16)
32dd66
-                        (Descriptor->Address16.ResourceLength + StringLength);
32dd66
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
32dd66
 
32dd66
                     strcpy ((char *)
32dd66
                         &OptionalFields[OptionIndex],
32dd66
@@ -688,13 +704,20 @@ RsDoWordSpaceDescriptor (
32dd66
     /* Validate the Min/Max/Len/Gran values */
32dd66
 
32dd66
     RsLargeAddressCheck (
32dd66
-        (UINT64) Descriptor->Address16.Minimum,
32dd66
-        (UINT64) Descriptor->Address16.Maximum,
32dd66
-        (UINT64) Descriptor->Address16.AddressLength,
32dd66
-        (UINT64) Descriptor->Address16.Granularity,
32dd66
+        Minimum,
32dd66
+        Maximum,
32dd66
+        AddressLength,
32dd66
+        Granularity,
32dd66
         Descriptor->Address16.Flags,
32dd66
         MinOp, MaxOp, LengthOp, GranOp, Op);
32dd66
 
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
32dd66
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
32dd66
+
32dd66
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
32dd66
                             OptionIndex + StringLength;
32dd66
     return (Rnode);
32dd66
diff --git a/source/include/acmacros.h b/source/include/acmacros.h
32dd66
index ee9e745..67fb983 100644
32dd66
--- a/source/include/acmacros.h
32dd66
+++ b/source/include/acmacros.h
32dd66
@@ -107,7 +107,8 @@
32dd66
 
32dd66
 /* 32-bit source, 16/32/64 destination */
32dd66
 
32dd66
-#define ACPI_MOVE_32_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
32dd66
+#define ACPI_MOVE_32_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
32dd66
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];}
32dd66
 
32dd66
 #define ACPI_MOVE_32_TO_32(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
32dd66
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\
32dd66
@@ -122,9 +123,13 @@
32dd66
 
32dd66
 /* 64-bit source, 16/32/64 destination */
32dd66
 
32dd66
-#define ACPI_MOVE_64_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
32dd66
+#define ACPI_MOVE_64_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
32dd66
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];}
32dd66
 
32dd66
-#define ACPI_MOVE_64_TO_32(d, s)        ACPI_MOVE_32_TO_32(d, s)    /* Truncate to 32 */
32dd66
+#define ACPI_MOVE_64_TO_32(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
32dd66
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
32dd66
+                                         ((  UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\
32dd66
+                                         ((  UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];}
32dd66
 
32dd66
 #define ACPI_MOVE_64_TO_64(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
32dd66
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
32dd66
@@ -151,7 +156,9 @@
32dd66
 
32dd66
 /* 32-bit source, 16/32/64 destination */
32dd66
 
32dd66
-#define ACPI_MOVE_32_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
32dd66
+#define ACPI_MOVE_32_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
32dd66
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
32dd66
+
32dd66
 #define ACPI_MOVE_32_TO_32(d, s)        *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
32dd66
 #define ACPI_MOVE_32_TO_64(d, s)        *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s)
32dd66
 
32dd66
diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h
32dd66
index 3bc85bc..1bace7f 100644
32dd66
--- a/source/include/platform/aclinux.h
32dd66
+++ b/source/include/platform/aclinux.h
32dd66
@@ -81,13 +81,14 @@
32dd66
 #include <stdlib.h>
32dd66
 #include <ctype.h>
32dd66
 #include <unistd.h>
32dd66
+#include <endian.h>
32dd66
 
32dd66
 /* Host-dependent types and defines for user-space ACPICA */
32dd66
 
32dd66
 #define ACPI_FLUSH_CPU_CACHE()
32dd66
 #define ACPI_CAST_PTHREAD_T(pthread) ((ACPI_THREAD_ID) (pthread))
32dd66
 
32dd66
-#if defined(__ia64__) || defined(__x86_64__) || defined(__aarch64__)
32dd66
+#if __SIZEOF_LONG__ == 8
32dd66
 #define ACPI_MACHINE_WIDTH          64
32dd66
 #define COMPILER_DEPENDENT_INT64    long
32dd66
 #define COMPILER_DEPENDENT_UINT64   unsigned long
32dd66
@@ -98,6 +99,10 @@
32dd66
 #define ACPI_USE_NATIVE_DIVIDE
32dd66
 #endif
32dd66
 
32dd66
+#if __BYTE_ORDER == __BIG_ENDIAN
32dd66
+#define ACPI_BIG_ENDIAN
32dd66
+#endif
32dd66
+
32dd66
 #ifndef __cdecl
32dd66
 #define __cdecl
32dd66
 #endif
32dd66
-- 
32dd66
1.7.12.1
32dd66