summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
author MooglyGuy <MooglyGuy@users.noreply.github.com>2022-11-15 13:48:22 +0100
committer GitHub <noreply@github.com>2022-11-15 07:48:22 -0500
commitba75326bfe3580004e0e0bd38613990b22f86bf4 (patch)
treec8c5dc82ea85a65b531f9df289721291a4abe071 /src/devices
parent8878a139e4f475d6154c71629703882afe4897ac (diff)
-e132xsfe.cpp: Fixed missing bit mask causing UBSAN warnings. [Ryan Holtz] (#10550)
Co-authored-by: Ryan Holtz <TheMogMiner>
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/cpu/e132xs/e132xsfe.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/cpu/e132xs/e132xsfe.cpp b/src/devices/cpu/e132xs/e132xsfe.cpp
index 355104aca3a..602f724269f 100644
--- a/src/devices/cpu/e132xs/e132xsfe.cpp
+++ b/src/devices/cpu/e132xs/e132xsfe.cpp
@@ -163,10 +163,10 @@ bool e132xs_frontend::describe(opcode_desc &desc, const opcode_desc *prev)
const uint32_t ldstf_code = (gdstf_code + fp) & 0x1f;
const uint32_t lsrc_code = (gsrc_code + fp) & 0x1f;
const uint32_t lsrcf_code = (gsrcf_code + fp) & 0x1f;
- const uint32_t ldst_group = 1 + (((FE_DST_CODE + fp) & 0x20) >> 5);
- const uint32_t ldstf_group = 1 + (((FE_DST_CODE + fp + 1) & 0x20) >> 5);
- const uint32_t lsrc_group = 1 + (((FE_SRC_CODE + fp) & 0x20) >> 5);
- const uint32_t lsrcf_group = 1 + ((FE_SRC_CODE + fp + 1) >> 5);
+ const uint32_t ldst_group = BIT(FE_DST_CODE + fp, 5) + 1;
+ const uint32_t ldstf_group = BIT(FE_DST_CODE + fp + 1, 5) + 1;
+ const uint32_t lsrc_group = BIT(FE_SRC_CODE + fp, 5) + 1;
+ const uint32_t lsrcf_group = BIT(FE_SRC_CODE + fp + 1, 5) + 1;
switch (op >> 8)
{