Remove unneeded 16-bit operations.

Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian.Conlon 2017-07-27 21:44:24 +01:00
parent 569e1925ce
commit 261433bd6e
2 changed files with 0 additions and 30 deletions

View File

@ -182,8 +182,6 @@ namespace EightBit {
bool jumpConditionalFlag(uint8_t& f, int flag); bool jumpConditionalFlag(uint8_t& f, int flag);
bool callConditionalFlag(uint8_t& f, int flag); bool callConditionalFlag(uint8_t& f, int flag);
void sbc(uint8_t& f, register16_t& operand, register16_t value);
void adc(uint8_t& f, register16_t& operand, register16_t value);
void add(uint8_t& f, register16_t& operand, register16_t value); void add(uint8_t& f, register16_t& operand, register16_t value);
static void add(uint8_t& f, uint8_t& operand, uint8_t value, int carry = 0); static void add(uint8_t& f, uint8_t& operand, uint8_t value, int carry = 0);

View File

@ -132,34 +132,6 @@ bool EightBit::LR35902::callConditionalFlag(uint8_t& f, int flag) {
#pragma region 16-bit arithmetic #pragma region 16-bit arithmetic
void EightBit::LR35902::sbc(uint8_t& f, register16_t& operand, register16_t value) {
auto before = operand;
auto carry = (f & CF) >> 4;
auto result = before.word - value.word - carry;
operand.word = result;
clearFlag(f, ZF, operand.word);
adjustHalfCarrySub(f, before.high, value.high, operand.high);
setFlag(f, NF);
setFlag(f, CF, result & Bit16);
}
void EightBit::LR35902::adc(uint8_t& f, register16_t& operand, register16_t value) {
auto before = operand;
auto carry = (f & CF) >> 4;
auto result = before.word + value.word + carry;
operand.word = result;
clearFlag(f, ZF, result);
adjustHalfCarryAdd(f, before.high, value.high, operand.high);
clearFlag(f, NF);
setFlag(f, CF, result & Bit16);
}
void EightBit::LR35902::add(uint8_t& f, register16_t& operand, register16_t value) { void EightBit::LR35902::add(uint8_t& f, register16_t& operand, register16_t value) {
auto before = operand; auto before = operand;