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