summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-10-23 13:40:58 -0400
committer AJR <ajrhacker@users.noreply.github.com>2021-10-23 13:40:58 -0400
commit3a11f9168703f33f2f066c3e9d0f6905f2c95453 (patch)
treeba797d08533fb64bffdb8c3a14660f129e95bffc
parentccb7ac9f6b0e50b7849c9f3ee3b484d1dee25927 (diff)
z8000: Simplify EXTS[BL]? implementation
-rw-r--r--src/devices/cpu/z8000/z8000ops.hxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/devices/cpu/z8000/z8000ops.hxx b/src/devices/cpu/z8000/z8000ops.hxx
index 1e3b2834a2d..6f9758f0a02 100644
--- a/src/devices/cpu/z8000/z8000ops.hxx
+++ b/src/devices/cpu/z8000/z8000ops.hxx
@@ -5662,7 +5662,7 @@ void z8002_device::ZB0_dddd_0000()
void z8002_device::ZB1_dddd_0000()
{
GET_DST(OP0,NIB2);
- RW(dst) = (RW(dst) & 0xff) | ((RW(dst) & S08) ? 0xff00 : 0x0000);
+ RW(dst) = (int16_t)(int8_t)RW(dst);
}
/******************************************
@@ -5672,8 +5672,7 @@ void z8002_device::ZB1_dddd_0000()
void z8002_device::ZB1_dddd_0111()
{
GET_DST(OP0,NIB2);
- RQ(dst) = concat_64((RQ(dst) & S32) ?
- 0xfffffffful : 0, extract_64lo(RQ(dst)));
+ RQ(dst) = (int64_t)(int32_t)RQ(dst);
}
/******************************************
@@ -5683,8 +5682,7 @@ void z8002_device::ZB1_dddd_0111()
void z8002_device::ZB1_dddd_1010()
{
GET_DST(OP0,NIB2);
- RL(dst) = (RL(dst) & 0xffff) | ((RL(dst) & S16) ?
- 0xffff0000ul : 0x00000000ul);
+ RL(dst) = (int32_t)(int16_t)RL(dst);
}
/******************************************