diff options
author | Lv Zheng <lv.zheng@intel.com> | 2016-11-09 04:05:05 +0800 |
---|---|---|
committer | Lv Zheng <lv.zheng@intel.com> | 2016-11-09 04:05:05 +0800 |
commit | cfca5fb4c9c843c176e94a364c4b75b5d9b0f39e (patch) | |
tree | 4d75e2c3eca4eb7d0c6f64058c7d26324920857e /source/components/executer | |
parent | adaead47de2dd98ee556de911fd798371ba4c378 (diff) | |
download | acpica-cfca5fb4c9c843c176e94a364c4b75b5d9b0f39e.tar.gz |
Hardware: Introduce a set of macros to handle bit width mask generation
This patch adds a set of macros to generate masks from bit width values.
This patch also cleans up an existing line using the new macros. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Diffstat (limited to 'source/components/executer')
-rw-r--r-- | source/components/executer/exfldio.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/source/components/executer/exfldio.c b/source/components/executer/exfldio.c index b7e86fdb0..578ba48e0 100644 --- a/source/components/executer/exfldio.c +++ b/source/components/executer/exfldio.c @@ -1018,20 +1018,9 @@ AcpiExInsertIntoField ( AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth); - /* - * Create the bitmasks used for bit insertion. - * Note: This if/else is used to bypass compiler differences with the - * shift operator - */ - if (AccessBitWidth == ACPI_INTEGER_BIT_SIZE) - { - WidthMask = ACPI_UINT64_MAX; - } - else - { - WidthMask = ACPI_MASK_BITS_ABOVE (AccessBitWidth); - } + /* Create the bitmasks used for bit insertion */ + WidthMask = ACPI_MASK_BITS_ABOVE_64 (AccessBitWidth); Mask = WidthMask & ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset); |