LLVMにRenesas RL78をPortingしようとしているのかな?

こんにちは。NoMaYです。

ウェブで調べ物をしていて気付いたのですが、RenesasさんはLLVM(今はGCCと並ぶ著名なフリーコンパイラ)にRL78をPortingしようとしているのかも、、、

[llvm-dev] New LLVM backend for Renesas RL78 MCU
Sebastian Perta via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 1 10:26:05 PDT 2020
lists.llvm.org/pipermail/llvm-dev/2020-April/140546.html
 

Parents
  • こんにちは。NoMaYです。

    LLVM-RL78のアセンブラで頭を抱えてしまいました。せめて、アセンブルエラーになった行番号ぐらいは表示して欲しいかな、、、

    'clang --target=rl78 -Os -ffunction-sections -fdata-sections -Wunused -Wuninitialized -Wall -Wextra -Wmissing-declarations -Wpointer-arith -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wno-unused-function -Wno-unused-label -Wno-main-return-type -g -mcpu=s3 -x assembler-with-cpp -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Demo\\RL78_RL78G23_64p_FPB_LLVM_e2studio\\src\\FreeRTOS_Demo" -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Source\\portable\\Renesas\\LLVMRL78" -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Demo\\RL78_RL78G23_64p_FPB_LLVM_e2studio\\src\\frtos_config" -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Demo\\RL78_RL78G23_64p_FPB_LLVM_e2studio\\src" -MMD -MP -MF"src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.d" -MT"src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o" -c "C:/Renesas/GitHubDesktop/work/FreeRTOS/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.S" -o "src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o"'
    clang -cc1as: fatal error: error in backend: Instruction using illegal operand
    src/FreeRTOS/Source/portable/Renesas/LLVMRL78/subdir.mk:30: recipe for target 'src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o' failed
    make[1]: *** [src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o] Error 1

     

Reply
  • こんにちは。NoMaYです。

    LLVM-RL78のアセンブラで頭を抱えてしまいました。せめて、アセンブルエラーになった行番号ぐらいは表示して欲しいかな、、、

    'clang --target=rl78 -Os -ffunction-sections -fdata-sections -Wunused -Wuninitialized -Wall -Wextra -Wmissing-declarations -Wpointer-arith -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wno-unused-function -Wno-unused-label -Wno-main-return-type -g -mcpu=s3 -x assembler-with-cpp -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Demo\\RL78_RL78G23_64p_FPB_LLVM_e2studio\\src\\FreeRTOS_Demo" -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Source\\portable\\Renesas\\LLVMRL78" -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Demo\\RL78_RL78G23_64p_FPB_LLVM_e2studio\\src\\frtos_config" -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Demo\\RL78_RL78G23_64p_FPB_LLVM_e2studio\\src" -MMD -MP -MF"src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.d" -MT"src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o" -c "C:/Renesas/GitHubDesktop/work/FreeRTOS/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.S" -o "src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o"'
    clang -cc1as: fatal error: error in backend: Instruction using illegal operand
    src/FreeRTOS/Source/portable/Renesas/LLVMRL78/subdir.mk:30: recipe for target 'src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o' failed
    make[1]: *** [src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o] Error 1

     

Children
  • こんにちは。NoMaYです。

    先程のアセンブルエラーの箇所を探そうとしたら、今度は、LLVM-RL78のアセンブラでスタックダンプが表示されてしまいました、、、トホホ、、、

    'clang --target=rl78 -Os -ffunction-sections -fdata-sections -Wunused -Wuninitialized -Wall -Wextra -Wmissing-declarations -Wpointer-arith -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wno-unused-function -Wno-unused-label -Wno-main-return-type -g -mcpu=s3 -x assembler-with-cpp -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Demo\\RL78_RL78G23_64p_FPB_LLVM_e2studio\\src\\FreeRTOS_Demo" -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Source\\portable\\Renesas\\LLVMRL78" -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Demo\\RL78_RL78G23_64p_FPB_LLVM_e2studio\\src\\frtos_config" -I"C:\\Renesas\\GitHubDesktop\\work\\FreeRTOS\\FreeRTOS\\Demo\\RL78_RL78G23_64p_FPB_LLVM_e2studio\\src" -MMD -MP -MF"src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.d" -MT"src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o" -c "C:/Renesas/GitHubDesktop/work/FreeRTOS/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.S" -o "src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o"'
    Stack dump:
    0.    Program arguments: C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe -cc1as -triple rl78 -filetype obj -main-file-name portasm.S -target-cpu RL78_S3 -I C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Demo\RL78_RL78G23_64p_FPB_LLVM_e2studio\src\FreeRTOS_Demo -I C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Source\portable\Renesas\LLVMRL78 -I C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Demo\RL78_RL78G23_64p_FPB_LLVM_e2studio\src\frtos_config -I C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Demo\RL78_RL78G23_64p_FPB_LLVM_e2studio\src -fdebug-compilation-dir C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Demo\RL78_RL78G23_64p_FPB_LLVM_e2studio\HardwareDebug -dwarf-debug-producer clang version LLVM for Renesas RL78 10.0.0.202104  -I C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Demo\RL78_RL78G23_64p_FPB_LLVM_e2studio\src\FreeRTOS_Demo -I C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Source\portable\Renesas\LLVMRL78 -I C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Demo\RL78_RL78G23_64p_FPB_LLVM_e2studio\src\frtos_config -I C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Demo\RL78_RL78G23_64p_FPB_LLVM_e2studio\src -debug-info-kind=limited -dwarf-version=4 -mrelocation-model static -o src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o C:\Temp\DevTools\portasm-21872c.s
     #0 0x776d46d2 (C:\WINDOWS\System32\KERNELBASE.dll+0x1146d2)
     #1 0x75137a36 (C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll+0x7a36)
     #2 0x7517f77f (C:\WINDOWS\SYSTEM32\MSVCP140.dll+0x2f77f)
     #3 0x009cbb0b (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x9bb0b)
     #4 0x009cd352 (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x9d352)
     #5 0x009c8234 (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x98234)
     #6 0x009c7fac (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x97fac)
     #7 0x00efb60d (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x5cb60d)
     #8 0x00ee99c5 (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x5b99c5)
     #9 0x0099e53b (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x6e53b)
    #10 0x0099eff0 (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x6eff0)
    #11 0x0099609c (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x6609c)
    #12 0x00997713 (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x67713)
    #13 0x023f897f (C:\Renesas\LLVM\RL78\10.0.0.202104\bin\clang.exe+0x1ac897f)
    #14 0x76cc6359 (C:\WINDOWS\System32\KERNEL32.DLL+0x16359)
    #15 0x77a887a4 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x687a4)
    #16 0x77a88774 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x68774)
    clang: error: clang integrated assembler command failed with exit code 1617785699 (use -v to see invocation)
    src/FreeRTOS/Source/portable/Renesas/LLVMRL78/subdir.mk:30: recipe for target 'src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o' failed
    make[1]: *** [src/FreeRTOS/Source/portable/Renesas/LLVMRL78/portasm.o] Error 1617785699