mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Resolve various 32->16 conversion warnings.
This commit is contained in:
parent
3e328bed61
commit
13631fb7bc
@ -126,13 +126,13 @@ void call_far(
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case Source::Indirect:
|
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;
|
break;
|
||||||
case Source::IndirectNoBase:
|
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;
|
break;
|
||||||
case Source::DirectAddress:
|
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;
|
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::Immediate: context.flow_controller.template jump<uint16_t>(instruction.segment(), instruction.offset()); return;
|
||||||
|
|
||||||
case Source::Indirect:
|
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;
|
break;
|
||||||
case Source::IndirectNoBase:
|
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;
|
break;
|
||||||
case Source::DirectAddress:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ void ld(
|
|||||||
ContextT &context
|
ContextT &context
|
||||||
) {
|
) {
|
||||||
const auto pointer = instruction.source();
|
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();
|
const Source source_segment = instruction.data_segment();
|
||||||
|
|
||||||
context.memory.preauthorise_read(source_segment, source_address, 4);
|
context.memory.preauthorise_read(source_segment, source_address, 4);
|
||||||
|
@ -136,7 +136,7 @@ void setmo(
|
|||||||
write_t<IntT> destination,
|
write_t<IntT> destination,
|
||||||
ContextT &context
|
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<Flag::Carry, Flag::AuxiliaryCarry, Flag::Overflow>(0);
|
||||||
context.flags.template set_from<IntT, Flag::Sign, Flag::Zero, Flag::ParityOdd>(result);
|
context.flags.template set_from<IntT, Flag::Sign, Flag::Zero, Flag::ParityOdd>(result);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user