1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Resolve various 32->16 conversion warnings.

This commit is contained in:
Thomas Harte 2023-12-24 14:14:53 -05:00
parent 3e328bed61
commit 13631fb7bc
3 changed files with 8 additions and 8 deletions

View File

@ -126,13 +126,13 @@ void call_far(
return;
case Source::Indirect:
source_address = address<Source::Indirect, uint16_t, AccessType::Read>(instruction, pointer, context);
source_address = uint16_t(address<Source::Indirect, uint16_t, AccessType::Read>(instruction, pointer, context));
break;
case Source::IndirectNoBase:
source_address = address<Source::IndirectNoBase, uint16_t, AccessType::Read>(instruction, pointer, context);
source_address = uint16_t(address<Source::IndirectNoBase, uint16_t, AccessType::Read>(instruction, pointer, context));
break;
case Source::DirectAddress:
source_address = address<Source::DirectAddress, uint16_t, AccessType::Read>(instruction, pointer, context);
source_address = uint16_t(address<Source::DirectAddress, uint16_t, AccessType::Read>(instruction, pointer, context));
break;
}
@ -161,13 +161,13 @@ void jump_far(
case Source::Immediate: context.flow_controller.template jump<uint16_t>(instruction.segment(), instruction.offset()); return;
case Source::Indirect:
source_address = address<Source::Indirect, uint16_t, AccessType::Read>(instruction, pointer, context);
source_address = uint16_t(address<Source::Indirect, uint16_t, AccessType::Read>(instruction, pointer, context));
break;
case Source::IndirectNoBase:
source_address = address<Source::IndirectNoBase, uint16_t, AccessType::Read>(instruction, pointer, context);
source_address = uint16_t(address<Source::IndirectNoBase, uint16_t, AccessType::Read>(instruction, pointer, context));
break;
case Source::DirectAddress:
source_address = address<Source::DirectAddress, uint16_t, AccessType::Read>(instruction, pointer, context);
source_address = uint16_t(address<Source::DirectAddress, uint16_t, AccessType::Read>(instruction, pointer, context));
break;
}

View File

@ -35,7 +35,7 @@ void ld(
ContextT &context
) {
const auto pointer = instruction.source();
auto source_address = address<uint16_t, AccessType::Read>(instruction, pointer, context);
uint16_t source_address = uint16_t(address<uint16_t, AccessType::Read>(instruction, pointer, context));
const Source source_segment = instruction.data_segment();
context.memory.preauthorise_read(source_segment, source_address, 4);

View File

@ -136,7 +136,7 @@ void setmo(
write_t<IntT> destination,
ContextT &context
) {
const auto result = destination = ~0;
const auto result = destination = IntT(~0);
context.flags.template set_from<Flag::Carry, Flag::AuxiliaryCarry, Flag::Overflow>(0);
context.flags.template set_from<IntT, Flag::Sign, Flag::Zero, Flag::ParityOdd>(result);
}