[OSy] kalisto 0.8.8 vs -fno-optimize-sibling-calls
jakub at jermar.eu
jakub at jermar.eu
Wed Feb 23 16:47:14 CET 2011
Quoting Adam Hraska <smudloadam at gmail.com>:
> V skratke: volania C-ckovych fcii v head.S treba podla
> ABI obalit takto:
>
> addiu sp, -16
> jal wrapped_xyz
> nop
> addiu sp, +16
Akorat by se tech min 16 bytu melo naalokovat zaroven s vytvarenim celeho
stack framu [1] volajici funkce. Jinak by to mohlo poplest pripadny
stacktracovaci algoritmus [2].
Bohuzel samo GCC generuje kod, ktery porusuje zasady z [1] (napr. tu o jedinem
jr $ra v posdlednim delay slotu), takze clovek vlastne ani nevi jake
ABI to GCC
pouziva.
[1] System V ABI, MIPS RISC Processor Supplement, 3rd Edition, mipsabi.pdf,
str. 3-17, 2. bod
[2] System V ABI, MIPS RISC Processor Supplement, 3rd Edition, mipsabi.pdf,
str. 3-27 a 3-28
JJ
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the NSWI004
mailing list