16 Ağustos 2018 Perşembe

Hardware Stack

Software Stack
İlk başta stack sadece yazılımda saklanan bir veri yapısı olarak düşünülüyordu. Açıklaması şöyle.
In the beginning the stack was mainly seen as a software issue: a rather complex data structure that needs to suit the language, nothing to be supplied by the hardware. How much this is true can be illuminated by the /360 design. While designed entirely after the stack had been introduced in programming languages and finished in 1965, it does not feature a stack pointer or any auto-indexing instructions that could be used for a stack. The hardware developers didn't think it would be of any good to implement such, especially as it would have been a quite complex instruction (*6), considering the different ways stacks were handled by different languages.
CPU Stack
Bu çok eskiden vardı. Açıklaması şöyle.
The 8008 inherited its on-CPU stack from the 4004; as you mention, its successor, the 8080, replaced that with a stack pointer and an in-memory stack.
Bu yöntemin dezavantajı CPU'da kısıtlı yer olması. Açıklaması şöyle.
I suspect this is the main problem in the immediate aftermath of the 8008. If you want to push anything other than the return address to the stack, you end up needing more stack space, and the room required grows quickly. At the time, transistor budgets were very tight, and I suspect “adding more features” trumped “provide fast subroutine calls in some cases

Hardware Stack
Günümüzde bir çok platform donanım tabanlı stack kullanıyor (x86, ARM gibi).

C standardı donanım stack'i yani stack pointer olup olmaması ile ilgili bir tanımlama yapmıyor.

Hiç yorum yok:

Yorum Gönder