diff options
Diffstat (limited to 'apps/plugins/rockboy/cpu.c')
-rw-r--r-- | apps/plugins/rockboy/cpu.c | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/apps/plugins/rockboy/cpu.c b/apps/plugins/rockboy/cpu.c index 5469db3d4c..037ea1bc37 100644 --- a/apps/plugins/rockboy/cpu.c +++ b/apps/plugins/rockboy/cpu.c | |||
@@ -13,12 +13,6 @@ | |||
13 | #include "asm.h" | 13 | #include "asm.h" |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | /* GCC 11 complains about the code style. Just turn this off. */ | ||
17 | #if __GNUC__ >= 11 | ||
18 | #pragma GCC diagnostic push | ||
19 | #pragma GCC diagnostic ignored "-Wmisleading-identation" | ||
20 | #endif | ||
21 | |||
22 | struct cpu cpu IBSS_ATTR; | 16 | struct cpu cpu IBSS_ATTR; |
23 | bool plugbuf; | 17 | bool plugbuf; |
24 | 18 | ||
@@ -769,25 +763,32 @@ next: | |||
769 | __JR: | 763 | __JR: |
770 | JR; break; | 764 | JR; break; |
771 | case 0x20: /* JR NZ */ | 765 | case 0x20: /* JR NZ */ |
772 | if (!(F&FZ)) goto __JR; NOJR; break; | 766 | if (!(F&FZ)) goto __JR; |
767 | NOJR; break; | ||
773 | case 0x28: /* JR Z */ | 768 | case 0x28: /* JR Z */ |
774 | if (F&FZ) goto __JR; NOJR; break; | 769 | if (F&FZ) goto __JR; |
770 | NOJR; break; | ||
775 | case 0x30: /* JR NC */ | 771 | case 0x30: /* JR NC */ |
776 | if (!(F&FC)) goto __JR; NOJR; break; | 772 | if (!(F&FC)) goto __JR; |
773 | NOJR; break; | ||
777 | case 0x38: /* JR C */ | 774 | case 0x38: /* JR C */ |
778 | if (F&FC) goto __JR; NOJR; break; | 775 | if (F&FC) goto __JR; |
779 | 776 | NOJR; break; | |
780 | case 0xC3: /* JP */ | 777 | case 0xC3: /* JP */ |
781 | __JP: | 778 | __JP: |
782 | JP; break; | 779 | JP; break; |
783 | case 0xC2: /* JP NZ */ | 780 | case 0xC2: /* JP NZ */ |
784 | if (!(F&FZ)) goto __JP; NOJP; break; | 781 | if (!(F&FZ)) goto __JP; |
782 | NOJP; break; | ||
785 | case 0xCA: /* JP Z */ | 783 | case 0xCA: /* JP Z */ |
786 | if (F&FZ) goto __JP; NOJP; break; | 784 | if (F&FZ) goto __JP; |
785 | NOJP; break; | ||
787 | case 0xD2: /* JP NC */ | 786 | case 0xD2: /* JP NC */ |
788 | if (!(F&FC)) goto __JP; NOJP; break; | 787 | if (!(F&FC)) goto __JP; |
788 | NOJP; break; | ||
789 | case 0xDA: /* JP C */ | 789 | case 0xDA: /* JP C */ |
790 | if (F&FC) goto __JP; NOJP; break; | 790 | if (F&FC) goto __JP; |
791 | NOJP; break; | ||
791 | case 0xE9: /* JP HL */ | 792 | case 0xE9: /* JP HL */ |
792 | PC = HL; break; | 793 | PC = HL; break; |
793 | 794 | ||
@@ -795,13 +796,17 @@ next: | |||
795 | __RET: | 796 | __RET: |
796 | RET; break; | 797 | RET; break; |
797 | case 0xC0: /* RET NZ */ | 798 | case 0xC0: /* RET NZ */ |
798 | if (!(F&FZ)) goto __RET; NORET; break; | 799 | if (!(F&FZ)) goto __RET; |
800 | NORET; break; | ||
799 | case 0xC8: /* RET Z */ | 801 | case 0xC8: /* RET Z */ |
800 | if (F&FZ) goto __RET; NORET; break; | 802 | if (F&FZ) goto __RET; |
803 | NORET; break; | ||
801 | case 0xD0: /* RET NC */ | 804 | case 0xD0: /* RET NC */ |
802 | if (!(F&FC)) goto __RET; NORET; break; | 805 | if (!(F&FC)) goto __RET; |
806 | NORET; break; | ||
803 | case 0xD8: /* RET C */ | 807 | case 0xD8: /* RET C */ |
804 | if (F&FC) goto __RET; NORET; break; | 808 | if (F&FC) goto __RET; |
809 | NORET; break; | ||
805 | case 0xD9: /* RETI */ | 810 | case 0xD9: /* RETI */ |
806 | IME = IMA = 1; goto __RET; | 811 | IME = IMA = 1; goto __RET; |
807 | 812 | ||
@@ -809,13 +814,17 @@ next: | |||
809 | __CALL: | 814 | __CALL: |
810 | CALL; break; | 815 | CALL; break; |
811 | case 0xC4: /* CALL NZ */ | 816 | case 0xC4: /* CALL NZ */ |
812 | if (!(F&FZ)) goto __CALL; NOCALL; break; | 817 | if (!(F&FZ)) goto __CALL; |
818 | NOCALL; break; | ||
813 | case 0xCC: /* CALL Z */ | 819 | case 0xCC: /* CALL Z */ |
814 | if (F&FZ) goto __CALL; NOCALL; break; | 820 | if (F&FZ) goto __CALL; |
821 | NOCALL; break; | ||
815 | case 0xD4: /* CALL NC */ | 822 | case 0xD4: /* CALL NC */ |
816 | if (!(F&FC)) goto __CALL; NOCALL; break; | 823 | if (!(F&FC)) goto __CALL; |
824 | NOCALL; break; | ||
817 | case 0xDC: /* CALL C */ | 825 | case 0xDC: /* CALL C */ |
818 | if (F&FC) goto __CALL; NOCALL; break; | 826 | if (F&FC) goto __CALL; |
827 | NOCALL; break; | ||
819 | 828 | ||
820 | case 0xC7: /* RST 0 */ | 829 | case 0xC7: /* RST 0 */ |
821 | b = 0x00; goto __RST; | 830 | b = 0x00; goto __RST; |
@@ -1009,7 +1018,3 @@ next: | |||
1009 | } | 1018 | } |
1010 | 1019 | ||
1011 | #endif /* ASM_CPU_EMULATE */ | 1020 | #endif /* ASM_CPU_EMULATE */ |
1012 | |||
1013 | #if __GNUC__ >= 11 | ||
1014 | #pragma GCC diagnostic pop | ||
1015 | #endif | ||