1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-25 16:31:42 +00:00

Soften some warnings.

This commit is contained in:
Thomas Harte 2023-11-16 10:57:17 -05:00
parent 832e31f7e5
commit 233ec7b818
2 changed files with 9 additions and 5 deletions

View File

@ -13,6 +13,8 @@
#include "Stack.hpp"
#include "../AccessType.hpp"
#include <type_traits>
namespace InstructionSet::x86::Primitive {
template <typename IntT, typename ContextT>
@ -34,7 +36,7 @@ void jump(
// TODO: proper behaviour in 32-bit.
if(condition) {
context.flow_controller.jump(context.registers.ip() + displacement);
context.flow_controller.jump(uint16_t(context.registers.ip() + displacement));
}
}
@ -76,7 +78,7 @@ void loopne(
template <typename IntT, typename ContextT>
void call_relative(
IntT offset,
typename std::make_signed<IntT>::type offset,
ContextT &context
) {
push<uint16_t, false>(context.registers.ip(), context);

View File

@ -175,8 +175,8 @@ template <
case Operation::ESC:
case Operation::NOP: return;
case Operation::AAM: Primitive::aam(context.registers.axp(), instruction.operand(), context); return;
case Operation::AAD: Primitive::aad(context.registers.axp(), instruction.operand(), context); return;
case Operation::AAM: Primitive::aam(context.registers.axp(), uint8_t(instruction.operand()), context); return;
case Operation::AAD: Primitive::aad(context.registers.axp(), uint8_t(instruction.operand()), context); return;
case Operation::AAA: Primitive::aaas<true>(context.registers.axp(), context); return;
case Operation::AAS: Primitive::aaas<false>(context.registers.axp(), context); return;
case Operation::DAA: Primitive::daas<true>(context.registers.al(), context); return;
@ -232,7 +232,9 @@ template <
case Operation::NEG: Primitive::neg<IntT>(source_rmw(), context); break; // TODO: should be a destination.
case Operation::NOT: Primitive::not_<IntT>(source_rmw()); break; // TODO: should be a destination.
case Operation::CALLrel: Primitive::call_relative<AddressT>(instruction.displacement(), context); return;
case Operation::CALLrel:
Primitive::call_relative<AddressT>(instruction.displacement(), context);
return;
case Operation::CALLabs: Primitive::call_absolute<IntT>(destination_r(), context); return;
case Operation::CALLfar: Primitive::call_far(instruction, context); return;