- Joined
- Jan 26, 2018
- Messages
- 13
- Motherboard
- Lenovo SuperX 5B
- CPU
- i7-6700HQ
- Graphics
- HD 530
- Mobile Phone
For the code above, we want to translate it to:
A patch can be constructed to automate this, and as you will see patches for other 16-bit fields follow this same pattern:
An astute reader will note that this code could be optimized:
Why not below?
Code:
Store (B1B2(DC00,DC01), Index (DerefOf (Index (Local0, 0x02)), Zero))
Store (ShiftRight (B1B2(DC00,DC01), 0x08), Index (DerefOf (Index (Local0, 0x02)), One))
Code:
into method label GBTI code_regex \(BDC0, replaceall_matched begin (B1B2(DC00,DC01), end;
Code:
Store (DC00, Index (DerefOf (Index (Local0, 0x02)), Zero))
Store (DC01, Index (DerefOf (Index (Local0, 0x02)), One))
Code:
Store (DC00, Index (DerefOf (Index (Local0, 0x02)), One))
Store (DC01, Index (DerefOf (Index (Local0, 0x02)), Zero))