diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-05-29 23:11:41 +0200 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-05-29 23:11:41 +0200 |
| commit | f02853edb8a624fbe85ea322eaba9e643756d44e (patch) | |
| tree | 5ef71cb2cc6a455bfd200a5ff895afc9cb2d624d /ppu.c | |
| parent | 93fd16dcd4c66ed003363d6e7f0c70bd3d2de92c (diff) | |
optimization of ppu
Diffstat (limited to 'ppu.c')
| -rw-r--r-- | ppu.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -103,7 +103,7 @@ static inline void ppu_fetch_sprite_patterns(struct nes_state *state) { } } -__attribute__((hot, flatten)) +__attribute__((always_inline, hot, flatten)) static inline void ppu_render_pixel(struct nes_state *state) { struct ppu_state *restrict ppu = &state->ppu; @@ -171,6 +171,7 @@ static inline void ppu_render_pixel(struct nes_state *state) { } __attribute__((hot, flatten)) +__attribute__((optimize("no-jump-tables"))) static inline void ppu_tick(struct nes_state *state) { struct ppu_state *restrict ppu = &state->ppu; @@ -178,7 +179,7 @@ static inline void ppu_tick(struct nes_state *state) { uint32_t scanline = ppu->scanline; uint8_t rendering = (ppu->reg_mask & 0x18); - for(uint32_t ppu_loops = 0; ppu_loops < 3; ++ppu_loops) { + for(uint8_t ppu_loops = 0; ppu_loops < 3; ++ppu_loops) { if(rendering) { switch(scanline) { |
