Home | Forums | What's new | Resources | |
converting asmsh to gnu as |
vbt - Nov 3, 2018 |
antime | Nov 3, 2018 | |||
The move immediate instructions only support a positive offset, so the constant must be placed after the code that uses it. I don't know what the "cnop" directive is supposed to do, but otherwise it looks correct. |
vbt | Nov 3, 2018 | |||||
thanks @antime... it's assembled, it gives a new issue saturn/maths.o: In function `jumptab': (.text+0x100): undefined reference to `_ashiftrt_r0_0' saturn/maths.o: In function `jumptab': (.text+0x104): undefined reference to `_ashiftrt_r0_1' saturn/maths.o: In function `jumptab': (.text+0x108): undefined reference to `_ashiftrt_r0_2' saturn/maths.o: In function `jumptab': (.text+0x10c): undefined reference to `_ashiftrt_r0_3' saturn/maths.o: In function `jumptab': (.text+0x110): undefined reference to `_ashiftrt_r0_4' saturn/maths.o: In function `jumptab': (.text+0x114): undefined reference to `_ashiftrt_r0_5' saturn/maths.o: In function `jumptab': (.text+0x118): undefined reference to `_ashiftrt_r0_6' saturn/maths.o: In function `jumptab': (.text+0x11c): undefined reference to `_ashiftrt_r0_7' collect2.exe: error: ld returned 1 exit status i don't find these functions in gcc, maybe it was just in the old cygnus ? the target of that asm lib was to improve speed of the original functions provided by the compiler for sh2. |
antime | Nov 3, 2018 | |||
There's a corresponding set of ___ashiftrt_r4_n functions in libgcc.a (both modern, and cygnus-2.7-96Q3). Renesas' toolchain uses a different ABI, so if your original assembly isn't for GCC you'll probably need to adapt it in places. |
vbt | Nov 4, 2018 | |||
well, thanks Antime, everything is assembled, i can't swear the replaced functions are really faster than modern gcc. I recompiled fba with these updates. here are the modified functions : Address Names alphabetically 00000482 __ASHIFTRT_R4_0 0000047E __ASHIFTRT_R4_1 00000404 __ASHIFTRT_R4_10 000003F8 __ASHIFTRT_R4_11 000003EA __ASHIFTRT_R4_12 000003DC __ASHIFTRT_R4_13 000003CC __ASHIFTRT_R4_14 000003BC __ASHIFTRT_R4_15 000003B6 __ASHIFTRT_R4_16 000003AE __ASHIFTRT_R4_17 000003A4 __ASHIFTRT_R4_18 00000398 __ASHIFTRT_R4_19 0000047C __ASHIFTRT_R4_2 0000038C __ASHIFTRT_R4_20 0000037E __ASHIFTRT_R4_21 00000370 __ASHIFTRT_R4_22 00000360 __ASHIFTRT_R4_23 00000358 __ASHIFTRT_R4_24 0000034E __ASHIFTRT_R4_25 00000342 __ASHIFTRT_R4_26 00000334 __ASHIFTRT_R4_27 00000326 __ASHIFTRT_R4_28 00000316 __ASHIFTRT_R4_29 0000047A __ASHIFTRT_R4_3 00000306 __ASHIFTRT_R4_30 00000300 __ASHIFTRT_R4_31 00000300 __ASHIFTRT_R4_32 00000478 __ASHIFTRT_R4_4 00000476 __ASHIFTRT_R4_5 00000474 __ASHIFTRT_R4_6 00000472 __ASHIFTRT_R4_7 0000041A __ASHIFTRT_R4_8 00000410 __ASHIFTRT_R4_9 00000150 __ASHRSI3 00000000 __MULSI3 00000006 __SDIVSI3 00000028 __UDIVSI3 i will publish the version for gas, maybe there are still bugs (well, there are |