devkitARM release 52-2 thumb code generation problem
Posted: Sun Jun 09, 2019 9:44 pm
devkitARM release 52-2 thumb code generation problem
I am hobbiest programmer. and recently i reinstalled devkitARM with NDS, GBA development tools
working with old source code
I compiled old source code with original option
ARCH := -mthumb -mthumb-interwork
but
generated code has undefined instructions.
Emulation unpaused
ARM9: Undefined instruction: 0x33017813 PC=0x020019D8
this codes are
.text:020019D4 ; =============== S U B R O U T I N E =======================================
.text:020019D4
.text:020019D4
.text:020019D4 EXPORT scalingSet
.text:020019D4 scalingSet
.text:020019D4 10 B5 PUSH {R4,LR}
.text:020019D6 07 4A LDR R2, =g_scaling_set
.text:020019D8 13 78 LDRB R3, [R2] <- here ---------------------------------------------
.text:020019DA 01 33 ADDS R3, #1
.text:020019DC 1B 06 LSLS R3, R3, #0x18
.text:020019DE 1B 0E LSRS R3, R3, #0x18
.text:020019E0 02 2B CMP R3, #2
.text:020019E2 05 D8 BHI loc_20019F0
.text:020019E4
.text:020019E4 loc_20019E4 ; CODE XREF: scalingSet+1Ej
.text:020019E4 13 70 STRB R3, [R2]
.text:020019E6 02 F0 DF FF BL SetupScaling
.text:020019EA 04 F0 47 F8 BL SetVDPMode
.text:020019EE 10 BD POP {R4,PC}
==============================================================================================
i think byte code 13 78 is not valid thumb code..
,
but with this option . it works well
ARCH := -marm -mthumb-interwork
is this compiler problem? or Am i lost some newer options ?
I am hobbiest programmer. and recently i reinstalled devkitARM with NDS, GBA development tools
working with old source code
I compiled old source code with original option
ARCH := -mthumb -mthumb-interwork
but
generated code has undefined instructions.
Emulation unpaused
ARM9: Undefined instruction: 0x33017813 PC=0x020019D8
this codes are
.text:020019D4 ; =============== S U B R O U T I N E =======================================
.text:020019D4
.text:020019D4
.text:020019D4 EXPORT scalingSet
.text:020019D4 scalingSet
.text:020019D4 10 B5 PUSH {R4,LR}
.text:020019D6 07 4A LDR R2, =g_scaling_set
.text:020019D8 13 78 LDRB R3, [R2] <- here ---------------------------------------------
.text:020019DA 01 33 ADDS R3, #1
.text:020019DC 1B 06 LSLS R3, R3, #0x18
.text:020019DE 1B 0E LSRS R3, R3, #0x18
.text:020019E0 02 2B CMP R3, #2
.text:020019E2 05 D8 BHI loc_20019F0
.text:020019E4
.text:020019E4 loc_20019E4 ; CODE XREF: scalingSet+1Ej
.text:020019E4 13 70 STRB R3, [R2]
.text:020019E6 02 F0 DF FF BL SetupScaling
.text:020019EA 04 F0 47 F8 BL SetVDPMode
.text:020019EE 10 BD POP {R4,PC}
==============================================================================================
i think byte code 13 78 is not valid thumb code..
,
but with this option . it works well
ARCH := -marm -mthumb-interwork
is this compiler problem? or Am i lost some newer options ?