# HG changeset patch # User Matti Hamalainen # Date 1528372106 -10800 # Node ID f9128665a47e6af598da4cef71fc90c487d1bcd6 # Parent 40a5ba0b3838a77737e347123e168171dcba37dd Implement operator types DO_SET_MEM_HI and DO_SET_MEM_LO. Not used yet. diff -r 40a5ba0b3838 -r f9128665a47e tools/lib64gfx.c --- a/tools/lib64gfx.c Thu Jun 07 14:47:37 2018 +0300 +++ b/tools/lib64gfx.c Thu Jun 07 14:48:26 2018 +0300 @@ -645,6 +645,8 @@ { case DO_COPY: case DO_SET_MEM: + case DO_SET_MEM_HI: + case DO_SET_MEM_LO: case DO_SET_OP: switch (op->subject) { @@ -802,6 +804,8 @@ { case DO_COPY: case DO_SET_MEM: + case DO_SET_MEM_HI: + case DO_SET_MEM_LO: case DO_SET_OP: switch (op->subject) { @@ -857,6 +861,13 @@ value = op->offs; break; + case DO_SET_MEM_HI: + value = (*src >> 4) & 0x0f; + break; + + case DO_SET_MEM_LO: + value = *src & 0x0f; + break; } switch (op->subject) { @@ -1059,6 +1070,14 @@ *dst = value; break; + case DO_SET_MEM_HI: + *dst |= (value & 0x0f) << 4; + break; + + case DO_SET_MEM_LO: + *dst |= value & 0x0f; + break; + case DO_SET_OP: // Do nothing in this case break; diff -r 40a5ba0b3838 -r f9128665a47e tools/lib64gfx.h --- a/tools/lib64gfx.h Thu Jun 07 14:47:37 2018 +0300 +++ b/tools/lib64gfx.h Thu Jun 07 14:48:26 2018 +0300 @@ -86,6 +86,9 @@ DO_SET_MEM, // Set subject value or fill subject memory area to byte value from offset DO_SET_OP, // Like above but value from op->offs field instead + DO_SET_MEM_HI, // Copy one byte value like DO_SET_MEM, but high nibble only + DO_SET_MEM_LO, // Like above, but low nibble + DO_DEC_FUNC, // Execute specified decoding function (only for decoding operations) DO_ENC_FUNC, // Same, but for encoding