summaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/cpu.c b/cpu.c
index ec7b5ec..9f0639d 100644
--- a/cpu.c
+++ b/cpu.c
@@ -5,12 +5,12 @@
// REMOVE FOR NES!!!!!
// #define ENABLE_DECIMAL_MODE
-__attribute__((hot, always_inline))
+__attribute__((hot))
static inline uint8_t pack_flags(struct cpu_state *cpu) {
return (cpu->n << 7) | (cpu->v << 6) | (1 << 5) | (cpu->d << 3) | (cpu->i << 2) | (cpu->z << 1) | cpu->c;
}
-__attribute__((hot, always_inline))
+__attribute__((hot))
static inline void unpack_flags(struct cpu_state *cpu, uint8_t value) {
cpu->n = (value >> 7) & 1;
cpu->v = (value >> 6) & 1;
@@ -28,10 +28,6 @@ static inline void update_zn(struct cpu_state *cpu, uint8_t result) {
static void (*opcode_lut[256*2])(struct nes_state *) __attribute__((aligned(4096)));
-struct addr_result {
- uint32_t addr;
- uint8_t value;
-};
#include "cpu_opcodes.c"
#include "cpu_opcodes_ud.c"
@@ -75,7 +71,7 @@ static inline void do_irq(struct nes_state * restrict state) {
cpu->i = 1;
}
-__attribute__((hot))
+__attribute__((always_inline, hot))
static inline void check_interrupts(struct nes_state * restrict state) {
struct cpu_state * restrict cpu = &state->cpu;