sc68fordevelopers
2.2.1
|
68k arithmetic and logical instruction emulation. More...
#include "emu68/type68.h"
Go to the source code of this file.
Functions | |
Arithmetic instructions. | |
s32 | add68 (s32 a, s32 b, s32 c) |
Addition. More... | |
s32 | sub68 (s32 a, s32 b, s32 c) |
Subtraction. More... | |
s32 | muls68 (s32 a, s32 b) |
Signed multiplication. More... | |
s32 | mulu68 (u32 a, u32 b) |
Unsigned multiplication. More... | |
s32 | divs68 (s32 a, s32 b) |
Signed divide. More... | |
s32 | divu68 (u32 a, u32 b) |
Unsigned divide. More... | |
Logical instructions. | |
s32 | and68 (u32 a, u32 b) |
Bitwise AND. More... | |
s32 | orr68 (u32 a, u32 b) |
Bitwise OR. More... | |
s32 | eor68 (u32 a, u32 b) |
Bitwise exclusif OR. More... | |
s32 | not68 (s32 s) |
First complement. More... | |
68k arithmetic and logical instruction emulation.
Logical and arithmetical instructions are emulated with functions instead of macros to prevent from excessive code size generation that hurt processor cache. By the way these functions could easily be written in assembler and improve emulator execution time. All these functions work with 32 bit values. To perform other size instructions, operands must be left shifted in order to locate operands most signifiant bit at the 31st bit.